migrating from VMware using raw block device?

mangoo

Member
Feb 4, 2009
198
0
16
wpkg.org
I'm trying to start a KVM guest from which used to be a VMware guest.

Document on http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE is pretty straightforward, but some of it doesn't apply in my case: for VMware, I didn't use file images, but raw block device.

When I try to start the virtual machine, it doesn't go very far - KVM's guest BIOS says:

Press F12 for boot menu.

Booting from Hard Disk...
Fehler beim Laden des Betriebssystems_


Which means that the Windows bootloader executed, but failed short after.

Anyone ever migrated from VMware running on a raw block device / LVM / disk to KVM?
 
I'm trying to start a KVM guest from which used to be a VMware guest.

Document on http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE is pretty straightforward, but some of it doesn't apply in my case: for VMware, I didn't use file images, but raw block device.

When I try to start the virtual machine, it doesn't go very far - KVM's guest BIOS says:

Press F12 for boot menu.

Booting from Hard Disk...
Fehler beim Laden des Betriebssystems_


Which means that the Windows bootloader executed, but failed short after.

Anyone ever migrated from VMware running on a raw block device / LVM / disk to KVM?

just fix the windows bootloader!? which win os do you run? if you run xp or win2003 you need to boot the install ISO and go for the repair console.

(google for fix boot loader windows)

if you run vista/win2008 its even more straightforward.
 
just fix the windows bootloader!? which win os do you run? if you run xp or win2003 you need to boot the install ISO and go for the repair console.

(google for fix boot loader windows)

if you run vista/win2008 its even more straightforward.

It is Windows 2003.
Bootloader seems to be fine when I run VMware - it boots correctly then.

Let's see if booting from the install ISO helps...
 
It is Windows 2003.
Bootloader seems to be fine when I run VMware - it boots correctly then.

Let's see if booting from the install ISO helps...

Unfortunately, it doesn't help.

I've followed the instructions on http://support.microsoft.com/kb/330184

Basically, I started "bootcfg /rebuild" and answered the questions.


I'm still getting the same error message.

Which doesn't wonder - new entries detected by Windows Recovery Console use the same device.


VMware boots fine from the same block device.

Can it be that VMware used a slightly different method of accessing the disk? In VMware's config file I see options for cylinders, sectors etc.

Any more ideas how to fix it?

I also tried "fixmbr", but after that, the only thing that change is the language in which the message is displayed (English instead of German, in a German language Windows version, funny).
 
OK, I also found this HOWTO: http://www.techspot.com/vb/topic8356.html

It says:
- boot off an installation CD
- choose installation and NOT repair
- then, choose repair

When I do it, the installer checks the drive shortly and then says (translation from German):

Drive C: is damaged and can't be repaired any more.
Can't continue, press F3 to cancel the installation.


WTF?
 
Also, when trying to use chkdsk from the recovery console, it says the filesystem is broken beyond repair.

But it works fine in VMware.


I'm puzzled.

one step back: I will try to build a similar win2003 here and then migrate.

so pls give all details settings about your win2003 on vmware (pls include just all information).
 
one step back: I will try to build a similar win2003 here and then migrate.

so pls give all details settings about your win2003 on vmware (pls include just all information).

Nothing special about this Win2003 installation.
It is installed on a iSCSI drive, which is basically /dev/sdX drive to system.


What I think DOES matter is listed here - note the differences in fdisk output (I booted SystemRescueCD on both vmware and proxmox guests):

proxmox host / guest / storage (guest will show /dev/sda obviously, other values are the same):

Disk /dev/sdc: 8598 MB, 8598020096 bytes
64 heads, 32 sectors/track, 8199 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 8191 8387568 7 HPFS/NTFS


vmware guest:

Disk /dev/sda: 8589 MB, 8589934592 bytes
64 heads, 32 sectors/track, 8192 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 8191 8387568 7 HPFS/NTFS


And this is why it fails. Anyone has a clue what can be done about it?
 
