Skip to content

Commit 1f32e4b

Browse files
authored
xapi_vm_clone: Remove impossible, confusing case when dealing with suspend VDIs (#6704)
This case was impossible due to 2 reasons: 1. the polymorphic variant `Runnning used had a typo 2. the reference for the suspend VDI is only present when the VM is suspended, and otherwise is Ref.null. This means that when the VM is running, the code takes the case before this one. I didn't see any code dealing with shared suspend images, so I'd rather avoid making the clone and deal with the shared situation.
2 parents 350363f + c27c61d commit 1f32e4b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

ocaml/xapi/xapi_vm_clone.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,6 @@ let clone ?snapshot_info_record ?(ignore_vdis = []) disk_op ~__context ~vm
507507
let original = Db.VM.get_suspend_VDI ~__context ~self:vm in
508508
if original = Ref.null || disk_op = Disk_op_snapshot then
509509
Ref.null
510-
else if disk_op = Disk_op_checkpoint && power_state = `Runnning
511-
then
512-
original
513510
else
514511
clone_single_vdi rpc session_id disk_op ~__context original
515512
driver_params

0 commit comments

Comments
 (0)