From 8593cbe41cecf49a3446c8e6e611dc30f26c8a81 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 26 Jun 2018 14:15:45 +0200 Subject: [PATCH] add 'passwd' to qm this adds a command 'qm ga passwd' so that we can reuse 'qm ga' for future guest agent calls Signed-off-by: Dominik Csapak --- PVE/CLI/qm.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index cf26943c..736418c5 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm @@ -681,9 +681,11 @@ sub param_mapping { return URI::Escape::uri_escape(PVE::Tools::file_get_contents($_[0])); }]; my $cipassword_map = PVE::CLIHandler::get_standard_mapping('pve-password', { name => 'cipassword' }); + my $password_map = PVE::CLIHandler::get_standard_mapping('pve-password'); my $mapping = { 'update_vm' => [$ssh_key_map, $cipassword_map], 'create_vm' => [$ssh_key_map, $cipassword_map], + 'set-user-password' => [$password_map], }; return $mapping->{$name}; @@ -816,6 +818,10 @@ our $cmddef = { agent => [ "PVE::API2::Qemu::Agent", 'agent', ['vmid', 'command'], { node => $nodename }, $print_agent_result ], + ga => { + passwd => [ "PVE::API2::Qemu::Agent", 'set-user-password', [ 'vmid', 'username' ], { node => $nodename }], + }, + mtunnel => [ __PACKAGE__, 'mtunnel', []], nbdstop => [ __PACKAGE__, 'nbdstop', ['vmid']],