all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] exclude efidisk and tpmstate for boot disk selection
@ 2021-11-15 15:56 Dominik Csapak
  2021-11-15 15:58 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-11-15 15:56 UTC (permalink / raw)
  To: pve-devel

else we cannot create a vm without a disk but with a tpmstate/efidisk,
since the api tries to generate the default bootorder with them included

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/QemuServer/Drive.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 0f9ceba..7b82fb2 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -457,6 +457,10 @@ for (my $i = 0; $i < $MAX_UNUSED_DISKS; $i++) {
     $drivedesc_hash->{"unused$i"} = $unuseddesc;
 }
 
+sub valid_drive_names_for_boot {
+    return grep { $_ ne 'efidisk0' && $_ ne 'tpmstate0' } valid_drive_names();
+}
+
 sub valid_drive_names {
     # order is important - used to autoselect boot disk
     return ((map { "ide$_" } (0 .. ($MAX_IDE_DISKS - 1))),
@@ -697,7 +701,7 @@ sub is_volume_in_use {
 
 sub resolve_first_disk {
     my ($conf, $cdrom) = @_;
-    my @disks = valid_drive_names();
+    my @disks = valid_drive_names_for_boot();
     foreach my $ds (@disks) {
 	next if !$conf->{$ds};
 	my $disk = parse_drive($ds, $conf->{$ds});
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] exclude efidisk and tpmstate for boot disk selection
  2021-11-15 15:56 [pve-devel] [PATCH qemu-server] exclude efidisk and tpmstate for boot disk selection Dominik Csapak
@ 2021-11-15 15:58 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-15 15:58 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 15.11.21 16:56, Dominik Csapak wrote:
> else we cannot create a vm without a disk but with a tpmstate/efidisk,
> since the api tries to generate the default bootorder with them included
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  PVE/QemuServer/Drive.pm | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-15 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 15:56 [pve-devel] [PATCH qemu-server] exclude efidisk and tpmstate for boot disk selection Dominik Csapak
2021-11-15 15:58 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal