]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuServer.pm
check for $vga->{type} instead of $vga
[qemu-server.git] / PVE / QemuServer.pm
index c3932d038f89d83956b6f305cc0cbc0e1b45a1e8..199cf4695b86af482fc16f0b3eb6e68c1b49c256 100644 (file)
@@ -658,7 +658,7 @@ my $MAX_VIRTIO_DISKS = 16;
 my $MAX_SATA_DISKS = 6;
 my $MAX_USB_DEVICES = 5;
 my $MAX_NETS = 32;
-my $MAX_UNUSED_DISKS = 8;
+my $MAX_UNUSED_DISKS = 256;
 my $MAX_HOSTPCI_DEVICES = 4;
 my $MAX_SERIAL_PORTS = 4;
 my $MAX_PARALLEL_PORTS = 3;
@@ -2016,8 +2016,9 @@ sub print_vga_device {
     my $q35 = machine_type_is_q35($conf);
     my $vgaid = "vga" . ($id // '');
     my $pciaddr;
+
     if ($q35 && $vgaid eq 'vga') {
-       # on is on the pcie.0 bus on q35
+       # the first display uses pcie.0 bus on q35 machines
        $pciaddr = print_pcie_addr($vgaid, $bridges);
     } else {
        $pciaddr = print_pci_addr($vgaid, $bridges);
@@ -3504,7 +3505,7 @@ sub config_to_command {
 
     push @$cmd, '-no-reboot' if  defined($conf->{reboot}) && $conf->{reboot} == 0;
 
-    if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga ne 'none'){
+    if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga->{type} ne 'none'){
        push @$devices, '-device', print_vga_device($conf, $vga, undef, $qxlnum, $bridges);
        my $socket = vnc_socket($vmid);
        push @$cmd,  '-vnc', "unix:$socket,x509,password";
@@ -6906,6 +6907,12 @@ sub generate_smbios1_uuid {
     return "uuid=".generate_uuid();
 }
 
+sub nbd_stop {
+    my ($vmid) = @_;
+
+    vm_mon_cmd($vmid, 'nbd-server-stop');
+}
+
 # bash completion helper
 
 sub complete_backup_archives {
@@ -6979,10 +6986,4 @@ sub complete_storage {
     return $res;
 }
 
-sub nbd_stop {
-    my ($vmid) = @_;
-
-    vm_mon_cmd($vmid, 'nbd-server-stop');
-}
-
 1;