Wednesday, October 12, 2016

vCenter Server for Windows and vCSA compared

The most glaring difference, as the name implies, is that vCenter Server for Windows will only run on a Microsoft Server operating system.. On the other hand, vCSA is a SuSe Linux Enterprise Server 64-bit based appliance which comes lock, stock and barrel ready for importation.
The second important difference is related to vSphere Update Manager (VUM) which, as you probably know, can be installed alongside on the same server running vCenter Server for Windows. Unfortunately the same does not apply to vCSA meaning that you’d still be needing a Windows box if your plans include deploying VUM. My prediction is that vCSA – VUM integration will be made available a couple of updates down the line. Failing that, it will be addressed in the next major release.
Thirdly, your database options are limited to the following:
  • vCenter Server for Windows – you can either install the bundled PostgreSQL database for environments with no more than 20 hosts and 200 virtual machines or in the case of larger environments, use a Microsoft SQL or Oracle DBMS.
  • vCSA – The bundled PostgreSQL database which now supports environments of up to 1000 hosts and 10,000 virtual machines. This will probably suffice for most scenarios but if need be, you can still use an external Oracle DBMS.

Similarities between vCenter Server for Windows and vCSA

  • The hardware requirements are identical to both. Figure 1, reproduced from VMware’s documentation, specifies the minimum CPU and Memory requirements according to the environment size.
Figure 1 – vCenter Server Minimum Hardware Requirements

  • Both can be managed with the traditional vSphere or web based client. In the case of vCSA you can also SSH to it or use the Direct Console User Interface to change stuff such as the root password and network settings (pretty much like you would do on an ESXi host). With the release of vCenter Server 6.0 Update 1 it is now possible to administer vCSA using the newly released HTML 5 based Appliance Management User Interface. One great feature is the ability to patch / upgrade vCSA using an ISO image or URL based patching.
Figure 2 – Appliance Management User Interface

  • At last, and I emphasize this as in the past vCSA presented some serious scalability limitations preventing a more thorough uptake, both flavors enjoy the same set of scalability metrics. These are listed by way of Figure 3 reproduced from the “What’s New in the VMware vSphere 6.0 Platform” whitepaper.
Figure 3 – vCenter Server Scalability Numbers

Weighing advantages and disadvantages

vCSA Pros
  • Quicker to deploy since everything is preconfigured and you don’t need to install anything apart from running the actual installer, supplying a couple of details and sipping tea as you sit back watching it do its thing.
  • The bundled database is scalable enough to cater for most environments unless of course you’re planning on deploying 1000+ hosts and/or 10000+ vms.
  • You do not need separate licenses for Microsoft Windows Server so overall this might turn out to be a cheaper option.
  • From a security perspective, vCSA traditionally presents a smaller attack surface since it runs on Linux though it should be said that Microsoft have upped their ante considerably in this department.
vCSA Cons
  • As with many appliances vCSA is somewhat of a black-box. You’ll be needing some intermediate Linux skills when troubleshooting or VMware support when things go dark.
  • You still need to have a separate Windows box on which to install and run VUM.
vCenter Server for Windows Pros
  • In my opinion it’s easier to troubleshoot vCenter Server for Windows if anything due to a larger user-base and the fact that fixing Windows related issues is generally easier, from my experience at least.
  • VUM can be happily installed on the same server running vCenter so you don’t need to worry about managing two servers.
vCenter Server for Windows Cons
  • For larger environments, you’ll definitely be needing an external database meaning more license and hardware related costs.
  • While deployment is still easy, it definitely takes longer to install and configure vCenter Server for Windows.

Conclusion

The bottom line is that VMware is seemingly moving towards relegating vCenter Server for Windows to history. This is evident with the features that come with version 6 and the recently released Update 1. It’s only a matter of time before VMware completely close any functionality and feature gaps that remain between the two flavors. If they can address the VUM co-existence issue, I’m pretty sure more people would opt for vCSA without as much as giving it a second thought.

Monday, October 10, 2016

Storage performance troubleshooting with ESXTOP [Guide]

As you know ESXTOP is an utility bundled with ESXi allowing to monitor/troubleshoot performance of network, CPU or storage. This post is about storage performance troubleshooting with ESXTOP.

Se will focus on storage as many times the storage is the main problem of latency. A weakest performance element in the whole chain. VMs performs slowly, but where the latency comes from? Is it at the VM level, LUN level or Disk level (hba).

While ESXTOP is command line utility, note that there is a nice free tool which has GUI, from VMware called Visual ESXTOP. It integrates into vSphere web client. Note that I have not personaly tested the tool with the latest vSphere 6.0 U1 release.

