Showing posts with label vCenter uptime. Show all posts
Showing posts with label vCenter uptime. Show all posts

Sunday, January 27, 2013

Managing a VMware vCenter Server running on a Virtual Machine!!

Just wanted to share a couple of pointers which came up during a vSphere design review process for a customer. This is in reference with VMware vCenter Physical vs. Virtual. I have written about this topic before in one of my posts (VMware vCenter Server - Physical vs. Virtual).

During my discussions there were arguments around tracking of the vCenter Virtual machine in a big environment and getting on to it for troubleshooting in case the vCenter Server service or the VM is down can be a little time consuming.

Therefore, some of the organizations prefer a physical vCenter to have more control and a single point to look at and troubleshoot in case of issues. I would say this has more to do with comfort and mindset of the admin, that the application managing the virtual environment itself is not virtual and isolated from the virtual infrastructure.

I would not say that these points are not valid, since no one would like to search for there vCenter VM in case of vCenter downtimes. If you have not planned the initial placement of the vCenter VM, then you might end up logging on to each ESXi server directly via vSphere Client and search for your vCenter VM. This can be a cumbersome and time consuming process. This might actually affect services such as VMware view or vCloud Director for a longer duration in case of vCenter Downtimes, given that you do not use vCenter Heartbeat in your infrastructure.

There are a couple of things which every vSphere Design with a Virtual vCenter should consider:-

a) Separate Management Cluster - In slightly bigger setups where you might end up having multiple clusters of ESXi servers and multiple different management virtual machines, such as storage management appliances, vCloud director or SRM machines, you should have a separate management cluster of 2 to 3 ESXi servers (size them as per your requirement). Here is where you place for vCenter Server as well. Isolated from your production environment and also easy to track and troubleshoot in case of vCenter server   fails due to any issues.

b) DRS rules for vCenter VM - You may or may not have the liberty of creating a separate management cluster. However, it is absolutely recommended to use DRS rules to control the placement of your vCenter Virtual Machine. 

You should use the DRS rule of "Virtual Machine to Hosts" in order to place the vCenter VM on the FIRST host of the FIRST Cluster in your vCenter. This is possible with the DRS rules and this will ensure that your vCenter server is always running on the same ESXi server and only in case of that ESXi server failing, the VM powers onto the next host in the cluster using vSphere HA. This method will ensure that you have only one ESXi server to look at in case your vCenter Server is acting up and you can trace the VM easily.

This is how you can achieve this:-

1- Right click on the first cluster of your vCenter Server (Assuming vCenter VM is a part of this cluster).
2- Click on Edit Settings.
3- Under DRS > Click Rules > Add.
4- Click the DRS Groups Manager tab.
5- Click Add under Host DRS Groups to create a new Host DRS Group containing the first host of the cluster.
6- Click Add under Virtual Machine DRS Groups to create a Virtual Machine DRS Group for the vCenter VM
7- Click the Rule tab, from the Type drop-down menu, click Virtual Machines to Hosts.
9- Select the Virtual Machine DRS Group which you created in the previous steps and the Host Groups which you created and you are done.

After saving this setting the vCenrer VM will automatically migrate to the host which you selected using vMotion and would stay there, making it easy and simple for you to locate in case of vCenter downtime.

Just for a recap here are the settings:-

DRS Groups Manager
Specification
Virtual Machine Group Name
 <vCenter VM Name>
Virtual Machine Group Member
<vCenter VM>
Host DRS Group Name
<First ESXi Hostname in Cluster>
Host DRS Group Member
<First ESXi Host in Cluster>
Rules
Specification
Name
 <vCenter VM Name> on <ESXi Hostname>
Type
 Virtual Machines to Hosts
Cluster VM Group
<Virtual Machine Group Name>
Rule
Should run on hosts in group
Cluster Host Group
<Host DRS Group Name>



Last but not the least you need to ensure that you keep the Virtual Machine Restart Policy for vCenter Server in case of an HA event, as the highest priority so that the vCenter VM is up as soon as possible.

Note:- Another important factor which I would like to put across at this time is a best practice which I read about in the following book  - "VMware vSphere 5.0 Clustering Technical Deepdive" by Duncan Epping and Frank Denneman. (An awesome and a must read).

Duncan and Frank in there book mentioned a valid point:-

"Although HA is configured by vCenter and exchanges virtual machine state information with HA, vCenter is not involved when HA responds to failure. It is comforting to know that in case of a host failure containing the virtualized vCenter Server, HA takes care of the failure and restarts the vCenter Server on another host, including all other configured virtual machines from that failed host.

There is a corner case scenario with regards to vCenter failure: if the ESXi hosts are so called “stateless hosts” and Distributed vSwitches are used for the management network, virtual machine restarts will not be attempted until vCenter is restarted. For stateless environments, vCenter and Auto Deploy availability is key as the ESXi hosts literally depend on them."

