virtualbox inside of a usb-bootable ubuntu...stuck
Posted: 26. Mar 2014, 20:00
Any help would be greatly appreciated - while I have been using virtualbox for years, it has mostly just been for simply creating new vms on my local computer - I have not tried to mess with bootable USBs running virtualbox before....
Anyways, long story short here is what I am trying to do, have tried, and where I am stuck:
What I want: I configured ubuntu on a physical machine to the way I want it, this includes a vm running in virtualbox inside the ubuntu host. So far so good. I then created an image of this working system. My goal is to be able to make the whole system boot off of a usb stick that can be given to non-technical people and they can plug it in and it will 'just work'.
first attempt: I dd'ed the .iso I created to an 8gb usb stick. I was able to boot to this stick no problem and performance was decent - the only problem is that when I try to start the VM it starts throwing errors like rc=VERR_DISK_FULL. I don't know much about the internal workings of virtualbox or virtualization in general, but I am assuming that it needs some space to write to that isn't available.
second attempt: Thinking that maybe if I made it so that the usb has persistence enabled that would solve the problem. I used the ubuntu startup disk utility and re-wrote my .iso to the usb stick but selected the option to allow writable space. When I went to boot this it took FOREVER to boot...I went home after an hour of waiting, sometime between then and the next morning it actually finished booting, no idea when. I was actually able to get the vm to boot at this point, but again the performance was absolutely pathetic - this doesn't seem like a working option.
third attempt: I tried the same as the second attempt but allowed for less space (1.5 gb instead of 4 gb) to be writable - the boot was slow (not as slow but still quite sluggish) and when attempting to boot the vm I am back to getting the VERR_DISK_FULL error.
If the vm needs space to write to during boot (I could be way off here) is there a way it can use the disk in the physical machine that the usb stick is plugged into? That space isn't being utilized and there is no reason why it can't be used if that is somehow an option. When I open the file manager I can see that disk and all the files on it and it shows up as /dev/sda1 when running `df -k`.
In an ideal world, the contents of the usb stick would be locked so that a user couldn't do too much damage to it and it would always reboot back into the same state - that way nobody could accidentally (or purposefully) add or remove software that would persist on the usb stick through a reboot.
Any advice on how I can get this usb stick to boot to ubuntu and be able to run a virtualbox machine without being so slow as to render it useless would be GREATLY appreciated - I am a little out of my element trying to figure this out and google hasn't been much help because every search I do gives me results about using virtualbox to boot the usb stick OS instead of running virtualbox from within the booted usb OS.
thanks!
Anyways, long story short here is what I am trying to do, have tried, and where I am stuck:
What I want: I configured ubuntu on a physical machine to the way I want it, this includes a vm running in virtualbox inside the ubuntu host. So far so good. I then created an image of this working system. My goal is to be able to make the whole system boot off of a usb stick that can be given to non-technical people and they can plug it in and it will 'just work'.
first attempt: I dd'ed the .iso I created to an 8gb usb stick. I was able to boot to this stick no problem and performance was decent - the only problem is that when I try to start the VM it starts throwing errors like rc=VERR_DISK_FULL. I don't know much about the internal workings of virtualbox or virtualization in general, but I am assuming that it needs some space to write to that isn't available.
second attempt: Thinking that maybe if I made it so that the usb has persistence enabled that would solve the problem. I used the ubuntu startup disk utility and re-wrote my .iso to the usb stick but selected the option to allow writable space. When I went to boot this it took FOREVER to boot...I went home after an hour of waiting, sometime between then and the next morning it actually finished booting, no idea when. I was actually able to get the vm to boot at this point, but again the performance was absolutely pathetic - this doesn't seem like a working option.
third attempt: I tried the same as the second attempt but allowed for less space (1.5 gb instead of 4 gb) to be writable - the boot was slow (not as slow but still quite sluggish) and when attempting to boot the vm I am back to getting the VERR_DISK_FULL error.
If the vm needs space to write to during boot (I could be way off here) is there a way it can use the disk in the physical machine that the usb stick is plugged into? That space isn't being utilized and there is no reason why it can't be used if that is somehow an option. When I open the file manager I can see that disk and all the files on it and it shows up as /dev/sda1 when running `df -k`.
In an ideal world, the contents of the usb stick would be locked so that a user couldn't do too much damage to it and it would always reboot back into the same state - that way nobody could accidentally (or purposefully) add or remove software that would persist on the usb stick through a reboot.
Any advice on how I can get this usb stick to boot to ubuntu and be able to run a virtualbox machine without being so slow as to render it useless would be GREATLY appreciated - I am a little out of my element trying to figure this out and google hasn't been much help because every search I do gives me results about using virtualbox to boot the usb stick OS instead of running virtualbox from within the booted usb OS.
thanks!