Wardzinski, Todd
2013-May-06 14:38 UTC
Physical Windows HDD Install to Xen DomU Disk Image
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? Please let me know if you have any questions? Thanks, Todd _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
In the case of windows the big issue is you need something which can properly update windows hal to handle the drastic change in hardware. Acronis can do this with their backup products and the key feature you need is "universal restore" which will make sure that the underlying os HAL is updated so that windows can boot. This is just one commercial product of which there are several and you can do some of the steps manually if motivated enough. Hope that helps chris On Mon, May 6, 2013 at 10:38 AM, Wardzinski, Todd <todd.wardzinski@progeny.net> 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? > > > > Please let me know if you have any questions? > > > > > > Thanks, > > Todd > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users
Wardzinski, Todd
2013-May-06 16:40 UTC
Re: Physical Windows HDD Install to Xen DomU Disk Image
Chris, I''m fairly motivated to get this to work :-). If you have any more links/information, I would surely appreciate it. Thanks, Todd -----Original Message----- From: chris [mailto:tknchris@gmail.com] Sent: Monday, May 06, 2013 11:37 AM To: Wardzinski, Todd Cc: Xen-users@lists.xen.org Subject: Re: [Xen-users] Physical Windows HDD Install to Xen DomU Disk Image In the case of windows the big issue is you need something which can properly update windows hal to handle the drastic change in hardware. Acronis can do this with their backup products and the key feature you need is "universal restore" which will make sure that the underlying os HAL is updated so that windows can boot. This is just one commercial product of which there are several and you can do some of the steps manually if motivated enough. Hope that helps chris On Mon, May 6, 2013 at 10:38 AM, Wardzinski, Todd <todd.wardzinski@progeny.net> 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? > > > > Please let me know if you have any questions? > > > > > > Thanks, > > Todd > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users
Alexandre Kouznetsov
2013-May-06 17:15 UTC
Re: Physical Windows HDD Install to Xen DomU Disk Image
Hi. El 06/05/13 11:40, Wardzinski, Todd escribió:> I''m fairly motivated to get this to work :-). If you have any more links/information, I would surely appreciate it.Make sure you have a consistent copy of the disk. Qemu-img convert from physical HDD to VHD might work, but I would use a RAW image, which is easer for a fine control. Boot you VM with a LiveCD (systemrescuecd or Knoppix are great for this), to make sure the disk is in place, partitioned and readable correctly. After that, treat it as a Motherboard change or upgrade to fix Windows boot. It seems like a pretty common problem, they use a Windows install disk to repair the boot loader and add the missed driver for the disk controller. Random references: http://www.tomshardware.com/forum/304001-30-bsod-motherboard http://arstechnica.com/gadgets/2007/09/how-to-install-a-new-motherboard-without-reinstalling-windows/ Greetings. -- Alexandre Kouznetsov
Andrew Bobulsky
2013-May-07 01:46 UTC
Re: Physical Windows HDD Install to Xen DomU Disk Image
Hello Todd, On May 6, 2013, at 1:00 PM, "Wardzinski, Todd" <todd.wardzinski@progeny.net> wrote:> Chris, > > I''m fairly motivated to get this to work :-). If you have any more links/information, I would surely appreciate it. > > Thanks, > Todd > > -----Original Message----- > From: chris [mailto:tknchris@gmail.com] > Sent: Monday, May 06, 2013 11:37 AM > To: Wardzinski, Todd > Cc: Xen-users@lists.xen.org > Subject: Re: [Xen-users] Physical Windows HDD Install to Xen DomU Disk Image > > In the case of windows the big issue is you need something which can properly update windows hal to handle the drastic change in hardware. > Acronis can do this with their backup products and the key feature you need is "universal restore" which will make sure that the underlying os HAL is updated so that windows can boot. This is just one commercial product of which there are several and you can do some of the steps manually if motivated enough. > > Hope that helps > chris > > On Mon, May 6, 2013 at 10:38 AM, Wardzinski, Todd <todd.wardzinski@progeny.net> 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? >> >> >> >> Please let me know if you have any questions? >> >> >> >> >> >> Thanks, >> >> Todd >> >> >> >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xen.org >> http://lists.xen.org/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-usersIf you''re working with Windows 8 or 2012, Windows will actually be able to detect that it''s missing a boot-critical driver and install any missing storage devices during boot up... It''s really, really cool :) However, if not, you''re going to likely have to do a minor hack to what''s called the CriticalDeviceDatabase in the registry to get it to boot. Once you''re able to get the Windows Boot Manager started, that''s all you''ll need to get up and running. I can give more details when you reach that point if you like :) This works for xp/2003 as well, but its a little harder. Make sure you disable automatic restart on system failure, just tap F8 during boot. You''re looking for a 7B error, "INACCESSIBLE BOOT VOLUME" I believe. As far as booting the DomU goes, you should be able to simply enter the physical device as your DomU''s hda device. My server 2012 install is on an intel raid, so my hda device is something like /dev/dm-0 . Make sure you map the whole disk (like /dev/sdb and not /dev/sdb1). Cheers, Andrew Bobulsky
Adam Goryachev
2013-May-07 14:04 UTC
Re: Physical Windows HDD Install to Xen DomU Disk Image
On Mon, May 6, 2013 at 10:38 AM, Wardzinski, Todd <todd.wardzinski@progeny.net> 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