Have been using the Azure Management Libraries for a few weeks now, but am having trouble obtaining the state (or status) of multiple virtual machines in the same cloud service. I can grab a list of the virtual machines, but cannot find a property the shows the individual vm state. So far, all I can find is the state of the parent cloud service.
var deployment=GetAzureDeyployment("mvwVM",DeploymentSlot.Production);
if (deployment.Roles.Count>0)
{
foreach (var role in deployment.Roles)
if (role.RoleType == VirtualMachineRoleType.PersistentVMRole.ToString())
{
Console.WriteLine(role.RoleName);
Console.WriteLine(role.AvailabilitySetName);
}
How do I get an individual vm state to go along with the vm name?
Thanks.