What to monitor/troubleshoot?
Per LUN
Per VM
per Disk (HBA mode)
Let’s monitor a LUN with ESXTOP
1. Start ESXTOP and press U to switch to disk view (LUN mode).




2. Press F (Field Order) to modify fields which you want to display. Then hit Enter to validate.


3. Press S and then 3 (or other smaller/bigger value) to set the auto-update time to every 3 seconds…. In order to view the whole device name (the complete naa identifier) you’ll have to enlarge the column pres Shift + L and enter “32”. (or other larger number).


Let’s try to monitor Disk View (hba mode).
1. Start ESXTOP utility and press D to switch to Disk view (hba mode). In order to view the whole device name (the complete naa identifier) you’ll have to enlarge the column pres Shift + L and enter “32”. (or other larger number).


2. From here you can hit F (Field Order) to modify fields which you want to display. (You can see small star diplayed next to each visible field….). When OK, you can hit Enter.


3. Press S and then 3 to set the auto-update time for 3 sec. (you can enter smaller/bigger value as you wish).


Monitor VM performance (Per VM)
1. Start ESXTOP and press  V  to switch to disk view.


2. Again, Press F (Field Order) to modify fields which you want to display. Then hit Enter to validate.

3. And again, press S and then 3 (or other smaller/bigger value) to set the auto-update time to every 3 seconds…. In order to view the whole device name (the complete naa identifier) you’ll have to enlarge the column pres Shift + L and enter “32”. (or other larger number).


What represents the different columns?
Now let’s start with ESXTOP utility by identifying the different columns.

CMDS/s –  sum of commands per second with IOPS (Input/Output Operations Per Second). Here are also other SCSI commands like SCSI reservations, locks, vendor string requests, unit attention commands etc. All those are flowing to or are coming from the device or virtual machine which is monitored.

DAVG/cmd  –  Average response time in milliseconds per command which is sent to the device.

KAVG/cmd –  How many time this command spend in the VMkernel.

GAVG/cmd  – Response time at the guest operating system level. Here comes a formula: DAVG + KAVG = GAVG
[10/9, 16:45] vExpert-Jayesh: CPU

When troubleshooting CPU performance for your virtual machines the following counters are the most important.

%USED, %RDY, %CSTP

%USED tells you how much time did the virtual machine spend executing CPU cycles on the physical CPU.

%RDY is a Key Performance Indicator! Always start with this one. This one defines how much time your virtual machine wanted to execute CPU cycles but could not get access to the physical CPU. It tells you how much time did you spend in a “queue”. I normally expect this value to be better than 5% (this equals 1000ms in the vCenter Performance Graphs read about it here)

%CSTP tells you how much time a virtual machine is waiting for a virtual machine with multiple vCPU to catch up. If this number is higher than 3% you should consider lowering the amount of vCPU in your virtual machine.
[10/9, 16:45] vExpert-Jayesh: Memory

When troubleshooting memory performance this is the counters you want to focus on from a virtual machine perspective.

MCTL?, MCTLSZ, SWCUR, SWR/s, SWW/s

MCTL? This column is either YES or NO. If Yes it means that the balloon driver is installed. The Balloon driver is automatically installed with VMware tools and should be in every virtual machine. If it says No in this column then figure out why.

MCTLSZ The column show you how inflated the balloon is in the virtual machine. If it says 500MB it translates to the balloon driver inside the guest operating system has “stolen” 500MB from Windows/Linux etc. You would expect to see a value of 0 (zero) in this column

SWCUR tells you how much memory the virtual machine has in the .vswp file.  If you see a number of 500MB here it means that 500MB is from the swap file. This does not necessarily equals to bad performance. To figure out if you virtual machine is suffering from hypervisor swapping you need to look at the next two counters. In a healthy environment you would want this value to på 0 (zero)

SWR/s This value tells you the Read activity to your swap file. If you see a number here, then your virtual machine is suffering from hypervisor swapping.

SWW/s This value tells you the Write activity to your swap file. You want to see the number 0 (zero) here. Every number above 0 is BAD.



Monday, June 6, 2016

Clone virtual machine without vCenter using ESXi

How to clone virtual machine without vCenter using ESXi base host machine, First think why we required to clone the virtual machine..? If we would like to make multiple virtual machines as same exact virtual machine. 
  Connect to the vSphere Hypervisior using vSphere client and power off the source virtual machine.

How to clone virtual machine without vCenter using ESXi

In order to clone first take snapshot of existing virtual machine to do that, Right click on the current virtual machine –> Snapshot –> Take Snapshot. Example is shown in below screenshot

