Xen is one of the coolest virtualization technologies out there. It comes in may flavors, the two largest being the bleeding edge xen.org open source project and the commercial (Citrix) version. There are things I love about the commercial version, but they lost me only supporting windows in their XenCenter administration interface.

The file formats of the commercial and open source Xenare totall different. The open source is a standard image file, you can mount it, fdisk it, whatever you would like. The Citrix Xen Virtual Appliance .XVA file is quite different. It is actually a tar file with ova.xml meta data and directories starting with Ref full of 1M files that make up the drive volumes of the virtual image.

I get the same message like “dr” and / after Ref:3 didn, helped. It works with imeges less than 1G. When I took newer version of XenMigrate.py message disapeared but
it stops after 1st chunk. Any suggestions?

Just taking a wild guess here but are the 1mb files to allow snapshots?

I know that if you have thin-provisioned virtual disks then they pretty much do this by simply skipping any 1mb blocks/files that have no data in them. So you’ll have something like 000000, 000001, 000002, 000005, 000006 and presumably the 3-4 files are simply empty so not included. Doesn’t save as much space as simply using compression but likely takes some pressure off the CPU and slows down some of the write speed if it needs to create the file first.

It wouldn’t surprise me that if you looked into snapshots that you’d pretty much find a heap of 1mb files that match up with the ones changed.

*meh* I could be way off the mark as the virtual disk in XenServer is likely far different from the XVA format.

Handy dandy script I cooked up to handle everything from snapshotting a live VM on xenserver to mounting the partitions as /dev/mapper/loopXpY It uses a newer version of xenmigrate.py from Jolokia Networks, edited by bret.miller (dl link to pastebin on the Jolokia page, patch in my note is 0.7.4->editedversion). This lets you quickly run against a Citrix VM, then do something like dd if=/dev/mapper/loopXpY bs=4096k | ssh some.other.xen ‘dd of=/dev/mapper/NewXenLVM’