[pve-devel] [PATCH qemu-server] api resume: drop nocheck parameter

Thomas Lamprecht t.lamprecht at proxmox.com
Sat May 25 17:09:57 CEST 2019


Once, this was used when transferring the VM state finsihed on a
migration to another node to resume the VM there again, it was called
through SSH using the 'qm resume' command, which bases on this API
call.

As we switched over to a mechanism re-using our "migration tunnel",
which stays open during the whole connection, as command tunnel we
resumed the VM directly from there, omitting an extra SSH connection.

As we _require_ people to upgrade to latest 5.4 before upgrading to
6.0 we can safely drop this now.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/API2/Qemu.pm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index a628a20..3d3802b 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2463,8 +2463,6 @@ __PACKAGE__->register_method({
 	    vmid => get_standard_option('pve-vmid',
 					{ completion => \&PVE::QemuServer::complete_vmid_running }),
 	    skiplock => get_standard_option('skiplock'),
-	    nocheck => { type => 'boolean', optional => 1 },
-
 	},
     },
     returns => {
@@ -2485,8 +2483,6 @@ __PACKAGE__->register_method({
 	raise_param_exc({ skiplock => "Only root may use this option." })
 	    if $skiplock && $authuser ne 'root at pam';
 
-	my $nocheck = extract_param($param, 'nocheck');
-
 	my $to_disk_suspended;
 	eval {
 	    PVE::QemuConfig->lock_config($vmid, sub {
@@ -2496,7 +2492,7 @@ __PACKAGE__->register_method({
 	};
 
 	die "VM $vmid not running\n"
-	    if !$to_disk_suspended && !PVE::QemuServer::check_running($vmid, $nocheck);
+	    if !$to_disk_suspended && !PVE::QemuServer::check_running($vmid);
 
 	my $realcmd = sub {
 	    my $upid = shift;
@@ -2504,7 +2500,7 @@ __PACKAGE__->register_method({
 	    syslog('info', "resume VM $vmid: $upid\n");
 
 	    if (!$to_disk_suspended) {
-		PVE::QemuServer::vm_resume($vmid, $skiplock, $nocheck);
+		PVE::QemuServer::vm_resume($vmid, $skiplock);
 	    } else {
 		my $storecfg = PVE::Storage::config();
 		PVE::QemuServer::vm_start($storecfg, $vmid, undef, $skiplock);
-- 
2.20.1





More information about the pve-devel mailing list