Import OVA or Virtual Image

Miquel Gual Torner

Renowned Member
Aug 31, 2016
15
6
68
44
The OVA contains a CentOS 7 with kernel 3.10.
The import of the OVA works correctly.
Bash:
qm importovf 612 ACR4_2_6.ovf local-lvm --format qcow2
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "vm-612-disk-0" created.
But the machine doesn't turn on.

I have tested with machine i440fx, q35.
I have tested with BIOS: SeaBIOS or UEFI.

The best option is with BIOS SeaBIOS, then grub works. But it still doesn't turn on properly.
Booting with systemrescuecd and selecting the rescue option (findroot). Then the system turns on correctly. Everything works fine for me.

Problem:
Bash:
[root@localhost lvm]# grub2-probe --device /dev/mapper/centos-root
grub2-probe: error: disk "lvmid/aCnmUs-YmCR-H6T2-qw18-elFp-51Wo-31pqkv/cuEd6N-uC5W-5Xsh-6HKq-j8ZI-XI06-B5FzEn" was not found.
Fix the problem with cfdisk. The partitions /dev/sda2 was not configured correctly (type).
[root@localhost lvm]# grub2-probe --device /dev/mapper/centos-root
xfs

Modify all LVM UUIDs (VG and LV). I still won't start.

Bash:
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda


But the system still doesn't boot correctly.
It seems that the kernel can't find the root partition that is in LVM.
 

Attachments

  • centos7_error.png
    centos7_error.png
    282.6 KB · Views: 4
Last edited:
The kernel does not detect the hard drive.

Solution:
  • bug grub2-probe -d /root/centos/root


Bash:
cfdisk /dev/sda #change type to "Linux LVM"
  • bug not detect the hard drive.
copy debian bullseye kernel

Bash:
# prepare files
root@et089601:# cd /lib/modules/
root@et089601:/lib/modules# tar -cvf /tmp/kernel5.18.tar 5.18.0-0.deb11.4-amd64/
root@et089601:# cd /boot/
root@et089601:/boot#  cp vmlinuz-5.18.0-0.deb11.4-amd64 System.map-5.18.0-0.deb11.4-amd64 config-5.18.0-0.deb11.4-amd64 /tmp/
# copy files
root@acr:# scp mgual@mgual:/tmp/*5.18* /tmp/
root@acr:# mv  vmlinuz-5.18.0-0.deb11.4-amd64 System.map-5.18.0-0.deb11.4-amd64 config-5.18.0-0.deb11.4-amd64 /boot/
root@acr:# cd /lib/modules/
root@acr:/lib/modules# tar -xvf /tmp/kernel5.18.tar
# create img
root@acr:# mkinitrd /boot/initramfs-5.18.0-0.deb11.4-amd64.img 5.18.0-0.deb11.4-amd64
# update grub2
root@acr:# grub2-mkconfig -o /boot/grub2/grub.cfg
# reboot
root@acr:# reboot
 
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!