VM Migration Issue - LVM on CentOS 7 Guest

thecal714

New Member
Dec 1, 2015
4
1
1
Good afternoon, all!

In the process of evaluating Proxmox for work, I've been testing the migration process for vSphere 5.5 VMs to Proxmox. I've been able to successfully migrate CentOS 6 VMs with little difficulty (process outlined below), but I've yet to have a CentOS 7 VM migrate properly. Every time I migrate a CentOS 7 VM, it fails to boot: failing to dracut as the root and swap LVM partitions cannot be found.

Code:
dracut-initqueue[283]: Warning: Could not boot.
dracut-initqueue[283]: Warning: /dev/centos_emby/root does not exist
dracut-initqueue[283]: Warning: /dev/centos_emby/swap does not exist
dracut-initqueue[283]: Warning: /dev/mapper/centos_emby-root does not exist

When I boot from a CentOS 7 ISO into rescue mode, it is able to find the system just fine.

My migration process (which works well for CentOS 6) is as follows:
  1. Remove MAC and UUID references from /etc/sysconfig/network-scripts/ifcfg-eth0.
  2. Remove MAC reference from /etc/udev/70-persistent-net.rules file.
  3. Cleanly shutdown guest.
  4. Move .vmdk and -flat.vmdk to storage accessible by Proxmox.
  5. Create new Proxmox VM with similar structure to vSphere VM.
  6. Edit configuration file to point to the .vmdk file as its hard drive.
  7. Boot VM.

For CentOS 7, however, this does not work. Nor does using clonezilla to clone the VMware VM to the new Proxmox VM.

Any help would be greatly appreciated. Thanks!
 
  • Like
Reactions: mjw
Hi,
what does you mean with
Nor does using clonezilla to clone the VMware VM to the new Proxmox VM.

try to convert the .vmdk to raw or qcow before you start the Vm.
You can do this on GUI with move disk or qemu-img can convert it.
 
For the Clonezilla method, I was referring to the section on the migration wiki that references Clonezilla (Sorry, the forums won't let me post links yet).

try to convert the .vmdk to raw or qcow before you start the Vm.

This was actually the first thing I tried. It presents the same issue. I will try the GUI version though.

EDIT: Just ran the GUI conversion to qcow2. Same issue as before.
 
Last edited:
What do you use as underlying storage?
and can you send the config of the Vm

Ps now you can send links.
 
Storage is currently local, as I'm still in the testing phase.

This is the config of one of the VMs after converting the disk to qcow.

Code:
bootdisk: scsi0
cores: 1
ide2: none,media=cdrom
memory: 2048
name: GitLab
net0: vmxnet3=32:30:66:39:61:38,bridge=vmbr0
numa: 0
ostype: l26
scsi0: local:101/vm-101-disk-1.qcow2,size=20G
smbios1: uuid=b0137c44-fc72-4d8a-b8e4-8a1d8d6c5949
sockets: 1
unused0: local:101/GitLab.vmdk
 
try to export centos vm as an OVA single file from esxi. Then:
1. change the extension to .iso & upload to via proxmox gui to the storage.
2. Log to proxmox host and type tar -xfv on your *.iso
3. Convert obtained vmdk to qcow2 via qemu-img covert
3. Create a VM via GUI with same hardware paremeters as esxi vm are
4. Replace the qcow2 disk

Done this yesterday with some centos vms.
 
Last edited:
Done this yesterday with some centos vms.

Did you do this with CentOS 7 VMs?

EDIT: Yeah, didn't work. Honestly, I didn't think it would, as it's basically the same thing as what I'm doing.
 
Last edited:
Did you do this with CentOS 7 VMs?

EDIT: Yeah, didn't work. Honestly, I didn't think it would, as it's basically the same thing as what I'm doing.

Ya, with CentOS 7. But one difference is that I used an IDE driver for VM creation in proxmox. Udo might be right.
 
Ya, with CentOS 7. But one difference is that I used an IDE driver for VM creation in proxmox. Udo might be right.
Today I tried to convert one machine from *.ova to proxmox. Everything worked fine, but I had the same problem as thecal. I fixed it with IDE disk settings, not qcow2 in web gui. Thanks tag & udo
 
Today I tried to convert one machine from *.ova to proxmox. Everything worked fine, but I had the same problem as thecal. I fixed it with IDE disk settings, not qcow2 in web gui. Thanks tag & udo
Hi,
ide + qcow2 are completly different things:
The first is the driver which is used inside the VM (ide/virtio/scsi) - which device is virtual connected to the VM.
The second is the format of the hdd - which is transparent for the VM (the VM don't know anything about qcow2/RAW/vmdk/rbd...).

Udo
 
Hi,
ide + qcow2 are completly different things:
The first is the driver which is used inside the VM (ide/virtio/scsi) - which device is virtual connected to the VM.
The second is the format of the hdd - which is transparent for the VM (the VM don't know anything about qcow2/RAW/vmdk/rbd...).

Udo
yes, you are right. Sorry for my mistake. I want wrote virtio0 to ide :)
 
I can verify the problem and the solution. My CentOS 7 VM would not recognize the LVM configuration if I use SCSI or VirtIO in PVE -- even though it is a SCSI disk in VMware.
 
Hi. I'm facing the same problem with centos7. The vm only starts in rescue mode.
So the solution was to add new vm's hdd as ide device ?

Running pve 4.4-13 at the moment.
Thank you !
 
Try setting "cache=write through" for the drive that's not being recognized. This helped us on PM 4.3 with migration of VM's from esxi (Centos 6 vm)
 
I know this is an old thread but I joined just to post a fix I found when migrating 50+ VMs from ESXi to ProxMox 4.4x.

Note: This was done on a fresh ProxMox install so the qemu conversion was written directly to an LVM opposed to a raw file in the datastore.

1.) Shutdown the VM on ESXi
2.) SCP the VM folder (really only the .vmdk file(s) are needed).
3. ) Create the VM as Windows 8.x /2012 with storage being equal or greater than the original VMDK's logical size.
-This ensures that the LVM is IDE as mention above, but for whatever reason on my system when I manually added a IDE disk the VM would not boot.
4.) Run lvdisplay and determine the "LV Path" for the newly created VM (should be /dev/pve/vm-$VM_Number-disk-1)
5.) Run below command with vars set ($Logical_VMDK refers to the descripter file, not the -flat if thin provisioned, both must be preset with the same name).