0 Take Snapshot
Now Select the base host name and go to configuration tab –> Click on Security profile ( As shown in below screenshot )
1 Security Profile
Select SSH and Click on Options
2 Remote access
Start the SSH service to connect ESXi using Command line interface ( Refer Below screenshot )
3 Start SSH service
Start SSH service – Click on Ok
Login to the ESXi host command line interface using SSH service as root user (Below is the screenshot after login to the Command line interface)
4 cd datastore
Go to /vmfs/volumes/ directory and type ls -la for viewing the list of volues
# cd /vmfs/volumes/ 
# ls -la
Clone the disk file. To clone disk use below command
# vmkfstools -i /vmfs/volumes/datastore1/DC1/DC1-00001.vmdk /vmfs/volumes/datastore1/newclone.vmdk -d thin
5 Clone Disk
Now lets create an New Virtual machine with cloned disk
6 New virtual machine
Right Click on ESXi base host machine name and Click on New virtual Machine OR press Ctrl+n (As shown in above screenshot)
7 configuration typical
Now it will ask you which type of VM you would like to create (Next Step)
8 Name and location
Provide Virtual machine name
9 Select Storage
Select the Datastore where you would like to store your Virtual machine files
10 Guest Operating system
Select Guest Operating system (Windows, Linux Or Other)
11 Select VM Network
Now select How many NIC’s you want to create and Select the virtual machine NIC VLAN
12 Create Disk
Provide Disk size and select its type of provisioning preferred is thin
13 Ready to complete
Check Edit the virtual machine settings and click continue
14 Remoce existing disk
Select curent disk–> Click on remove. Remove existing Disk because we do not required. Add newly cloned disk to make this virtual machine as exact its parent
16 Hard Disk
click on add button to attach new one, Select Hard Disk Click Next
17 Use an Existing Virtual Disk
Select second option that is “Use an existing virtual disk” Click Next
18 Browse from Datastore
Browse datastore and select the new .vmdk file Click open then Click Next

clone virtual machine
Click Finish
That’s it Virtual machine successfully cloned.
Conclusion
We can also clone virtual machine using ESXi. 

Tuesday, September 15, 2015

Installing Active Directory on Windows Server 2012

Description

This article will walk you through setting up the Active Directory Role on a Windows Server 2012. This article is intended to be used for those without an existing Active Directory Forest, it will not cover configuring a server to act as a Domain Controller for an existing Active Directory Forest. 

Content

Installing Active Directory

1. Open the Server Manager from the task bar. 
2. From Server Manager Dashboard select Add roles and features. This will launch the Roles and Features Wizard allowing for modifications to be performed on the Windows Server 2012 instance.
3. Select Role-based or features-based installation from the Installation Type screen and click Next. 
Note: Roles are the major feature sets of the server, such as IIS, and features provide additional functionality for a given role.
4. The current server is selected by default. Click Next to proceed to the Server Roles tab.
5. From the Server Roles page place a check mark in the box next to Active Directory Domain Services. A notice will appear explaining additional roles services or features are also required to install domain services, click Add Features.
Note: There are other options including, Certificate services, federation services, lightweight directory services and rights management. Domain Services is the glue that holds this all together and needs to be installed prior to these other services.
6. Review and select optional features to install during the AD DS installation by placing a check in the box next to any desired features; Once done click Next.
7. Review the information on the AD DS tab and click Next.
8. Review the installation and click Install.
Note: The installation progress will be displayed on the screen. Once installed the AD DS role will be displayed on the 'Server Manager' landing page.

Configuring Active Directory

Once the AD DS role is installed the server will need to be configured for your domain.
1. If you have not done so already, Open the Server Manager from the task bar. 
2. Open the Notifications Pane by selecting the Notifications icon from the top of the Server Manager. From the notification regarding configuring AD DS click Promote this server to a domain controller.
3. From the Deployment Configuration tab select Add a new forest from the radial options menu. Insert your root domain name into the Root domain name field.
 
4. Review and select a Domain and Forest functional level. Once selected fill in a DSRM password in the provided password fields. The DSRM password is used when booting the Domain Controller into recovery mode.
Note: The selection made here will have lasting effects to features and server domain controller eligibility. For further information on Domain/Forest functional levels see official Microsoft documentation.
5. Review the warning on the DNS Options tab and select Next.
6. Confirm or enter a NetBIOS name and click Next.
7. Configure the location of the SYSVOL, Log files, and Database folders and click Next.
8. Review the configuration options and click Next.
9. The system will check to ensure all necessary prerequistes are installed on the system prior to moving forward. If the system passes these checks you will proceed by clicking Install.
Note: The server will automatically be rebooted once the installation completes.
10. Once the server is done rebooting reconnect via RDP. Congratulations on successfully installing and configuring a Active Directory Domain Services on Windows Server 2012.

How to resize Windows Server drives in VMware

