[pve-devel] applied: [PATCH qemu-server] fix #1697: only check machine type for pxe

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Apr 13 14:42:34 CEST 2018


applied

I wonder if there are cases where the pxe machine type is actually still
required - since pxe does seem to work fine without that setting...

On Fri, Apr 13, 2018 at 11:59:08AM +0200, Dominik Csapak wrote:
> 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 <d.csapak at proxmox.com>
> ---
>  PVE/QemuServer.pm | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 315073f..7e58e6a 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;
> -- 
> 2.11.0



More information about the pve-devel mailing list