c# - XenCenter: how can I find the storage repository size of VM? -
i have written c# application gathering xencenter vms , populating database vms information project. looks this
// establish xencenter session session = new session(hostname, 80); // authenticate username , password. third parameter tells server api version support. session.login_with_password(xenusername, xenpassword, api_version.api_1_3); list<xenref<host>> pools = host.get_all(session); foreach (xenref<host> pool in pools) { // records associated specific vm server host host = host.get_record(session, pool); // records associated specific vm server resources. list<xenref<vm>> residentvms = host.resident_vms; foreach (var vm in residentvms) { vm vmrecord = vm.get_record(session, vm); } from vmrecord can data ram size, operation system, description , etc. can't sr (storage repository) size.
thanks in advance.
Comments
Post a Comment