Quickie: VirtualBox Xen Conversion

converting a copy of a Virtualbox image for transfering to Xen host.
This is just a brain dump, but if you run into this scenario it’ll be enough for you to work with.

I didn’t see a way to have VBoxManage write to stdout.

Clonehd and the UUID

floh@egal:/scratch/convert$ VBoxManage clonehd opennebula-3.8-sandbox.vdi\
 opennebula-3.8-sandbox.img -format RAW
VBoxManage: error: Cannot register the hard disk 
{fd6db816-whatever} because a hard disk '/scratch/opennebula-3.8-sandbox.vdi'
with UUID {fd6db816-whatever} already exists

floh@egal:/scratch/convert$ VBoxManage internalcommands \
sethduuid opennebula-3.8-sandbox.vdi 
UUID changed to: d3faa73c-blah

floh@egal:/scratch/convert$ VBoxManage clonehd opennebula-3.8-sandbox.vdi \
opennebula-3.8-sandbox.img -format RAW
Clone hard disk created in format 'RAW'. UUID: b58d3fc1-blah

Conversion is only IO-speed dependant, I did it on a single laptop HDD instead of SSD or BBU’ed raid. If you’re working with more than 10GB, use something fast.

Create LV on Remote host

[root@localhost ~]# lvcreate -L 10240 -n lvonefe vgxen_raid10
  Logical volume "lvonefe" created


Transfer speed is always limited by SSH, unless you have Alpine Linux with HPN-SSH 🙂 You can also switch ssh ciphers for bulk transfer. My “home box” doesn’t use Alpine Linux yet; I switch to blowfish.

floh@egal:/scratch/convert$ dd if=opennebula-3.8-sandbox.img bs=1024k | 
ssh -c blowfish root@ "dd of=/dev/vgxen_raid10/lvonefe bs=1024k"
root@'s password:

Still only got a sad 36MB/s.
Retrying the same with compression enabled (-C) yields no improvement.

SSH? NFS ftw.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s