mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 17:28:24 +00:00
convert eject cdrom monitor command to qmp
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
5a7835f572
commit
ce156282e6
@ -687,11 +687,11 @@ my $vmconfig_update_disk = sub {
|
||||
|
||||
if (PVE::QemuServer::check_running($vmid)) {
|
||||
if ($drive->{file} eq 'none') {
|
||||
PVE::QemuServer::vm_monitor_command($vmid, "eject -f drive-$opt", 0);
|
||||
PVE::QemuServer::vm_mon_cmd($vmid, "eject",force => JSON::true,device => "drive-$opt");
|
||||
} else {
|
||||
my $path = PVE::QemuServer::get_iso_path($storecfg, $vmid, $drive->{file});
|
||||
PVE::QemuServer::vm_monitor_command($vmid, "eject -f drive-$opt", 0); #force eject if locked
|
||||
PVE::QemuServer::vm_monitor_command($vmid, "change drive-$opt \"$path\"", 0) if $path;
|
||||
PVE::QemuServer::vm_mon_cmd($vmid, "eject",force => JSON::true,device => "drive-$opt"); #force eject if locked
|
||||
PVE::QemuServer::vm_mon_cmd($vmid, "change",device => "drive-$opt",target => "$path") if $path;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user