public bool HasDriverDomain(out VM vm) { foreach (var pbdRef in PBDs) { var pbd = Connection.Resolve(pbdRef); if (pbd != null && pbd.other_config.TryGetValue("storage_driver_domain", out string vmRef)) { vm = Connection.Resolve(new XenRef <VM>(vmRef)); if (vm != null && !vm.IsControlDomainZero(out _)) { return(true); } } } vm = null; return(false); }