I use Citrix XenConvert to P2V our Windows servers into Microsoft Hyper-V. Yes, it was designed to be used with Xen, but it offers VHD as an output file type, and it is very effective. In all instances to date, the hosts have been running Hyper-V on Server 2008 x64 Standard or Server 2008 R2 Standard, and the guests have been running Server 2003.
I don't see any reason why this procedure wouldn't work on a server that boots from SAN:
First, I run XenConvert on the physical server while it's running (but outside of production hours). Then, I create the new virtual server with a Legacy Network Adapter, map the drive(s) to the VHD file(s) that I've created with XenConvert, shut down the old server, and fire up the new virtual server. It is easiest to RDP into the newly virtualized server to install Integration Services, because the mouse will not work via the Hyper-V console until they are installed. It's also possible to do via the keyboard on the Hyper-V host, but only in full screen mode: otherwise key combinations like ^-Esc go to the host.
I too have tried Disk2VHD and found it to be flaky. XenConvert works better.
[edit] download link: http://www.citrix.com/English/ss/downloads/details.asp?downloadId=1862307&productId=683148#top
Cheers,
Miles
As other answers alluded to, the ideal approach is LUN-per-VDI. At first it didn't look like it was possible to do this, but there is an undocumented "iscsi" SR driver that will create a LUN-per-VDI SR (I found this when looking through the /opt/xensource/sm directory - see the ISCSISR.py file). You essentially setup one SR for each iSCSI target, and XenServer creates the VDIs for each LUN on that target. You can only set this up through the command-line, including creating the VBDs and attaching it to VMs. The VBDs and VDIs don't even show up in XenCenter.
Here's a sample command to set it up:
xe sr-create name-label=san type=iscsi device-config:target=<IP address of target> device-config:targetIQN=<IQN of target> shared=true
This will automatically create an VDI for each iSCSI LUN. If you end up adding a new iSCSI LUN on the SAN, XenServer will add a new VDI for it after executing the following command:
xe sr-scan uuid=<UUID of SR>
This also works when adding VDIs for cloned LUNs - the new VDI gets assigned a new UUID.
Also, if you end up resizing a LUN, XenServer does not automatically pick up on that, so you'd have to execute the following:
xe vdi-forget uuid=<UUID of VDI that you resized>
iscsiadm -m node -R
xe sr-scan uuid=<UUID of SR>
And to create a VBD and attach it to a VM:
xe vbd-create vm-uuid=<UUID of VM> device=<VBD device #, e.g. 0> vdi-uuid=<VDI of UUID>
Best Answer
Figured it out. There is an undocumented "iscsi" SR driver that will create a LUN-per-VDI SR (I found this when looking through the /opt/xensource/sm directory - see the ISCSISR.py file). You can only set this up through the command-line, including creating the VBDs and attaching it to VMs. The VBDs and VDIs don't even show up in XenCenter.
Here's a sample command to set it up:
This will automatically create an VDI for each iSCSI LUN. If you end up adding a new iSCSI LUN on the SAN, XenServer will add a new VDI for it after executing the following command:
Also, if you end up resizing a LUN, XenServer does not automatically pick up on that, so you'd have to execute the following:
And to create a VBD and attach it to a VM: