[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Physical Windows HDD Install to Xen DomU Disk Image



On Mon, May 6, 2013 at 10:38 AM, Wardzinski, Todd
<todd.wardzinski@xxxxxxxxxxx> wrote:
>>> All,
>>>
>>>
>>>
>>> I have tried a number of methods found through various sites on the
>>> Internet to get a physical windows install converted to a Xen DomU
>>> disk image.  Such
>>> as:
>>>
>>>
>>>
>>> 1.       DomU disk image creation (formatted as ntfs).  We then mounted the
>>> disk image (loop) and directly copied the physical mount image data to
>>> the disk image.
>>>
>>> 2.       Qemu-img convert from physical HDD to VHD.
>>>
>>> 3.       XenConvert (from Citrix) to VHD
>>>
>>>
>>>
>>> So far I have not had luck in getting any of these to produce a good copy.
>>> Does anyone have any good references for this problem?  Possibly a
>>> method that works time and time again?
>>>
The method I've had the best luck with to date (when converting around
10 Windows 2003 and one or two windows 2000 servers) was this:
0) Take a proper, full disk image/backup of the machine before you
start. Worst case you can always restore it (unless like me the hardware
(HDD) fails almost immediately after step 3, luckily for me it wasn't
before step 3 though)
1) Install the xen GPLPV drivers (yes, on the physical machine, before
you shut it down) (mainly only needed if you use RAID or SCSI disk
currently, if you use a plain IDE drive, it should not be needed but
doesn't hurt).
2) Boot from a liveCD (I used ubuntu or debian, but it really doesn't
matter)
3) Use dd + netcat to send the image to your new xen server (or storage
server, I was using a iSCSI server). You want to write it directly to
the block device that you will put into your xen config as the disk (or
send to a file).
4) Bootup the VM, possibly re-install the GPLPV drivers to ensure they
are installed and working properly, and you are all done.

Some things that can cause problems:
You can check which HAL is in use from Windows Device Manager, right
click on "My Computer" I think from memory, and then click Update
Driver, then "Show all compatible", you should see which one you
currently have. DO NOT CHANGE IT FROM HERE, that never worked for me,
and I had a very painful restore process to follow... Make sure xen will
present the correct options, eg acpi=1 etc

Same goes for multi-cpu or single cpu, etc...

This also mostly worked for me when moving a windows NT 4.0 machine to
Xen VM, though I had some/a lot of issues with the extra 300GB HDD, but
the plain OS worked fine, in the end I did the migration, and then a
win2k upgrade, and then tweaked the registry to work with large drives
to solve the problem)

If you boot windows from the VM, and it blue screens, even if you change
the parameters in the config, it will never work until you redo the
image. (LVM + snapshots, and rollback of the snapshot saved a LOT of
time here).

Using LVM snapshots drastically reduces write performance, be careful
about using it in production.

If you still have issues, or would like more information, let me know
and I'll see if I can be more specific...

Regards,
Adam

-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.