This allows to specify an efidisk during create without specifying
boot order.  This enables creating a VM, importing a disk and
afterwards deciding where to attach it:

qm create 102 --bios ovmf --efidisk0 local:0
qm importdisk 102 /root/Windows10.vmdk local
qm set 102 --sata0 local:102/vm-102-disk-1.raw --boot order=sata0

Reported-by: Dominic Jäger <d.jae...@proxmox.com>
Authored-by: Stefan Reiter <s.rei...@proxmox.com>
Signed-off-by: Dominic Jäger <d.jae...@proxmox.com>
---
 PVE/QemuServer/Drive.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index d560937..bb3e990 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -605,6 +605,7 @@ sub resolve_first_disk {
     my @disks = valid_drive_names();
     foreach my $ds (@disks) {
        next if !$conf->{$ds};
+       next if $ds =~m/^efidisk/;
        my $disk = parse_drive($ds, $conf->{$ds});
        next if drive_is_cdrom($disk) xor $cdrom;
        return $ds;
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to