mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-07 17:17:57 +03:00
comment out USB hotplug code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
808a65b522
commit
50bbe37787
@ -3709,10 +3709,9 @@ sub vm_deviceplug {
|
|||||||
} elsif ($deviceid =~ m/^usb(\d+)$/) {
|
} elsif ($deviceid =~ m/^usb(\d+)$/) {
|
||||||
|
|
||||||
die "usb hotplug currently not reliable\n";
|
die "usb hotplug currently not reliable\n";
|
||||||
# since we can't reliably hot unplug all added usb devices
|
# since we can't reliably hot unplug all added usb devices and usb
|
||||||
# and usb passthrough disables live migration
|
# passthrough breaks live migration we disable usb hotplugging for now
|
||||||
# we disable usb hotplugging for now
|
#qemu_deviceadd($vmid, PVE::QemuServer::USB::print_usbdevice_full($conf, $deviceid, $device));
|
||||||
qemu_deviceadd($vmid, PVE::QemuServer::USB::print_usbdevice_full($conf, $deviceid, $device));
|
|
||||||
|
|
||||||
} elsif ($deviceid =~ m/^(virtio)(\d+)$/) {
|
} elsif ($deviceid =~ m/^(virtio)(\d+)$/) {
|
||||||
|
|
||||||
@ -3817,11 +3816,10 @@ sub vm_deviceunplug {
|
|||||||
} elsif ($deviceid =~ m/^usb\d+$/) {
|
} elsif ($deviceid =~ m/^usb\d+$/) {
|
||||||
|
|
||||||
die "usb hotplug currently not reliable\n";
|
die "usb hotplug currently not reliable\n";
|
||||||
# when unplugging usb devices this way,
|
# when unplugging usb devices this way, there may be remaining usb
|
||||||
# there may be remaining usb controllers/hubs
|
# controllers/hubs so we disable it for now
|
||||||
# so we disable it for now
|
#qemu_devicedel($vmid, $deviceid);
|
||||||
qemu_devicedel($vmid, $deviceid);
|
#qemu_devicedelverify($vmid, $deviceid);
|
||||||
qemu_devicedelverify($vmid, $deviceid);
|
|
||||||
|
|
||||||
} elsif ($deviceid =~ m/^(virtio)(\d+)$/) {
|
} elsif ($deviceid =~ m/^(virtio)(\d+)$/) {
|
||||||
|
|
||||||
@ -4390,10 +4388,9 @@ sub vmconfig_hotplug_pending {
|
|||||||
}
|
}
|
||||||
} elsif ($opt =~ m/^usb\d+/) {
|
} elsif ($opt =~ m/^usb\d+/) {
|
||||||
die "skip\n";
|
die "skip\n";
|
||||||
# since we cannot reliably hot unplug usb devices
|
# since we cannot reliably hot unplug usb devices we are disabling it
|
||||||
# we are disabling it
|
#die "skip\n" if !$hotplug_features->{usb} || $conf->{$opt} =~ m/spice/i;
|
||||||
die "skip\n" if !$hotplug_features->{usb} || $conf->{$opt} =~ m/spice/i;
|
#vm_deviceunplug($vmid, $conf, $opt);
|
||||||
vm_deviceunplug($vmid, $conf, $opt);
|
|
||||||
} elsif ($opt eq 'vcpus') {
|
} elsif ($opt eq 'vcpus') {
|
||||||
die "skip\n" if !$hotplug_features->{cpu};
|
die "skip\n" if !$hotplug_features->{cpu};
|
||||||
qemu_cpu_hotplug($vmid, $conf, undef);
|
qemu_cpu_hotplug($vmid, $conf, undef);
|
||||||
@ -4467,12 +4464,11 @@ sub vmconfig_hotplug_pending {
|
|||||||
}
|
}
|
||||||
} elsif ($opt =~ m/^usb\d+$/) {
|
} elsif ($opt =~ m/^usb\d+$/) {
|
||||||
die "skip\n";
|
die "skip\n";
|
||||||
# since we cannot reliably hot unplug usb devices
|
# since we cannot reliably hot unplug usb devices we disable it for now
|
||||||
# we are disabling it
|
#die "skip\n" if !$hotplug_features->{usb} || $value =~ m/spice/i;
|
||||||
die "skip\n" if !$hotplug_features->{usb} || $value =~ m/spice/i;
|
#my $d = eval { parse_property_string($usbdesc->{format}, $value) };
|
||||||
my $d = eval { parse_property_string($usbdesc->{format}, $value) };
|
#die "skip\n" if !$d;
|
||||||
die "skip\n" if !$d;
|
#qemu_usb_hotplug($storecfg, $conf, $vmid, $opt, $d, $arch, $machine_type);
|
||||||
qemu_usb_hotplug($storecfg, $conf, $vmid, $opt, $d, $arch, $machine_type);
|
|
||||||
} elsif ($opt eq 'vcpus') {
|
} elsif ($opt eq 'vcpus') {
|
||||||
die "skip\n" if !$hotplug_features->{cpu};
|
die "skip\n" if !$hotplug_features->{cpu};
|
||||||
qemu_cpu_hotplug($vmid, $conf, $value);
|
qemu_cpu_hotplug($vmid, $conf, $value);
|
||||||
@ -5035,10 +5031,10 @@ sub vm_start_nolock {
|
|||||||
my $uuid = PVE::SysFSTools::generate_mdev_uuid($vmid, $i);
|
my $uuid = PVE::SysFSTools::generate_mdev_uuid($vmid, $i);
|
||||||
PVE::SysFSTools::pci_create_mdev_device($pciid, $uuid, $d->{mdev});
|
PVE::SysFSTools::pci_create_mdev_device($pciid, $uuid, $d->{mdev});
|
||||||
} else {
|
} else {
|
||||||
die "can't unbind/bind pci group to vfio '$pciid'\n"
|
die "can't unbind/bind PCI group to VFIO '$pciid'\n"
|
||||||
if !PVE::SysFSTools::pci_dev_group_bind_to_vfio($pciid);
|
if !PVE::SysFSTools::pci_dev_group_bind_to_vfio($pciid);
|
||||||
die "can't reset pci device '$pciid'\n"
|
die "can't reset PCI device '$pciid'\n"
|
||||||
if $info->{has_fl_reset} and !PVE::SysFSTools::pci_dev_reset($info);
|
if $info->{has_fl_reset} && !PVE::SysFSTools::pci_dev_reset($info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user