Skip to content

Commit

Permalink
Merge pull request #5632 from minglumlu/private/mingl/CA-392836
Browse files Browse the repository at this point in the history
CA-392836,CA-392847: Lost the power state on suspended VM import
  • Loading branch information
robhoes authored May 21, 2024
2 parents 772b6cb + db31267 commit a0a1e72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ocaml/xapi/import.ml
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,6 @@ module VM : HandlerTools = struct
~domain_type:vm_record.API.vM_domain_type
~is_a_template:vm_record.API.vM_is_a_template
vm_record.API.vM_platform
; API.vM_suspend_VDI= Ref.null
; API.vM_power_state= `Halted
}
in
let vm =
Expand All @@ -642,7 +640,11 @@ module VM : HandlerTools = struct
Db.VM.set_uuid ~__context ~self:vm ~value:value.API.vM_uuid ;
vm
)
vm_record
{
vm_record with
API.vM_suspend_VDI= Ref.null
; API.vM_power_state= `Halted
}
in
state.cleanup <-
(fun __context rpc session_id ->
Expand Down

0 comments on commit a0a1e72

Please sign in to comment.