diff --git a/XenModel/XenAPI-Extensions/Host.cs b/XenModel/XenAPI-Extensions/Host.cs index 1457bdbe7..d3b56a127 100644 --- a/XenModel/XenAPI-Extensions/Host.cs +++ b/XenModel/XenAPI-Extensions/Host.cs @@ -1137,7 +1137,7 @@ namespace XenAPI if (Connection == null) return null; - if (Helpers.DundeePlusOrGreater(Connection)) + if (!Helper.IsNullOrEmptyOpaqueRef(control_domain)) return Connection.Resolve(control_domain); var vms = Connection.ResolveAll(resident_VMs); @@ -1166,7 +1166,7 @@ namespace XenAPI var vms = Connection.ResolveAll(resident_VMs); - if (Helpers.DundeePlusOrGreater(Connection)) + if (!Helper.IsNullOrEmptyOpaqueRef(control_domain)) return vms.Where(v => v.is_control_domain && v.opaque_ref != control_domain); return vms.Where(v => v.is_control_domain && v.domid != 0); diff --git a/XenModel/XenAPI-Extensions/VM.cs b/XenModel/XenAPI-Extensions/VM.cs index 3b3fd9219..f7345d3c7 100644 --- a/XenModel/XenAPI-Extensions/VM.cs +++ b/XenModel/XenAPI-Extensions/VM.cs @@ -1490,7 +1490,7 @@ namespace XenAPI if (host == null) return false; - if (Helpers.DundeePlusOrGreater(Connection)) + if (!Helper.IsNullOrEmptyOpaqueRef(host.control_domain)) return host.control_domain == opaque_ref; var vms = Connection.ResolveAll(host.resident_VMs);