Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid'),
snapname => get_standard_option('pve-snapshot-name'),
node => get_standard_option('pve-node'),
vmid => get_standard_option('pve-vmid'),
snapname => get_standard_option('pve-snapshot-name'),
+ start => {
+ type => 'boolean',
+ description => "Whether the container should get started after rolling back successfully",
+ optional => 1,
+ default => 0,
+ },
my $realcmd = sub {
PVE::Cluster::log_msg('info', $authuser, "rollback snapshot LXC $vmid: $snapname");
PVE::LXC::Config->snapshot_rollback($vmid, $snapname);
my $realcmd = sub {
PVE::Cluster::log_msg('info', $authuser, "rollback snapshot LXC $vmid: $snapname");
PVE::LXC::Config->snapshot_rollback($vmid, $snapname);
+
+ if ($param->{start}) {
+ PVE::API2::LXC::Status->vm_start({ vmid => $vmid, node => $node })
+ }