error loading operating system

laowolf

Renowned Member
Jul 29, 2014
66
1
73
Migration VMware workstation 10 vm to Proxmox.
I have done the migration according to the wiki page by Systemrescued CD 4.3.1.
Everything seems ok. but when I boot the vm in proxmox, it reports error loading operating system.
I checked the migrated disk image. fdisk -l reports that the /dev/sda1 start by sector 56.
Also I checked the normal proxmox vm, fdisk -l reports that the /dev/sda1 start by sector 63.
and I checked the original vmware workstation 10 vm, fdisk -l reports that the /dev/sda1 start by sector 56.
It seemed that the disk image has been migrated successfully, but it just can't be booted in proxmox.
Any one encountered similar problem? how to fix this problem?
 
I have built another vmware workstation 10 vm, with vmware IDE disk. I checked the IDE disk, fdisk -l reports that /dev/sda1 start by sector 63.
I imagrated this vm to Proxmox, and everything is ok.

The imagration-failed vm uses vmware scsi disk, which has the /dev/sda1 start sector 56. Is it the reason of "error loading operating system"?
any on encountered similar problem? any one know how to fix it?
 
When you boot the vm with scsi disks try pressing F12 in the BIOS screen. It should display any available disks which can be used to boot. Does your scsi disk show up in the list of disks available to boot?
 
mir, thanks for replying.

I have tried pessing F12 in the BIOS screen, the output is as following
Select boot device:

1. ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (21504 MiBytes)
2. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
3. iPXE (PCI 00:12.0)
4. Legacy option rom

the option 1 is the migrated disk, and when I press 1, the output is as following:

Booting from Hard Disk...
Error loading operating system


I have tried to fix the mbr and bootloader by windows recovery console in the wndows installation CD, and It cann't fix the "error loading operating system" problem.
Also I have checked the mbr of the imagrated disk image and the normal proxmox vm disk image. The first 368 bytes are all the same, and I have found the string "Error loading operating system." lies between byte 324 and 354. Obviously the problem occurs when the mbr code is executed. For that the mbr code is all the same between error vm disk image and the normal vm disk image, I think the source of the problem is seabios. maybe seabios doesn't support booting from sector 56, and one can only boot from sector 63?
 
Last edited:
Have you tried using the vmware tools to convert your vmdk to qcow2 or raw and then use this image as disk? Maybe the vmware tools will fix your boot sector problem.
 
To the best of my knowledge, I know that vmware-vdiskmanager can convert vmdk to another vmdk, but not qcow2 or raw.
Is there any vmware tools to convert vmdk to qcow2 or raw? any details?

Also I'd like to migrate the vm through network. Can clonezilla solve this problem?

Have you tried using the vmware tools to convert your vmdk to qcow2 or raw and then use this image as disk? Maybe the vmware tools will fix your boot sector problem.
 
[solved]
And the process is as following:
step 1. Imagrate the vmware workstation 10 vm to proxmox with systemrescued cd 4.3.1 and “netcat -w30 -vvnlp 3333 | gzip -dc > /root/test.raw" on proxmox server and "dd if=/dev/sda | gzip -c | nc -w30 -vvn pmxipaddress 3333" on vmware vm.
step 2. setup a new vm with raw disk and proper disk size.
step 3. write the vm disk by dd if=test.raw of=/var/lib/vz/images/vmid/vm-vmid-disk-1.raw(this can setup the partation)
setp 4. boot the imagrated vm by windows 2003 server cd, and install a windows 2003 os on the imagrated partation.(this can fix the mbr and setup a proper ntfs file system)
step 5. the new installed vm can be booted now.(so seabios indeed can boot a vm from sector 56), boot it and confirm it indeed can be booted.
setp 6. boot the vm with systemrescued cd 4.3.1 and mount the test.raw disk into the vm. delete every file in vm-vmid-disk-1.raw, and copy all the files from test.raw to vm-vmid-disk-1.raw.(this can imagrate the origin vm file to proxmox vm)
step 7. reboot the vm from vm-vmid-disk-1.raw disk, and it should work now.

It is dirty, and I don't like this solution. But it is the best I can do for now. Hope this can help someone else.
 
Last edited:

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!