From: Dominik Csapak Date: Fri, 13 Apr 2018 09:59:08 +0000 (+0200) Subject: fix #1697: only check machine type for pxe X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3807f3e4ee72cf73a3412cd6e2418315b3ddab66;p=qemu-server.git fix #1697: only check machine type for pxe it is not necessary to check the romfile of the running vm for .pxe machine types, since the machine type itself is not hot-pluggable Signed-off-by: Dominik Csapak --- diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 54e2e66..7e531b0 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6464,13 +6464,8 @@ sub qemu_machine_pxe { $machine = PVE::QemuServer::get_current_qemu_machine($vmid) if !$machine; - foreach my $opt (keys %$conf) { - next if $opt !~ m/^net(\d+)$/; - my $net = PVE::QemuServer::parse_net($conf->{$opt}); - next if !$net; - my $romfile = PVE::QemuServer::vm_mon_cmd_nocheck($vmid, 'qom-get', path => $opt, property => 'romfile'); - return $machine.".pxe" if $romfile =~ m/pxe/; - last; + if ($conf->{machine} && $conf->{machine} =~ m/\.pxe$/) { + $machine .= '.pxe'; } return $machine;