}
next if !defined($conf->{$opt});
if (PVE::QemuServer::valid_drivename($opt)) {
- PVE::QemuServer::vm_devicedel($vmid, $conf, $opt);
+ PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
my $drive = PVE::QemuServer::parse_drive($opt, $conf->{$opt});
if (PVE::QemuServer::drive_is_cdrom($drive)) {
$cdchange->{$opt} = undef;
die "image '$path' does not exists\n";
}
}
- PVE::QemuServer::vm_deviceadd($storecfg, $conf, $vmid, $ds, $disk) if defined($conf);
+ PVE::QemuServer::vm_deviceplug($storecfg, $conf, $vmid, $ds, $disk) if defined($conf);
});
};
return $devices;
}
-sub vm_deviceadd {
+sub vm_deviceplug {
my ($storecfg, $conf, $vmid, $deviceid, $device) = @_;
return if !check_running($vmid) || !$conf->{hotplug} || $conf->{$deviceid};
die "error on hotplug device $deviceid";
}
-sub vm_devicedel {
+sub vm_deviceunplug {
my ($vmid, $conf, $deviceid) = @_;
return if !check_running ($vmid) || !$conf->{hotplug};