Created
July 19, 2011 22:02
-
-
Save Lothiraldan/1093851 to your computer and use it in GitHub Desktop.
PYTI Minimal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyti.vmanager.diskhandler import * | |
from pyti.vmanager.vms import * | |
import time | |
import sys | |
from os import getcwd | |
from os.path import join | |
hd_location = join(getcwd(), sys.argv[1]) | |
config={'name':'PYTI','memory':'123','hd_location':hd_location} | |
a=VirtualMachine('PYTI',"vbox:///session",config=config) | |
a.start(replace=True) | |
while a.domain.isActive(): | |
time.sleep(2) | |
d=DiskOperations(hd_location) | |
d.mount() | |
d.download('/opt/pyti/out/log', 'out/log') | |
d.download('/opt/pyti/out/error.log', 'out/error.log') | |
d.close_connection() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment