Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

nm3

  • Loading branch information...
commit b13179d660336b39fcb128db846d31b302f4dea1 1 parent 2923622
Rob Hoes authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 ocaml/xapi/xen_helpers.ml
9 ocaml/xapi/xen_helpers.ml
View
@@ -54,9 +54,16 @@ let device_of_vbd ~__context ~self =
(** Given a VIF, return a xenops device *)
let device_of_vif ~__context ~self =
let vm = Db.VIF.get_VM ~__context ~self in
+ let backend_domid =
+ let oc = Db.VIF.get_other_config ~__context ~self in
+ if List.mem_assoc "backend" oc then
+ int_of_string (List.assoc "backend" oc)
+ else
+ 0
+ in
let domid = Int64.to_int (Db.VM.get_domid ~__context ~self:vm) in
let devid = Helpers.devid_of_vif ~__context ~self in
- let backend = { Device_common.domid = 0;
+ let backend = { Device_common.domid = backend_domid;
kind = Device_common.Vif;
devid = devid } in
Device_common.device_of_backend backend domid
Please sign in to comment.
Something went wrong with that request. Please try again.