vCenter

 View Only
  • 1.  Need answer for this interview question where

    Posted Apr 22, 2014 11:41 AM

    Hi All,

    Consider we have 2 ESXi hosts added to the cluster with no HA & DRS enabled. If one of the hosts goes down how will you get the list of VMs which was built on the failed ESXi host to recover on the other active host ?



  • 2.  RE: Need answer for this interview question where
    Best Answer

    Posted Apr 22, 2014 03:38 PM

    Your cluster inventory is in a backend SQL Database, you can directly query the SQL DB....

    --Get RAW data for all VM's...

    SELECT     v.NAME, v.DNS_NAME, v.IP_ADDRESS, v.MEM_SIZE_MB, v.NUM_VCPU, v.GUEST_OS, v.DESCRIPTION, v.ANNOTATION, v.VMID, f.FIELDVALUE

    FROM         VPXV_VMS AS v LEFT OUTER JOIN

                          VPXV_VM_FIELDS AS f ON v.VMID = f.VMID AND f.FIELDID = 142

    ORDER BY v.NAME

    Anyone correct me if I'm wrong but, normally vCenter will show the VM's grey'd out.



  • 3.  RE: Need answer for this interview question where

    Posted Apr 22, 2014 04:15 PM

    Thanks Cos :-) Also can you tell me how you will recover those VMs manually at another host.




  • 4.  RE: Need answer for this interview question where

    Posted Apr 22, 2014 04:27 PM

    If I may, after such a failure, you'd need to register the failed VMs on the remaining host.  To do this, you'd have to remove any remnants of the VMs from vCenter - as COS mentioned, they're probably grayed out and listed as inaccessible.  Right-click them and select Remove from Inventory.

    To add them to the surviving host, the easiest way is to use the datastore browser.  Right click the datastores where the failed VMs live and choose Browse Datastore...

    Enter the folder of the failed VMs, find the .vmx file, right-click it and choose Add to Inventory...go through the wizard and choose the remaining host.

    You should see it show up in the inventory ready to power on.

    - Mike

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

    Please consider marking this answer "correct" or "helpful" if you found it useful.

    Mike Brown

    VMware, Cisco Data Center, and NetApp dude

    Consulting Engineer

    michael.b.brown3@gmail.com

    Twitter: @VirtuallyMikeB

    Blog: http://VirtuallyMikeBrown.com

    LinkedIn: http://LinkedIn.com/in/michaelbbrown



  • 5.  RE: Need answer for this interview question where

    Posted Apr 22, 2014 04:39 PM

    Yup, What Mike Brown said! :smileyhappy:

    "Right-click them and select Remove from Inventory.

    To add them to the surviving host, the easiest way is to use the datastore browser.  Right click the datastores where the failed VMs live and choose Browse Datastore..."

    That is of course they (the VM's) are on a shared disk subsystem where both ESXi Hosts has/had acces to as the "Datastore".



  • 6.  RE: Need answer for this interview question where

    Posted Apr 22, 2014 04:01 PM

    Seems to me with only 2 hosts and no HA, you could simply look at an Excel list to see which VMs are not running. 

    If that's not high-tech enough, then you can use Alan Renouf's vCheck script.  It can be configured to provide only the information you want, like which VMs are running where, and email the output to you every morning.  With no DRS, you won't have to worry so much that VMs are moving around and your emailed list being out of date.  Also, vCheck can be scheduled to run throughout the day and send emails so you'll simply look at the latest email and compare to which VMs are still running.

    If that's still not good enough, you can create an Orchestrator workflow to do the same as the vCheck script.

    Or you could create a PowerCLI script to do the same.

    Larger environments would need more automation, but we're talking two hosts.  The Excel sheet would likely be just fine.

    All the best,

    Mike

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

    Please consider marking this answer "correct" or "helpful" if you found it useful.

    Mike Brown

    VMware, Cisco Data Center, and NetApp dude

    Consulting Engineer

    michael.b.brown3@gmail.com

    Twitter: @VirtuallyMikeB

    Blog: http://VirtuallyMikeBrown.com

    LinkedIn: http://LinkedIn.com/in/michaelbbrown