How to convert VHD to XVA

Today I've been playing around with a Citrix XenServer and my Microsoft Virtual PC environment. I just learned about XenServer last week at a CDWG sponsored event. Basically, it just a Virtual Machine (VM) environment that can be used as server to host VM desktops or servers or both. I already had a Virtual PC lab I was testing with 3 Windows XP VMs. So I decided to see if I could successfully move one of the VMs to the XenServer. After scratching my head for a few seconds, I realized that there is going to have to be some type of conversion process because the file formats are not the same.

Virtual PC hard disks are called .VHD
XenServer VMs are called .XVA

Here is a log of what I did to get the VHD converted: (by the way, this took all day for me to learn from scratch)

C:\converter>v2xva /verbose:loud /config:"c:\documents and settings\cha13299\doc
uments\my virtual machines\new virtual machine\Windows XP SP2.vmc" /output:"c:\t
emp\new virtual machine"

Virtual Disk Migration Utility Version 1.2: A V2V tool to convert VMware
and Microsoft Virtual Server/Virtual PC virtual machines (with Microsoft
Windows VMs installed) to the Xen Virtual Appliance (XVA) format.

[XVA] Parsing configuration file c:\documents and settings\cha13299\documents\my
virtual machines\new virtual machine\Windows XP SP2.vmc:
[XVA] Path for config file = c:\documents and settings\cha13299\documents\my vir
tual machines\new virtual machine\
[XVA] Parsing wide character MSVS configuration file
[XVA] Amount of RAM in configuration file = 512
[XVA] Getting information for disk 0
[XVA] Disk file name = C:\Users\cha13299\Documents\My Virtual Machines\New Vir
tual Machine\New Virtual Machine Hard Disk.vhd
[XVA] Number of vCPUs in configuration file = 2
[XVA] Display name for MSVS VM being used is Windows XP SP2
[XVA] Information extracted from config file c:\documents and settings\cha13299\
documents\my virtual machines\new virtual machine\Windows XP SP2.vmc
[XVA] Number of vCPUs - 2
[XVA] RAM size - 512
[XVA] Display name - Windows XP SP2
[XVA] Number of virtual disks - 1
[XVA] Disk 0 - C:\Users\cha13299\Documents\My Virtual Machines\New Vir
tual Machine\New Virtual Machine Hard Disk.vhd

Convert VHD virtual disk image to XVA...
Total disks to convert: 1

Converting Disk 0...
[XVA] Reading VHD file C:\Users\cha13299\Documents\My Virtual Machines\New Virtu
al Machine\New Virtual Machine Hard Disk.vhd
[XVA] Found VHD footer at begining of file
[XVA] VHD Footer Summary:
[XVA] -------------------
[XVA] Features : (0x00000002)

[XVA] File format version : Major: 1, Minor: 0
[XVA] Data offset : 512
[XVA] Creator Application : 'vpc '
[XVA] Creator version : Major: 5, Minor: 3
[XVA] Creator OS : Windows
[XVA] Original disk size : 65536 MB (68719476736 Bytes)
[XVA] Current disk size : 65536 MB (68719476736 Bytes)
[XVA] Geometry : Cyl: 32896, Hds: 0, Sctrs: 16
: = 65535 MB (68718428160 Bytes)
[XVA] Disk type : Dynamic hard disk
[XVA] Checksum : 0xffffee4d|0xffffee4d (Good!)
[XVA] Saved state : No
[XVA] Read header for VHD file
[XVA] VHD Header Summary:
[XVA] -------------------
[XVA] Data offset (unusd) : -1
[XVA] Table offset : 1536
[XVA] Header version : 0x00010000
[XVA] Max BAT size : 32768
[XVA] Block size : 0x200000 (2MB)
[XVA] Checksum : 0xfffff3f7|0xfffff3f7 (Good!)
[XVA] Read BAT for VHD
[XVA] Block size = 2097152
[XVA] Capacity = 68719476736
[XVA] Writing to directory c:\temp\new virtual machine\hda
[XVA] Writing chunk c:\temp\new virtual machine\hda\chunk-000000000.gz
[XVA] Writing chunk c:\temp\new virtual machine\hda\chunk-000000001.gz
[XVA] Writing chunk c:\temp\new virtual machine\hda\chunk-000000068.gz
[XVA] Write out ova.xml

[XVA] Write out XVA configration file c:\temp\new virtual machine\ova.xml
[XVA] Wrote display name to ova.xml - Windows XP SP2
[XVA] Wrote memory as 536870912 and number of vcpus as 2 to ova.xml
[XVA] Wrote VDI vdi_hda size as 68719476736 to ova.xml
Done.

(
There were 68 .gz chunks in total but I deleted few so the post would not be so long)

The whole conversion process took about 30 minutes for a VHD that was about 28GB in size. The next step was to import the new .XVA into the XenServer and see if it boots up as a Windows XP Virtual Machine.

At the time of this post, the import is about 50% complete. I will write again after its finished.

Which Virtual PC/Server software do you use?

Comments

4 Responses to “How to convert VHD to XVA”

Anonymous said...
September 5, 2008 at 10:24 AM

Whats a .vmc file? Why arent you using A .vhd file as it suggests in the title?

Anonymous said...
September 5, 2008 at 10:25 AM

Whats a .vmc file? Why arent you using a .vhd file as it suggests in the title?

Ray Chase said...
September 5, 2008 at 10:29 AM

I am using a .vhd file. A .vmc file shows all of the settings for the Microsoft Virtual PC host. The .vhd is the actual VM.

Unknown said...
October 19, 2009 at 11:47 AM

Thanks for the article. I will try this in a couple of days.

Post a Comment

 
Computer Blogs - Blog Catalog Blog Directory My Zimbio Privacy Policy