Showing posts with label Virtualbox. Show all posts
Showing posts with label Virtualbox. Show all posts

Wednesday, December 16, 2015

VirtualBox 5 and still not working

VirtuaBox is gone to version 5 and it's VMDK support is still crap.

It's my mistake, when I was creating the last VM I should have paid attention, I was sleepcreatingVMs and accidentally created the VM with a VMDK disk. WRONNNGGG!!! I needed an other 100G on the VM, and then I started banging my head on my desk again.

Luckily it's just tedious stuff. Our good friend qemu-utils package comes to our rescue again, so it's just a waste of space and time. We got to convert it to a better supported format, and then do the work:

time qemu-img convert -f vmdk -O vdi /fullpathtodisk.vmdk  /fullpathtodisk.vdi
VBoxManage modifymedium disk /fullpathtodisk.vdi --resize 200000 

Note that you got to count the zeros correctly. I typed 20000 and it gave me the unhelpful message:  

0%... 
Progress state: VBOX_E_NOT_SUPPORTED 
VBoxManage: error: Resize medium operation for this format is not implemented yet! 

Well, yes, resizing to smaller sizes is not implemented, but at least be more helpful to a sleep-reprived sysadmin. I was telling it to resize it to 20GB, not 200GB! I scratched my head, googled the error, had some coffee, thought about it for a while, came back, tried the vmdk again, wasted more time, only after that I counted the zeros and cursed at myself loudly.

It would be nice if VirtualBox, after all these years, would support mnemonics like MB, GB... 

Syntax error: --resize: RTGetOpt: Command line option has argument with bad format. 

Darnit!!!

Monday, July 06, 2015

VirtualBox & VERR_NOT_SUPPORTER with VMDK

So, you've got your 2GB-split VMDK and you want to import to your local Virtualbox and it's not working at all:

hakan@hakan-laptop:16:29:36:~/snafu$ VBoxManage showhdinfo demo.vmdk

VBoxManage: error: Could not get the storage format of the medium '/home/hakan/snafu/demo.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Medium, interface IMedium, callee nsISupports

The version of Virtualbox on Ubuntu 15.04 is not capable of handling this format at the moment. Install Qemu-tools and do the conversion there and stop wasting time:

time qemu-img convert -f vmdk -O vdi demo.vmdk demo.vdi 

Now that's better:

hakan@hakan-laptop:16:37:34:~/snafu$ VBoxManage  showhdinfo demo.vdi
UUID:           24142e20-6273-499a-8bbf-2ae8e27c1cef
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /home/hakan/snafu/demo.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       20480 MBytes
Size on disk:   19816 MBytes