1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #4913: Persistent disks in a VM instantiated as persistent should not be detached in tm mvds

This commit is contained in:
mcabrerizo 2017-04-18 08:05:04 +02:00
parent c78a121de6
commit c3a45e28d7

View File

@ -64,7 +64,9 @@ begin
vm.one_item = one_vm
vm.detach_disk(disk) if !vm.has_snapshots?
# Don't detach persistent disks if the VM has snapshots,
# or the instantiate to persistent is used
vm.detach_disk(disk) if !vm.has_snapshots? && !vm.instantiated_as_persistent?
rescue Exception => e
STDERR.puts "Error detaching virtual disk #{disk_id} from vm #{vmid}."\