File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 534
534
<description >A Failure occurred accessing an API object</description >
535
535
<value >153</value >
536
536
</code >
537
+ <code >
538
+ <name >APIProtocolError</name >
539
+ <description >A protocol error was received when accessing the API</description >
540
+ <value >154</value >
541
+ </code >
537
542
538
543
<!-- Netapp Specific Error codes -->
539
544
<code >
Original file line number Diff line number Diff line change @@ -76,7 +76,9 @@ type config = {
76
76
let is_live config =
77
77
match config.import_type with Metadata_import {live; _} -> live | _ -> false
78
78
79
- let needs_cpu_check config =
79
+ let needs_cpu_check config vm_record =
80
+ vm_record.API. vM_power_state <> `Halted
81
+ &&
80
82
match config.import_type with
81
83
| Metadata_import {check_cpu; _} ->
82
84
check_cpu
@@ -519,7 +521,7 @@ module VM : HandlerTools = struct
519
521
| Replace (_ , vm_record ) | Clean_import vm_record ->
520
522
if is_live config then
521
523
assert_can_live_import __context vm_record ;
522
- ( if needs_cpu_check config then
524
+ ( if needs_cpu_check config vm_record then
523
525
let vmm_record =
524
526
find_in_export
525
527
(Ref. string_of vm_record.API. vM_metrics)
Original file line number Diff line number Diff line change @@ -1194,7 +1194,6 @@ let migrate_send' ~__context ~vm ~dest ~live:_ ~vdi_map ~vif_map ~vgpu_map
1194
1194
We look at the VDIs of the VM, the VDIs of all of the snapshots, and any
1195
1195
suspend-image VDIs. *)
1196
1196
let vm_uuid = Db.VM. get_uuid ~__context ~self: vm in
1197
- let power_state = Db.VM. get_power_state ~__context ~self: vm in
1198
1197
let vbds = Db.VM. get_VBDs ~__context ~self: vm in
1199
1198
let vifs = Db.VM. get_VIFs ~__context ~self: vm in
1200
1199
let snapshots = Db.VM. get_snapshots ~__context ~self: vm in
@@ -1466,6 +1465,7 @@ let migrate_send' ~__context ~vm ~dest ~live:_ ~vdi_map ~vif_map ~vgpu_map
1466
1465
)
1467
1466
vgpu_map
1468
1467
in
1468
+ let power_state = Db.VM. get_power_state ~__context ~self: vm in
1469
1469
inter_pool_metadata_transfer ~__context ~remote ~vm ~vdi_map
1470
1470
~vif_map ~vgpu_map ~dry_run: false ~live: true ~copy
1471
1471
~check_cpu: ((not force) && power_state <> `Halted )
You can’t perform that action at this time.
0 commit comments