Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PYTI Minimal
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
You can’t perform that action at this time.