Exemplo n.º 1
0
Arquivo: SR.cs Projeto: 00mjk/xenadmin
        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);
        }