Trying to program my Harmony remote from WinXP inside of VirtualBox, I kept getting disconnect errors. Poking around, I found these directions (last four paragraphs of the post) for setting up a filter in the virtual machine configuration so that it automatically connects the USB device (the problem apparently is the remote disconnects when rebooting and without the filter, the virtual machine can't find it then).
Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts
Sunday, November 29, 2009
Sunday, May 31, 2009
Booting a VirtualBox VM from removable drive without the GUI
I recently installed VirtualBox on one of my Ubuntu systems. I was intrigued by the VBoxManage command line client and was wondering if it would be possible to boot a VirtualBox VM from a removal drive entirely with a script (i.e. without the GUI).
The answer is yes. You can see the script in my google code repository (Updated to HG path).
In short, you create the VM as usual using the GUI (in theory you should be able to do that from the command line as well, but I need to work out details with the networking). Then remove the harddrive from the VM and copy the .xml and .vdi file to the removable drive. Then go ahead and remove the VM and harddrive from the GUI.
At this point you can boot the VM using something like the following:
The only hiccup at this point is if you have the GUI running, it seems to keep the VM open in some way that prevents you from ejecting the device.
Since I finished this script I discovered the VirtualBox SDK with Python bindings. For v2 of the script, then would be a natural thing to leverage.
The answer is yes. You can see the script in my google code repository (Updated to HG path).
In short, you create the VM as usual using the GUI (in theory you should be able to do that from the command line as well, but I need to work out details with the networking). Then remove the harddrive from the VM and copy the .xml and .vdi file to the removable drive. Then go ahead and remove the VM and harddrive from the GUI.
At this point you can boot the VM using something like the following:
$ vbox-add-vm.py -v -H /media/truecrypt1/VM.vdi /media/truecrypt1/VM.xmlThe script will automatically register the VM and hard drive, add the hard drive to the VM, boot the VM, wait for it to shut down and then unregister everything.
The only hiccup at this point is if you have the GUI running, it seems to keep the VM open in some way that prevents you from ejecting the device.
Since I finished this script I discovered the VirtualBox SDK with Python bindings. For v2 of the script, then would be a natural thing to leverage.
Subscribe to:
Comments (Atom)