Automation

 View Only
  • 1.  How to find which VMs stopping the maint mode of a hosts ? And why ?

    Posted Apr 20, 2014 11:08 PM

    Hi all,

    I put 8 odd of my servers in maint mode, 4 got stuck. I have to go manually check them by going in vm tab & try to re-run the migration manually.

    can i get a script which will tell which vm coz the stuck ? Also possibly why ?  I kind a given a try .. but not sure what to use in the "????"

    Also found for "get-vievent" below relevant again not sure ..

       TypeName: VMware.Vim.EnteredMaintenanceModeEvent

    Name                 MemberType Definition

    ----                 ---------- ----------

    Equals               Method     bool Equals(System.Object obj)

    GetHashCode          Method     int GetHashCode()

    GetType              Method     type GetType()

    ToString             Method     string ToString()

    ChainId              Property   System.Int32 ChainId {get;set;}

    ChangeTag            Property   System.String ChangeTag {get;set;}

    ComputeResource      Property   VMware.Vim.ComputeResourceEventArgument ComputeResource {get;set;}

    CreatedTime          Property   System.DateTime CreatedTime {get;set;}

    Datacenter           Property   VMware.Vim.DatacenterEventArgument Datacenter {get;set;}

    Ds                   Property   VMware.Vim.DatastoreEventArgument Ds {get;set;}

    Dvs                  Property   VMware.Vim.DvsEventArgument Dvs {get;set;}

    DynamicProperty      Property   VMware.Vim.DynamicProperty[] DynamicProperty {get;set;}

    DynamicType          Property   System.String DynamicType {get;set;}

    FullFormattedMessage Property   System.String FullFormattedMessage {get;set;}

    Host                 Property   VMware.Vim.HostEventArgument Host {get;set;}

    Key                  Property   System.Int32 Key {get;set;}

    Net                  Property   VMware.Vim.NetworkEventArgument Net {get;set;}

    UserName             Property   System.String UserName {get;set;}

    Vm                   Property   VMware.Vim.VmEventArgument Vm {get;set;}

    Get-VM -Location xxx  | Get-VIEvent  -MaxSamples ([int]::MaxValue) -Start (Get-Date).adddays(-1) | `

    where {$_.???????????  "Unable to automatically migrate from" } |select @{???}

    Thanks



  • 2.  RE: How to find which VMs stopping the maint mode of a hosts ? And why ?

    Posted Apr 21, 2014 09:31 AM

    What is the reason these VM are blocking maintenance mode ?

    Is it because they have a CD/DVD mounted ?

    If yes, have a look at Better ESX Maintenance Mode with PowerShell



  • 3.  RE: How to find which VMs stopping the maint mode of a hosts ? And why ?

    Posted Apr 24, 2014 06:20 AM

    cd rom, local iso mapped,  scsi bus sharing, OS in local FS,... i seen these some of the resons .. may a consolidated script to take into account all such major issues would have helped.