5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-08 21:18:03 +03:00

version_guard scsi drive count

Live-migrating a VM with more than 14 SCSI disks to a node that doesn't
support it yet is broken. Use a bumped pve-version to represent that and
give the user a nice error message instead.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2020-02-10 16:05:36 +01:00 committed by Thomas Lamprecht
parent ac0077cc33
commit b8fb1c03c3
2 changed files with 4 additions and 1 deletions

View File

@ -3931,6 +3931,9 @@ sub config_to_command {
my ($maxdev, $controller, $controller_prefix) = scsihw_infos($conf, $drive);
die "scsi$drive->{index}: machine version 4.1~pve2 or higher is required to use more than 14 SCSI disks\n"
if $drive->{index} > 13 && !&$version_guard(4, 1, 2);
$pciaddr = print_pci_addr("$controller_prefix$controller", $bridges, $arch, $machine_type);
my $scsihw_type = $scsihw =~ m/^virtio-scsi-single/ ? "virtio-scsi-pci" : $scsihw;

View File

@ -9,7 +9,7 @@ use PVE::QemuServer::Monitor;
# Bump this for VM HW layout changes during a release (where the QEMU machine
# version stays the same)
our $PVE_MACHINE_VERSION = {
'4.1' => 1,
'4.1' => 2,
};
sub machine_type_is_q35 {