this makes the "pct config" output more complete, the object
returned by the API path contains the lxc options as parsed
by our config parser, e.g.:
"lxc" : [
[
"lxc.cap.keep",
"sys_time"
],
[
"lxc.cap.drop",
"abc"
],
[
"lxc.cap.drop",
""
]
],
my $conf = PVE::LXC::Config->load_config($param->{vmid});
delete $conf->{snapshots};
- delete $conf->{lxc};
return $conf;
}});
my $config = shift;
foreach my $k (sort (keys %$config)) {
next if $k eq 'digest';
+ next if $k eq 'lxc';
my $v = $config->{$k};
if ($k eq 'description') {
$v = PVE::Tools::encode_text($v);
}
print "$k: $v\n";
}
+ if (defined($config->{'lxc'})) {
+ my $lxc_list = $config->{'lxc'};
+ foreach my $lxc_opt (@$lxc_list) {
+ print "$lxc_opt->[0]: $lxc_opt->[1]\n"
+ }
+ }
}],
set => [ 'PVE::API2::LXC::Config', 'update_vm', ['vmid'], { node => $nodename }],