Hence, it is important you ensure that vCenter comes back up on high priority in case of an HA event. This will get the management network going in case of a Distributed vSwitch and Auto Deploy to work... However with vSphere 5.1, you do have an option to boot the ESXi server with a backup copy of ESXi which you can save on the local drive if available on the server.

Hopefully the above illustrations would be good enough for you to go ahead and Virtualize your vCenter and also have control over the application.


Saturday, September 29, 2012

Providing Protection & High Availability to a VMware vCenter Server..

vCenter being the heart of a virtual infrastructure can be considered as one of the most important piece of the puzzle. I have had numerous discussions with customers, colleagues and VMware partners about the importance of vCenter Availability and the options to protect the vCenter to improve the up-time and mitigate any risks around losing the control of your Virtual Infrastructure.

This article is to ensure that we document all the available scenarios and options and help others to take decisions around improving the availability of VMware vCenter. I am sure there would still be some scenarios out there which I might have missed, and would be happy to discuss them through the "Comments" section of this post.... So feel free to share your thoughts!!!

Alright let's begin.....

First of all lets start with a few basic questions to clear the fog around the role of VMware vCenter Server (I am doing this for the new kids on the block..)

What is vCenter Server?

Virtual Center provides a centralized and extensible platform for managing virtual infrastructure. VMware vCenter Server, formerly VMware VirtualCenter, manages VMware vSphere environments allowing IT administrators simple and automated control over the virtual environment to deliver infrastructure with confidence. More Details can be found here.


vCenter Should be Virtual or Physical?

Yes your vCenter is an application which can be installed on Virtual Machine as well.. Read my post on this topic - VMware vCenter Server - Physical vs. Virtual. This should tell you what is the best option for your environment.


vCenter Server (Windows Based) or vCenter Server Appliance a.k.a VCSA (Linux Based)?

For Linux lovers vCenter is not restricted to Windows anymore, you can also get a Linux based appliance from VMware. I have written a post about "Choosing the Platform for your Virtual Center. vCenter Server Appliance(vCSA-Linux) vs vCenter (Windows)"!! I would recommend you read this to understand which is a better option for your environment.


Whether its Physical or Virtual, Linux Based Appliance or Windows Based, it is important that we protect the virtual center so that we do not lose control of the ESXi servers and the virtual machines which run the business applications. Let us quickly look at the options to protect both vCenter Server (Windows Based) & vCenter Server Appliance a.k.a VCSA (Linux Based)...




Great, so now we have the methods available in the table... Lets dissect them one at a time to see what each option has to offer.

Option 1 - Use VMware vSphere HA  - If your vCenter is a Virtual Machine you can place the vCenter Virtual Machine in the VMware HA cluster. HA will protect the vCenter Virtual machine just like any other virtual machine. If the ESXi server which is running the vCenter VM goes down, HA will kick-in and power on this VM from the shared storage, on another HA cluster member host. The only downtime in this case would be the time taken to reboot the vCenter VM. Pretty cool, right!! I appreciate this from VMware...


Option 2 - Cold/Standby vCenter - This is a poor man's HA and I have seen customer's use this configuration, especially the one who have the vCenter as a physical server and cannot use vSphere HA. The  architecture of this deployment, needs you to have a remote database for vCenter application. You have 2 servers with same version of vCenter application installed. In case the first one goes down, you power on the other server which connects to the same database and hence pulls up all the configuration. This method surely works but needs human intervention. Hence if you vCenter goes down in the middle of the night when your backups are happening using VADP, your backups would fail and you would not be able to fix this unless you come back in the morning and see the damage......


Option 3 - Using vCenter Heartbeat - vCenter Heartbeat is a high availability solution for vCenter Server which protects the vCenter against OS, Application, Database(SQL), Configuration, Networking or Hardware failures. Yup it also protects the SQL database and can be installed across sites as well (remote location). The beauty is that if you have a Heartbeat license, you would only need one vCenter license for both Primary and Failover site. You should be able to get more information about Heartbeat on the following link.

The reason I have highlighted this option in the above table is due to a reason. Heartbeat comes with a cost and I would highly recommend this option for environments where vCenter up-time is critical. Environments with VMware View, VMware vCloud Director or wherever vCenter APIs are used, the availability of vCenter Server defines the availability of these services. Hence if these services are important vCenter should be given protection using vCenter Heartbeat.


Option 4 - Third party Solutions to Protect vCenter Server - There are a number of options available to name some, configure MSCS for vCenter windows based server, Neverfail etc. can help you protect vCenter Server.


Since, vCenter needs a minimum of 2 vCPU's we cannot use VMware FT to protect this virtual machine. However, I am sure VMware would look at supporting VMware FT with SMP (symmetric multi-processing), which would give another option to customers to protect vCenter Server and ensure they have full control and manageability for their VMware Virtual Environments.

Feel free to share your thoughts around this topic and I hope this helps you design your vCenter with the best suited options for your VMware environments.