Hi,
I've been trying to create small vmdk images for distribution. I have a disk with around 2GB of data. When I use VBoxManage convertfromraw --format vmdk, I get a file of around 1.7GB. However, when I add the resulting .vmdk file to Virtualbox, and then export an appliance from there, I get a .vmdk file of just over 600MB. Is there any way to make createfromraw create .vmdk images in the same way as the GUI export appliance feature? Perhaps some of the --variant options (I couldn't find those documented anywhere...).
I've had a look around in the source code, but that didn't help much yet :-)
Any ideas?
convertfromraw --format vmdk bigger than GUI export?
-
matthijs
- Posts: 3
- Joined: 11. Nov 2009, 00:38
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Windows XP
Re: convertfromraw --format vmdk bigger than GUI export?
According to klaus-vb on IRC, the --variant Stream option does exactly this. However, beware that this creates a read-only image, so it should only be used to ship along with an .ovf file or otherwise transferred, it should be imported / converted before using it in a virtual machine.
Some of the --variant options seem to refer to the various extent types in the VMDK specification, though I can't find all of them there.
(Edit: Replaced 'write-only' with 'read-only' and 'stream' with 'Stream')
Some of the --variant options seem to refer to the various extent types in the VMDK specification, though I can't find all of them there.
(Edit: Replaced 'write-only' with 'read-only' and 'stream' with 'Stream')
Last edited by matthijs on 11. Nov 2009, 21:51, edited 1 time in total.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: convertfromraw --format vmdk bigger than GUI export?
Your mention of a "write only image" had me confused for a while, but I take it that "--variant=stream" format is one with deflate compression applied, in which case yes, it would have to be decompressed before you could use it.
-
matthijs
- Posts: 3
- Joined: 11. Nov 2009, 00:38
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Windows XP
Re: convertfromraw --format vmdk bigger than GUI export?
Sorry, klaus said "write-once" and I translated to that "read-only" (which is effectively the same), but confused them in my reply 
Anyway, it seems that convertfromraw with --variant Stream is broken on Virtualbox 3.0 (It works with 3.1 beta). On 3.0 you can still use stream vmdk's, but you'll have to use clonehd (which means you'll need to create a normal vmdk or vdi with convertfromraw first, and then use clonehd (with absolute paths) to convert it to a stream vmdk).
Anyway, it seems that convertfromraw with --variant Stream is broken on Virtualbox 3.0 (It works with 3.1 beta). On 3.0 you can still use stream vmdk's, but you'll have to use clonehd (which means you'll need to create a normal vmdk or vdi with convertfromraw first, and then use clonehd (with absolute paths) to convert it to a stream vmdk).