]>
git.proxmox.com Git - qemu-server.git/commitdiff
projects
/
qemu-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90b0c6b
)
forbid vm_start if current config is a template.
author
Alexandre Derumier
<aderumier@odiso.com>
Thu, 14 Feb 2013 10:58:53 +0000
(11:58 +0100)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Fri, 15 Feb 2013 06:52:28 +0000
(07:52 +0100)
if files (raw,qcow2) are a template, we forbid vm_start.
note : the readonly protection do already the job, but we need a clear message for users
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm
patch
|
blob
|
blame
|
history
diff --git
a/PVE/QemuServer.pm
b/PVE/QemuServer.pm
index 4a70d7018d383ac653d4a7548e4ecd5e30e74306..e8697b34d3362fe939fa9c97c708e7088953a940 100644
(file)
--- a/
PVE/QemuServer.pm
+++ b/
PVE/QemuServer.pm
@@
-2930,6
+2930,8
@@
sub vm_start {
lock_config($vmid, sub {
my $conf = load_config($vmid, $migratedfrom);
+ die "you can't start a vm if it's a template" if is_template($conf);
+
check_lock($conf) if !$skiplock;
die "VM $vmid already running\n" if check_running($vmid, undef, $migratedfrom);