How to migrate live physical Windows PC's

J

jsquire

Guest
Hi,


I've just been experimenting with importing windows physicals PC's into Promox.

by using a useful (not quite as useful as proxmox ve) bit of windows freeware called selfimage it is possible to transfer the windows harddrive image (whilst still running ie. great for servers) into a qcow2 file.

This can then be booted and windows will hopefully sort the new drivers out.

1) create a new KVM container with a suitable HD size.
2) export the qcow2 in the container directory with NBD

eg.

qemu-nbd -t /var/lib/vz/images/***/vm-***-disk.qcow2

where *** is the VM number

3) install selfimage on windows PC
4) choose to image entire hard disk , not partition
5) on output file select NBD with parameters ip and port 1024

6) start

when imaging is complete you should be able to boot the win m/c in KVM. you may need to use mergeide.reg for non IDE drives.

Hope this helps


JS
 
Hi,

thank you for this little howto. In my case, virtualising a windows 2000 server with SCSI RAID, it didn't work that way. As I booted the VM on PVE I got a BSOD telling me that there is an inaccessible boot device.
So I did it again but I installed the mergeide.reg on the physical machine BEFORE transfering the hard disk with SelfImage to the PVE Container. So the VM booted without a problem.

Doing the migration this way seems to me much easier than struggling also with VMware Converter and VMware as a step between.

Der Nasenmann
 
Last edited:
Hi,


I've just been experimenting with importing windows physicals PC's into Promox.

by using a useful (not quite as useful as proxmox ve) bit of windows freeware called selfimage it is possible to transfer the windows harddrive image (whilst still running ie. great for servers) into a qcow2 file.

This can then be booted and windows will hopefully sort the new drivers out.

1) create a new KVM container with a suitable HD size.
2) export the qcow2 in the container directory with NBD

eg.

qemu-nbd -t /var/lib/vz/images/***/vm-***-disk.qcow2

where *** is the VM number

3) install selfimage on windows PC
4) choose to image entire hard disk , not partition
5) on output file select NBD with parameters ip and port 1024

6) start

when imaging is complete you should be able to boot the win m/c in KVM. you may need to use mergeide.reg for non IDE drives.

Hope this helps


JS

nice, can you add this in this wiki page as an optional way?
 
Did you guys try this on a running instance of Windows? I tried this on a running Win2K server after running mergeide.reg and the resulting image wouldn't boot, just BSOD with an inaccessible boot device. I booted the kvm with a PE environment and a install cd in recovery mode and both were able to read the drive. I'd love to be able to do this on the fly, any ideas?
 
Hi,
i have tried it with a running (and hard working) XP. The first run was'nt bootable - but i think i make a mistake with the targetpartition (only 12G - the used data was created). The second try with a slightly bigger partion as the source-partition boot and run. Of cource, checkdsk have to repair the filesystem, but the machine run!
Some remarks: Copy first the installer for the e1000-driver to the computer (if you use an e1000-nic). And, if you move from vmware: deinstall first the vmware-tools. On proxmox the vmware-tools are not deinstallable...

Udo
 
Hi,

yes I successfully migrated a running physical Win2k Server to PVE, as described above. First try, without mergeide.reg, was a failure, but second try with mergeide.reg did the job. And I also did, like Udo said, copy the e1000 installer on the physical machine before migration.

Der Nasenmann
 
No go for me, I ran chkdsk, still blue screens on boot. The install cd can read the disk along with a BartPE cd. Maybe I'll try a chkdsk on the physical machine and try it again or a larger qcow image.
 
I must have the one exception, no matter what I do, this Win2K install won't boot in a KVM.
Here are my steps after creating the VM in the PVE interface:

1. Install mergeide.reg
2. Image drive using softimage to a nbd via qemu-nbd
3. Close softimage when copy is complete, ctrl-c qemu-nbd.
4. Configure VM to boot from Windows install CD, boot installer, choose rescue mode, run chkdsk.
5. Configure VM to boot normally.
6. Starts booting, get BSOD:

0x0000007B (0xEB81B84C,0xC0000034,0x00000000,0x00000000)
INACCESSIBLE_BOOT_DEVICE


It won't even go into safe mode, same BSOD. I can boot the VM with any sort of Live CD (linux, bartPE, etc) and read the drive just fine, just won't boot on it's own.
 
