vm won't boot after disk move

floorv

New Member
Dec 28, 2020
4
2
1
48
Hi I have a VM which wont boot after a disk move from my NAS to the local-lvm storage pool with the error shown below:
BdsDxe: failed to load Boot0001 "UEFI QEMU HARDDISK QM00005 " from PciRoot(0x0)/Pci(0x7,0x0)/Sata(0x0,0xFFFF,0x0): Not Found

I also looked at this: https://pve.proxmox.com/wiki/OVMF/UEFI_Boot_Entries as it seemed to be a known error.
However I cannot add a boot option my screen stays empty. The disk is showing in the boot order screen....
Did my disk get corrupt?

config below:
/usr/bin/kvm \
-id 100 \
-name hatest \
-no-shutdown \
-chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' \
-mon 'chardev=qmp,mode=control' \
-chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
-mon 'chardev=qmp-event,mode=control' \
-pidfile /var/run/qemu-server/100.pid \
-daemonize \
-smbios 'type=1,uuid=cfc9fc70-eef1-407b-9549-afae77122662' \
-drive 'if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,size=131072,file=/dev/pve/vm-100-disk-0' \
-smp '6,sockets=1,cores=6,maxcpus=6' \
-nodefaults \
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vnc unix:/var/run/qemu-server/100.vnc,password \
-cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
-m 2048 \
-device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
-device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
-device 'vmgenid,guid=c160c8ae-16c8-4676-b3cc-e3c2502d138b' \
-device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
-readconfig /usr/share/qemu-server/pve-usb.cfg \
-device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
-device 'usb-host,hostbus=1,hostport=7,id=usb0' \
-chardev 'socket,id=serial0,path=/var/run/qemu-server/100.serial0,server,nowait' \
-device 'isa-serial,chardev=serial0' \
-device 'VGA,id=vga,bus=pci.0,addr=0x2' \
-chardev 'socket,path=/var/run/qemu-server/100.qga,server,nowait,id=qga0' \
-device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
-device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
-device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:3dd41f5018a9' \
-device 'ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7' \
-drive 'file=/dev/pve/vm-100-disk-1,if=none,id=drive-sata0,format=raw,cache=none,aio=native,detect-zeroes=on' \
-device 'ide-hd,bus=ahci0.0,drive=drive-sata0,id=sata0,bootindex=100' \
-netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
-device 'virtio-net-pci,mac=EE:3A:FA:58:A9:4B,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
-machine 'type=pc+pve0'
 
Last edited:
It's probably a hack, but this usually works for me:


Code:
# Make sure VM is disabled:

ha-manager set vm:<VMID> --state disabled

# Open GDISK to modify disk partition map

gdisk /dev/zvol/rpool/vm-<VMID>-disk-<DISK#>

# Once GDISK opens, then just use the W command to re-write the partiion map

# Re-enable (start) VM to verify the VM boots using the disk

ha-manager set vm:<VMID> --state enabled

This also may help if you run HomeAssistant:
Code:
Press <enter> when the system stops during boot
systemctl stop systemd-journald
umount -A /dev/disk/by-label/hassos-data
fsck.ext4 /dev/disk/by-label/hassos-data
Keep pressing <enter> through all the prompts
 

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!