EFI Disk size changed, VM not booting


New Member
Sep 3, 2019
I accidentally modified the EFI Disk size from 4 MB to 4MB+6GB.
WHen i try to boot the VM i get the error below
kvm: -drive if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/pve/vm-101-disk-0: oversized backing file, pflash segments cannot be mapped under 00000000ff800000
TASK ERROR: start failed: command '/usr/bin/kvm -id 101 -name hassosova-2.12 -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.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/101.pid -daemonize -smbios 'type=1,uuid=6bf3eac9-5e1d-4355-ac7e-c8086018f9d4' -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,file=/dev/pve/vm-101-disk-0' -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/101.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 1024 -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'vmgenid,guid=31f854bf-c652-4ca4-be3d-79728943f460' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:abc096974ce2' -device 'ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7' -drive 'file=/dev/pve/vm-101-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=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=2E:49:1F:54:15:D5,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -machine 'type=pc'' failed: exit code 1

How do i fix the EFI Disk back to 4 MB or simply boot up the VM ?

Thank you
I accidentally modified the EFI Disk size from 4 MB to 4MB+6GB.

How did you do that?

The EFI disk on Proxmox VE is normally 128KB big, 4MB comes probably from the fact that yours is on a LVM backed volume, which allocates blocks in 4MB chunks.

If it's a LV you could just do:
lvreduce --size -6G  /dev/pve/vm-101-disk-0
the "-6G" means 6GB less than now, instead of making a relative size change you could also pass "4MB", to set the new absolute size.

What also should work: backup, recreate, restore, e.g.:
# backup
dd if=/dev/pve/vm-101-disk-0 bs=1024 count=128 of=/tmp/vm-101-efivars

# recreate
qm set 101 --delete efidisk0
qm set 1009 -efidisk0 local-lvm:0     # replace "local-lvm" with your storage ID, which is backed by the PVE LV

# restore
dd of=/dev/pve/vm-101-disk-0 bs=1024 count=128 if=/tmp/vm-101-efivars     # note that of/if are just switched here, check if it's the correct ones!

IF you do not restore it "just" means that the boot entries and orders of your VM OS is not saved anymore, but you normally can then just select a disk manually - most of the times a VM has only one OS anyway so it should boot nonetheless.
Last edited:
Hi Thomas,

The VM is a homeassistant.io vm, created with this script - https://github.com/whiskerz007/proxmox_hassos_install#default-interface-name

The HomeAssitant Console showed me that it had run out of space and i was trying to increase the space. I used to a VMware admin back in 2009s...and not uptodate on current tech..so was surprised that EFI is the new BIOS after i increased the disk space for EFI.

When VM did not boot, i check the settings and realized that i increased the wrong disk.

I will try your commands, if not i am guessing the actual disk still has data and i can retrieve my config by attaching it to a new VM.



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!