qm set efi disk in CLI

Zombie

Well-Known Member
Feb 12, 2018
38
3
48
41
So I have a template file called makevm.sh. Inside I have all my qm set and imports to create VMs. It has worked great for a long time, but now I want to add an efi disk so I can change the type of bios. I have the bios now set with qm set 188 --bios ovmf and it works. Then I am trying to add a efi disk with the following command:

qm set VMID --efidisk0: storage:vm-188-disk-2,size=1M

but get the following error:
update VM 188: -efidisk0 storage:vm-188-disk-2,size=1M
rbd error: rbd: error opening image vm-188-disk-2: (2) No such file or directory

Anyone have any suggestions or if I am messing something here?

Thanks for any help!
 
Hi!

There's a bit of a special syntax for creating new disks and assigning them to a VM in one go:
<storage-id>:<size-in-GB-as-float>

As EFI Disks are special disks with a fixed size, it gets double special and you just pass 0 as size, so try:
Bash:
qm set VMID --efidisk0 storage:0
 
Hi!

There's a bit of a special syntax for creating new disks and assigning them to a VM in one go:
<storage-id>:<size-in-GB-as-float>

As EFI Disks are special disks with a fixed size, it gets double special and you just pass 0 as size, so try:
Bash:
qm set VMID --efidisk0 storage:0
I tried to create efi disk with this command (where I replace `VMID` with the actual VMID and `storage` with `vm-VMID-disk0` (because `storage:0` does not works, it says `storage "storage" does not exist` does not exist) but this does not works.

After looking other post on creating normal vm disk, I realise where the problem is: `storage` here refers to any logical volume we want the efi disk to be, not the disk it will be.
 
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!