For some reason (DRBD migration and increasing the size of the device in the past) I have these settings hardcoded in the vmware config file for that guest:

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "8192"
ddb.geometry.heads = "64"
ddb.geometry.sectors = "32"
ddb.geometry.biosCylinders = "8192"
ddb.geometry.biosHeads = "64"
ddb.geometry.biosSectors = "32"
ddb.adapterType = "lsilogic"
ddb.toolsVersion = "0"

Is there a way to pass such values for KVM?
 
Just try to change the scsi id in /etc/qemu-server/VMID.conf

replace "scsi0: ..." scsi2: .."

Does that work

Why should it help?

Anyway, I tried, with a different bootdisk each time, and it fails to boot:

bootdisk: ide1
scsi0: /dev/sdc
scsi1: /dev/sdc
scsi2: /dev/sdc
scsi3: /dev/sdc
ide0: /dev/sdc
ide1: /dev/sdc
ide2: /dev/sdc
ide3: /dev/sdc
 
I can't figure it out. How should it look like in the config file?

Something like this:

scsi0: /dev/sdc,cyls=8192,heads=64,secs=32

doesn't seem to work.

This is the log I have:

/usr/sbin/qm start 103
qemu: 'file=/dev/sdc,if=scsi,index=0,heads=64,secs=32,cyls=8192,media=disk,boot=on' invalid physical heads number
start failed: command '/usr/bin/kvm -monitor unix:/var/run/qemu-server/103.mon,server,nowait -vnc unix:/var/run/qemu-server/103.vnc,password -pidfile /var/run/qemu-server/103.pid -daemonize -usbdevice tablet -name Windows_dc1 -smp 1 -id 103 -cpuunits 1000 -boot c -vga cirrus -tdf -localtime -k de -drive file=/dev/sdc,if=scsi,index=0,heads=64,secs=32,cyls=8192,media=disk,boot=on -m 512 -net tap,vlan=0,ifname=vmtab103i0,script=/var/lib/qemu-server/bridge-vlan0 -net nic,vlan=0,model=rtl8139,macaddr=5E:A8:1E:4C:E3:27' failed with exit code 1 at /usr/share/perl5/PVE/QemuServer.pm line 295.
VM 103 start failed -
 
You can also simply create a kvm VM using the web interface. Then modify the hardware using the web interface, and take a look at the resulting configuration file. I guess thats the fastest way to lean how it works.

- Dietmar
 
please can you post your original config file.

My original config file was (I also tried ide0 instead of scsi0, with the same result):

ostype: w2k3
memory: 512
name: Windows2_dc1
smp: 1
vlan0: rtl8139=4E:50:EF:96:2C:BE
bootdisk: scsi0
scsi0: /dev/sdc
boot: cad
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1
 
My original config file was (I also tried ide0 instead of scsi0, with the same result):

ostype: w2k3
memory: 512
name: Windows2_dc1
smp: 1
vlan0: rtl8139=4E:50:EF:96:2C:BE
bootdisk: scsi0
scsi0: /dev/sdc
boot: cad
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1


It booted under plain qemu using this flag (the last parameter can be none or lba; it doesn't boot using lba):

-hdachs 8192,16,32,none


Is it possible to add custom parameters in the config file?
 
It booted under plain qemu using this flag (the last parameter can be none or lba; it doesn't boot using lba):

-hdachs 8192,16,32,none


Is it possible to add custom parameters in the config file?

It boots when I use these parameters:

-hda '/dev/sdc' -hdachs 8192,16,32,none

It does NOT boot when the config file is read and parameters are generated:

-drive file=/dev/sdc,index=0,media=disk -hdachs 8192,16,32,none


What is the difference between those two?
 
Last edited:
because

It boots when I use these parameters:

-hda '/dev/sdc' -hdachs 8192,16,32,none

It does NOT boot when the config file is read and parameters are generated:

-drive file=/dev/sdc,index=0,media=disk -hdachs 8192,16,32,none


What is the difference between those two?

-hda defines a device
-drive defines a file
"file=file"
This option defines which disk image to use with this drive. If
the filename contains comma, you must double it (for instance,
"file=my,,file" to use file "my,file").

i don't know why but i think that the -drive option does not recognize the
device as a real device-device but as a regular image file.

Diaolin
 

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!