Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper (>= 7.0.50~),
libpve-common-perl,
- libpve-guest-common-perl | libpve-common-perl (<= 4.0-89),
+ libpve-guest-common-perl (>= 2.0-19),
libpve-storage-perl,
libtest-mockmodule-perl,
lxc (>= 3.0.2-1) | lxc-pve (>= 3.0.1+pve1-1),
properties => {
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_ctid }),
+ snapshot => get_standard_option('pve-snapshot-name', {
+ description => "Fetch config values from given snapshot.",
+ optional => 1,
+ completion => sub {
+ my ($cmd, $pname, $cur, $args) = @_;
+ PVE::LXC::Config->snapshot_list($args->[0]);
+ },
+ }),
},
},
returns => {
my $conf = PVE::LXC::Config->load_config($param->{vmid});
+ my $snapname = $param->{snapshot};
+ if ($snapname) {
+ my $snapshot = $conf->{snapshots}->{$snapname};
+ die "snapshot '$snapname' does not exist\n"
+ if !defined($snapshot);
+
+ # we need the digest of the file
+ $snapshot->{digest} = $conf->{digest};
+ $conf = $snapshot;
+ }
+
delete $conf->{snapshots};
return $conf;