mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-13 14:56:26 +00:00
implement vm_human_monitor_command using qmp
This commit is contained in:
parent
26f11676c7
commit
9df5cbcc70
@ -2819,6 +2819,19 @@ sub vm_qmp_command {
|
|||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub vm_human_monitor_command {
|
||||||
|
my ($vmid, $cmdline) = @_;
|
||||||
|
|
||||||
|
my $res;
|
||||||
|
|
||||||
|
my $cmd = {
|
||||||
|
execute => 'human-monitor-command',
|
||||||
|
arguments => { 'command-line' => $cmdline},
|
||||||
|
};
|
||||||
|
|
||||||
|
return vm_qmp_command($vmid, $cmd);
|
||||||
|
}
|
||||||
|
|
||||||
sub vm_commandline {
|
sub vm_commandline {
|
||||||
my ($storecfg, $vmid) = @_;
|
my ($storecfg, $vmid) = @_;
|
||||||
|
|
||||||
|
2
qm
2
qm
@ -294,7 +294,7 @@ __PACKAGE__->register_method ({
|
|||||||
last if $input =~ m/^\s*q(uit)?\s*$/;
|
last if $input =~ m/^\s*q(uit)?\s*$/;
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
print PVE::QemuServer::vm_monitor_command ($vmid, $input);
|
print PVE::QemuServer::vm_human_monitor_command ($vmid, $input);
|
||||||
};
|
};
|
||||||
print "ERROR: $@" if $@;
|
print "ERROR: $@" if $@;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user