Great Success!

I found the issue, it was due to the Intel Ultra ATA service/driver combo. I uninstalled this and rebooted, then imaged the drive. Works perfectly now! Hopefully this helps somebody else when migrating an old Win2K box to a VM.
 
Hi

Anyone achieved this with a w2k3 server when the original is on Perc controllers?

I followed the process as:

1) Run mergeide.reg on the running physical machine and ensure ide drivers exist in the drivers directory under /system32

2) On Proxmox create suitable KVM with sufficient disk space.

3) SSH to Proxmox host and share disk out using qemu-nbd

4) Run selfimage and set target as proxmox host IP and port 1024

All appears to run well but and complete butwhen the NBD share is stopped and the VM started it goes to 100% CPU and the console session just says booting from disk and stays there.

Any ideas of where to look?

We don't have many win32/64 environments but I would like to virtualize the ones we do.

Thanks

Kevin
 
Looking again at the process, it seems, as this RAID array configuration produces a single 500GB drive that is partitioned to 20GB (C) and 480GB (D), that I need a virtual disk of 500GB to move the C partition as the method requires Disk not Partition moves.

That's a pain! ;-)

I wonder if there is any other solution for that kind of move?

I will investigate more and see if the dynamic nature of the virtual disk can allow disk sizes larger than the host has available.... since it is all empty space on the live one!
 
I have just yesterday migrated a w2k3 x64 on a 500Gb Dell PERC controller on partitions 50: 450 . It has taken a while to get this working here goes.


I used selfimage to image the whole drive not a partition!

Now I didn't have 500gb to allocate to a VM. I have noticed that you need to set the proxmox HD to at least 30Gb bigger than needed for selfimage --> qemu-nbd otherwise selfimage bombed out with 4byte read errors before the end.

so I created a 100Gb Proxmox HD , system drive + bit and then some.

Used selfimage and copied the first 70 gb from the server to VM HD

exit qemu-nbd with ctrl-C if not bombed out.

now you should have the system partition of the server disk + part other partition

When I booted the partition with Gparted live CD no joy.
So I tried a booting the puppy linux iso in the VM . This did see the drives !!!!!

I went the console and ran fdisk -l . It reported a strange number of cylinders (something to do with the raid) but still listed the partitions correctly. I selected the disk
fdisk /dev/sda then deleted the last partition (ie the one that had not completed) . wrote the changes then rebooted the VM with HDide0:0 selected and it booted fine. :D:D


to copy the last partition I just used selfimage partition copy to a proxmox drive 30gb bigger.


Hope this works for you.



JS
 
That chimes a bit with how things went for me today... On the full disk copy, after I got to the last part of the first partition it would die with a read error.

Just now checking out various partition apps to find the bits and ends of the system drive, so I will give puppy a hit. I didnt think of that for a server, normally have one on flash drive for desktops it just didn't come to mind!

Thanks for the response, I now see light ;)

K
 
Puppy is very handy (not quite as much as proxmox). The easiest way to use it is to go to your Proxmox /var/lib/vz/templates/iso (if i remember right ) and do a wget `www.***iso download link***' then the iso will be in that folder so it will appear in the CD list.



JS
 
Hi,
I'm in troubles with SelfImage...

- I created a new KVM container with a 330 GB HD (the original is 320).
- qemu-nbd -t /var/lib/vz/images/103/vm-103-disk-1.qcow2 ...and it starts correctly.
- Installed SelfImage on the PC, selected entire HD as input.

When I select NBD as output with port 1024, SelfImage gives an error (a part of the error is in Italian, so I put here also the translation):

ESocket error when trying to connect with "192.168.1.50:1024" with message: windows socket error:
Impossibile stabilire la connessione. Rifiuto persistente dal computer di destinazione (10061), on API 'connect'
<translation>
ESocket error when trying to connect with "1.104.4.100:1024" with message: windows socket error:
Impossible to establish a connection. Constant deny from the destination computer (10061), on API 'connect'

Proxmox IP is 1.104.4.100, and the PC has 1.104.4.233. They ping correctly.

Anyone knows about this error?

Thank you..
 
  • Like
Reactions: Andre Frossard

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!