[pve-devel] [PATCH qemu-server v2 3/3] add qm command for cloudinit config dump

Mira Limbeck m.limbeck at proxmox.com
Wed Jun 5 11:09:43 CEST 2019


Adds the command 'qm cloudinit dump <vmid> <type>' where type is either
'user', 'network' or 'meta' as specified in the API.

Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
 PVE/CLI/qm.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index 87b97ce..d241c8b 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -1019,6 +1019,13 @@ our $cmddef = {
 
     cleanup => [ __PACKAGE__, 'cleanup', ['vmid', 'clean-shutdown', 'guest-requested'], { node => $nodename }],
 
+    cloudinit => {
+	dump => [ "PVE::API2::Qemu", 'cloudinit_generated_config_dump', ['vmid', 'type'], { node => $nodename }, sub {
+		my $data = shift;
+		print "$data\n";
+	    }],
+    },
+
 };
 
 1;
-- 
2.11.0





More information about the pve-devel mailing list