Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ python2
- Python 2.7.9 (default, Dec 11 2014, 04:42:00)
- [GCC 4.9.2] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from vboxapi import VirtualBoxManager
- >>> vbm = VirtualBoxManager (None, None)
- >>> vbm.vbox.getMachine ('xp')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/opt/VirtualBox/sdk/bindings/xpcom/python/xpcom/client/__init__.py", line 384, in __getattr__
- raise AttributeError, "XPCOM component '%s' has no attribute '%s'" % (self._object_name_, attr)
- AttributeError: XPCOM component '@virtualbox.org/VirtualBox;1' has no attribute 'getMachine'
- >>> vbm.vbox.findMachine ('xp')
- <XPCOM component '<unknown>' (implementing IMachine)>
- >>> machine = vbm.vbox.findMachine('xp')
- >>> machine.getMediumAttachments()
- [<XPCOM component '<unknown>' (implementing IMediumAttachment)>, <XPCOM component '<unknown>' (implementing IMediumAttachment)>]
- >>> exit()
- $ VBoxManage showvminfo xp |grep -i uuid
- UUID: b54c34ae-f0fe-4da7-9fc2-93bba7efb5b1
- Hardware UUID: b54c34ae-f0fe-4da7-9fc2-93bba7efb5b1
Advertisement
Add Comment
Please, Sign In to add comment