Skip to content

Commit 3fe01ff

Browse files
authored
Merge pull request #755 from xapi-project/private/bensi/CA-334758
CA-334758 - Allow plug of vbds for sds vms
2 parents a3e971b + 616f9bf commit 3fe01ff

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/xenops_server.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ let get_backend () =
5656
| None ->
5757
failwith "No backend implementation set"
5858

59+
let dom0_uuid = ref ""
60+
61+
let set_dom0_uuid uuid = dom0_uuid := uuid
62+
5963
let ignore_exception msg f x =
6064
try f x
6165
with Xenopsd_error e ->
@@ -353,7 +357,7 @@ module VBD_DB = struct
353357
(Jsonrpc.to_string (rpc_of Vbd.t x)) ;
354358
(* Only if the corresponding VM actually exists *)
355359
let vm = vm_of x.id in
356-
if not (VM_DB.exists vm) then (
360+
if not (VM_DB.exists vm || vm = !dom0_uuid) then (
357361
debug "VM %s not managed by me" vm ;
358362
raise (Xenopsd_error (Does_not_exist ("VM", vm)))
359363
) ;

xc/xenops_xc_main.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ let check_domain0_uuid () =
2222
Inventory.update Inventory._control_domain_uuid uuid ;
2323
uuid
2424
in
25+
Xenops_server.set_dom0_uuid uuid ;
2526
Xenctrl.domain_sethandle xc 0 uuid ;
2627
(* make the minimum entries for dom0 *)
2728
let kvs =

0 commit comments

Comments
 (0)