我使用oraclevirtualbox在我的系统上运行一个虚拟机,我要完成的是从物理系统读取虚拟机上的文件。我正在使用virtualbox api(pyvbox)与virtualbox进行接口。这是我第一次使用virtualbox api。在
更新>>> import virtualbox
>>> vbox = virtualbox.VirtualBox()
>>> vm =vbox.find_machine("XPBox")
>>> session = vm.create_session()
>>> gs = session.console.guest.create_session('xphandler' , ' qwerty')
>>> process, stdout, stderr = gs.execute('C:\\Windows\\System32\\cmd.exe', ['/C', 'tasklist'])
Traceback (most recent call last):
File "", line 1, in
process, stdout, stderr = gs.execute('C:\\Windows\\System32\\cmd.exe', ['/C', 'tasklist'])
File "C:\Python27\lib\site-packages\virtualbox\library_ext\guest_session.py", line 54, in execute
process.wait_for(int(library.ProcessWaitResult.start), 0)
File "C:\Python27\lib\site-packages\virtualbox\library.py", line 13666, in wait_for
reason = ProcessWaitResult(reason)
File "C:\Python27\lib\site-packages\virtualbox\library.py", line 121, in __init__
raise ValueError("Can not find enumeration where value=%s" % value)
ValueError: Can not find enumeration where value=None
>>>
这是当我输入下面给定的解决方案时的输出。在