The ability to add virtual devices is awesome. Now sometimes, there’s some hard lessons to learn if someone jumps in without slowing down to think about certain things, like the guidelines defined up front.
One of the most common things that a system administrator will have to do in a virtualized environment is give out more RAM, CPU or disk space to a virtual machine. The whole point of virtualization is having the ability to dynamically change these values, but some can need more than a simple reboot, especially when it comes to resizing disks.
I’m going to go through the process of increasing the disk space of a virtual machine running Microsoft Windows Server 2012 running on VMware 5.1 (vSphere 5.1, ESXi 5.1 host and VMware tools installed). Along the way, I’m going to discuss a potential issue that can cause a lot of headaches, but ones that can be avoided with pre-defined guidelines or best practices.

A simple example

Let’s start with the simplest example where I have created a Windows Server 2012 VM with a single OS drive of 40 GB. You’ll see the Disk Management snapin will show below. Nothing much to see here except one single volume.
disk management snapin
Here’s what the settings look like for this VM in VMware. We have one single hard disk. The fact that it’s configured as “lazy zeroed” is not important, and what I go through here applies to the other two types of disks you’ll find (“thin” and “eager zeroed”). Just remember that you won’t be able to resize the disk if it has a snapshot.
VM settings
Let’s start off by increasing the size of this disk to 45 GB. You simply need to change the value in the above VM properties to the desired value and click OK. Pretty simple so far. We’ve increased the size of the underlying disk, but need to do a few things in the operating system now.
The first thing we’re going to do is to get the operating system to do a disk rescan, which is really simple to do via the Disk Management console, by simply selecting Rescan Disks.
Rescan disks
From here, we’ll see an extra amount of disk space show up in the console as “Unallocated.” We have the choice of what we want to do with this unallocated space, but in this example, we want to use this space to increase the current size of the operating system drive.
Disk space - operating system drive
This shows one of the awesome improvements in Windows Server. In Windows Server 2003, resizing the OS drive wasn’t possible, but this changed in Windows Server 2008.
So now that we have our “extra space,” resizing the OS drive is another simple task. Just by right-clicking on the partition, we have an “Extend Volume” option. This will fire up a pretty simple wizard (not shown). For example, you can choose whether you want to use the full size of the unallocated space.
Resizing the OS drive
After the wizard finishes, your disk is now resized as you requested. This is all done while the operating system is running, too! This is the magic that virtualization provides. Think about how much effort it would take to do something like this on a physical server.
System specs

Bad setup for future increases

Now, let’s say we have a setup with two volumes on one single disk. What happens if we need to increase the space of a volume? Does it matter which volume?
Based on the previous example, we just need to resize the disk in VMware, and then extend the volume, right? Here’s where we might have a problem.
This is what our disk looks like when we have two volumes on the same disk. The important thing to note is that C: is not the last volume on the disk, while E: is at the end.
Increase volume space 1
If we go through the same kind of process as before (not show again here), we increase the size of the single disk and do a rescan, the result would look something like this:
Increase volume space 2
So, if the goal was to increase the size of the C: drive then by simply right-clicking on the drive, it could be extended as before. Hold on–there’s a problem, because when the drive is right-clicked on, the “Extend Volume” option is disabled. Remember that the C: drive is not at the end of the drive.
Increase volume space 3
OK, will I see the same behavior if I tried to extend the E: drive instead, right? Remember that this volume is at the end of the drive. Now I have the “Extend Volume” option available and can use it.
Increase volume space 4

Lesson learned

The important takeaway from the previous example is if you are trying to resize a volume, then it either has to be the only volume on the disk or must be at the end of the disk. The problem is that a volume can’t be moved by the built-in features.

Guideline: One volume per disk

I want to show you how easy it is to resize a disk, but also to offer a practical example to show how important it is to plan and design virtual machines properly at setup.
A best practice or guideline in a virtualized environment is to look at having a “one volume per disk” policy or guideline. It can save you a lot of trouble in the future, especially in a virtualized environment, where all of a sudden you need to increase the size of a volume.
In the original example above, we had a single volume on a single disk, and then we moved on to two volumes on a single disk.
The better way to setup two volumes on a virtual machine would be to have two disks, so that each volume had its own dedicated disk.

Setting up a second disk

In this next example, if I started off with a system with a single disk, and wanted to add a second disk it would be as simple as adding the proper virtual hardware to the virtual machine as shown below.
Setting up a second disk 1
I’ve skipped a few steps between having a single disk/volume to having the setup below where I have my C: and E: volumes on different drives. Once you add a new disk to an existing Windows Server virtual machine you have to bring the disk online, initialize it and create a volume on it (not shown).
This is what a better setup looks like:
Setting up a second disk 2
In this last example, I don’t have any constraints if I need to increase the size of either my C: or E: drives because now they are either the only volume on the disk or are at the end.