title: azure management libraries virtual machine state
body: <p>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.</p>
  
  <pre><code>var deployment=GetAzureDeyployment("mvwVM",DeploymentSlot.Production);
              if (deployment.Roles.Count&gt;0)
              {
                  foreach (var role in deployment.Roles)
                      if (role.RoleType == VirtualMachineRoleType.PersistentVMRole.ToString())
                      {
                          Console.WriteLine(role.RoleName);
                          Console.WriteLine(role.AvailabilitySetName);
                      }
  </code></pre>
  
  <p>How do I get an individual vm state to go along with the vm name?</p>
  
  <p>Thanks.</p>