From a591eebacbccfef1ac466d41c4650fe210296695 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 17 Nov 2011 13:36:56 +0100 Subject: [PATCH] only raise exception when parameter -force is set --- PVE/API2/Qemu.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 8dfd1a53..91fdf1ad 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1224,7 +1224,8 @@ __PACKAGE__->register_method({ my $vmid = extract_param($param, 'vmid'); - raise_param_exc({ force => "Only root may use this option." }) if $user ne 'root@pam'; + raise_param_exc({ force => "Only root may use this option." }) + if $param->{force} && $user ne 'root@pam'; # test if VM exists PVE::QemuServer::load_config($vmid);