qemu-img convert -p -O raw $Logical_VMDK.vmdk /dev/pve/vm-$VM_Number-disk-1

6.) Boot up your VM and cross your fingers.
 
  • Like
Reactions: mjw
Useful article, searched the internet for 2 days and found this solution.

Changed controller to IDE and worked for me as well.

Specifically with VMware ESXi 6.7 to Proxmox 5.x

I followed the following process.

copied source-flat.vmdk from esxi 6.7 host to prox 5.x host

ran the following command

qemu-img convert -O qcow2 source-flat.vmdk source.qcow2

copied source.qcow2 to /var/lib/vz/images/100/source-100-disk-1.qcow2

Create the VM via gui and select IDE as the controller in the setup process and leave the VM offline

edit /etc/pve/qemu-server/100.conf

Changed the following line

FROM ide1: local-lvm:vm-100-disk-0,size=100G TO local:100/source-100-disk-1.qcow2

The moved disk to local-lvm

Then booted the Centos 7 VM without an issue.
 
Good afternoon, all!

In the process of evaluating Proxmox for work, I've been testing the migration process for vSphere 5.5 VMs to Proxmox. I've been able to successfully migrate CentOS 6 VMs with little difficulty (process outlined below), but I've yet to have a CentOS 7 VM migrate properly. Every time I migrate a CentOS 7 VM, it fails to boot: failing to dracut as the root and swap LVM partitions cannot be found.

Code:
dracut-initqueue[283]: Warning: Could not boot.
dracut-initqueue[283]: Warning: /dev/centos_emby/root does not exist
dracut-initqueue[283]: Warning: /dev/centos_emby/swap does not exist
dracut-initqueue[283]: Warning: /dev/mapper/centos_emby-root does not exist

When I boot from a CentOS 7 ISO into rescue mode, it is able to find the system just fine.

My migration process (which works well for CentOS 6) is as follows:
  1. Remove MAC and UUID references from /etc/sysconfig/network-scripts/ifcfg-eth0.
  2. Remove MAC reference from /etc/udev/70-persistent-net.rules file.
  3. Cleanly shutdown guest.
  4. Move .vmdk and -flat.vmdk to storage accessible by Proxmox.
  5. Create new Proxmox VM with similar structure to vSphere VM.
  6. Edit configuration file to point to the .vmdk file as its hard drive.
  7. Boot VM.

For CentOS 7, however, this does not work. Nor does using clonezilla to clone the VMware VM to the new Proxmox VM.

Any help would be greatly appreciated. Thanks!

Thanks for the thread
I just find a different solution with scsi disk, by changing the SCSI controller type from default to VirtIO SCSI solved the problem.
 

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!