Wednesday, 16 December 2015

Unable To Take A Snapshot Of A VM - An error occurred while taking a snapshot: Change tracking target file already exists.



Written by Suhas Savkoor



You had a virtual machine which was scheduled for a backup task. The backup job completed and now you want to perform a manual snapshot operation for this virtual machine.

When you take a manual snapshot of this VM, it fails! With the following error;

An error occurred while taking a snapshot: Change tracking target file already exists.
An error occurred while saving the snapshot: Change tracking target file already exists.

There are no snapshots in the snapshot manager. The virtual machine disks are running on the base disk and not a snapshot disk. 

However, when you browse the datastore for this virtual machine, you notice certain ctk.vmdk files. There will be N number of ctk.vmdk for N number of VMDKs. 

A VMware CTK file contains a list of all the changes made to a VMware virtual machine (VM) since it was last backed up. 
CTK change tracking files exist on all VMs where VMware's Changed Block Tracking (CBT) technology is enabled. CBT relies on the CTK file's information to back up only the VM information blocks that have changed, instead of backing up the entire VM. 

There is only one CTK file in the virtual machine disk files, and it has the file extension .ctk. The CTK file is always much smaller than VMware Virtual Machine Disk File (VMDK) block it describes.

What needs to be done?

1. Either browse the datastore for the virtual machine folder from the GUI or open a SSH/Command Line to the host where this virtual machine resides.

2. Delete the ctk.vmdk files

3. Perform the snapshot operation. 

Success!

Monday, 14 December 2015

Configuring VFRC From An Emulated SSD Drive

Written by Suhas Savkoor



If you have read my previous article, it tells you about how to emulate a SSD drive from a Non-SSD disk.

In this article, I will show you the use case of the SSD emulation. I will be configuring VFRC from an emulated SSD drive.

Here, I have created a 2 GB VFRC-Test datastore (VMFS-5) and tagged it as a SSD drive.


Now, if I log in to the web client and select the host and under Manage tab if I select Virtual Flash Resource Management, I see an empty list.
Also, if I go to Add Capacity, I see the list is empty.


Now, even though we have a SSD datastore why is it showing an empty list here.
Well, the requirement for VFRC is a raw SSD disk. A raw disk indicates that there should be no partition on it.
When we added the non SSD disk to VMware vSphere to tag it as a SSD drive, we had to create a VMFS partition on it. This VMFS partition is not allowing the disk to be used by VFRC.

So, what we need to do now is, we will have to remove the partition for this datastore. Please make sure that there is no data on this datastore as it will be lost during the partition removal.

First. we need to determine what is the partition number for our drive.
For this:

Login to the ESXi host via SSH/Putty and run the following command:



The output is similar to below:


Then, we need to delete the partition. For this, run the below command:



The output is something as seen below


Here we see we no longer have the partition table listed for this disk. Also, when you come back to your GUI, you no longer see the datastore.

Now, let's login to web client and we can see that this SSD disk is now seen in the VFRC add resource window.



Select the disk and Click OK and you can see the VFRC SSD disk is now added.



Emulate all the way!

Sunday, 13 December 2015

Emulating a SSD Drive in VMware 5.x

Written by Suhas Savkoor



You can emulate a SSD disk from a non SSD hard disk.

Just a couple of steps:


Here, I have my Local Datastore, Suhas-Local-4 which is a VMFS-5 datastore and a Non-SSD drive.

Let's tag it.

Step 1:
Take a SSH(Putty) session to the host which has access to the datastore that you want to tag.

Run the command to see if the device is a SSD or not



You can find the name from the GUI; Devices option under Storage
Or you can right click the Datastore > Copy to clipboard and paste it in a notepad to obtain the device name.

The output is similar to this:


Step 2:
We need to add a SATP rule to the device that we want to tag as SSD.

The command is



Step 3:
Reboot the host.
Once the host is rebooted from the GUI you can see the datastore is now tagged as SSD


Verify the same from the command line using the command in Step 1



That's it. We have tagged our Non-SSD drive as a SSD disk.
You can now try configuring VFRC (vFlash Read Cache) without an actual SSD.


Upgrading vCenter Appliance 5.x

Written by Suhas Savkoor



Upgrading vCenter Appliance is quite different when compared to upgrading your Windows based vCenter.
There are just a few steps to be performed and a lot to wait for the upgrade to be completed.

Currently, I have a 5.5 Update 3 vCenter and I will be updating it to 5.5 U3a


How to get here?

1. Open a browser and enter:
 
                   https://<Appliance_IP_or_FQDN>:5480

2. Login with root credentials
3. Click Update Tab and Select the Status sub-tab and expand the Details option.


Step 1:
  • Login to the host/vCenter hosting this vCenter Appliance virtual machine.
  • Right click the Appliance VM and select Open Console




  • Select the CD option in tool bar and CD/DVD Drive.
  • Since I have my 5.5 Update 3a ISO on the local drive, I will select the option Connect to ISO image on local disk
  • Browse to the datastore and select the ISO Image


Step 2:
  • Go back to the VCSA management page > Update
  • Click the Settings tab: Make sure that the Use CDROM Updates is chosen as we are using the ISO from local drive for upgrade.
  • Under Actions > Click Save Settings


Step 3:
  • Now the updates or on the CD and the Appliance is set to look for updates on it CDROM folder. 
  • Go back to Status Tab and click Check Updates
  • A task will run for a couple of seconds and a new Available Updates option is now seen
  • If you click the Details here, you can see what update is available. Here, since we mounted the 5.5 U3a update, we can see this in the available updates.
  • Click Install Updates




Step 4:

  • The update process can take from 90 minutes to 120 minutes. Do NOT reboot or Power OFF the appliance.
  • Reboot the machine ONLY after the update is complete. 


During the update process you can see this pop-up in the web management page.



After rebooting the appliance, you can see the new Version Under Appliance Version in Update Tab.
You can also open a console to the Appliance virtual machine and notice the updated Build Number.

Tuesday, 8 December 2015

Error Logging Into vCenter 6.0 Via vSphere Client With Windows Authentication

Written by Suhas Savkoor



So, you got your new vCenter Appliance 6.0 U1 setup, and you want to dive into managing the environment.
So you fire up a vSphere client, enter the vCenter IP details, and try logging in with Windows Authentication.

And it fails! With this error:



Here, we need to add the vCenter Appliance to a domain.

This is what you have to do:

1. Login to vCenter Appliance console or open a SSH to it. Then change the directory to:



2. Run this command to join the appliance to a domain:



3. After executing the above command you will receive a prompt to enter the domain user's password. Enter the password and hit enter.

4. Verify the join by:



Now you will be able to login to appliance via vSphere Client using Windows Session Credentials.

Monday, 7 December 2015

Configuring VDP 6.x

Written by Suhas Savkoor



Once you have deployed VDP 6.x from the ovf template, you will have to configure the appliance before using it.

To configure VDP you will have to login to the VDP management page. The address would be:

                       https://<vdp_IP_or_FQDN>:8543/vdp-configure

If you receive the error message, "Server has weak ephemeral Diffie-Hellman public key", then follow this article to resolve it.

Step 1:
Once you open the management web page, you will come across this:


Login to the management webpage for VDP configuration.
Username: root
Password: changeme

Once you login, you will encounter VDP configuration wizard.


Step 2:
Click Next and Under network Settings:

1. Enter IPv4 address of VDP appliance
2. Subnet mask and gateway address
3. Primary DNS and an optional secondary DNS.

Add the appliance host-name and Domain. Click Next.



You might receive the following error.


This issue occurs when Fully Qualified Domain Names (FQDN), forward lookup, and reverse lookup are not configured, or they are not configured correctly.

To resolve this, add the VDP appliance name and domain in Forward Lookup in your DNS.


Login to DNS manager > Right click Forward Lookup > Add New Host and provide the Name and IP address of the VDP appliance. Make sure Create associated pointer (PTR) record is checked and select Add Host.

Step 3:
Once successfully added. Select a time zone.



Step 4:
Now, you will receive an option to change your default password "changeme" to a required one.



Step 5:
In the next step, you have to register your VDP appliance to your vCenter machine.

1. Enter vCenter Username. This user must have administrative privileges on the vCenter machine
2. Password for this user
3. vCenter IP and click Test connection.

Once Connection is tested successfully, click Next.



Step 6:
Next is a subjective process where you need to create a new storage for the appliance with the desired size.



Step 7:
Select a datastore where your VDP drives must reside. 3 drives are required, so choose an appropriate datastore with sufficient space.



Step 8:
Enter a required value of CPU and Memory or accept the default ones. Do not lower the default CPU and memory values.



Step 9:
Review the changes and apply the changes. Once the changes are done, the VDP appliance has to be rebooted for the changes to be applied.



And that's it. You got your VDP appliance configured. 

Sunday, 6 December 2015

Upgrading ESXi Host Via Update Manager

Written by Suhas Savkoor



If you have Update Manager (VUM), you can upgrade/patch your ESXi host using it. For GUI lovers, VUM seems to be an easy way out. 
My ESXi host is Currently 5.5 Build 1331820. This Build corresponds to 5.5 GA. You can find out about VMware Build numbers from this link


Step 1:

Select the host and click Update Manager tab. Under the baseline section notice that I do not have anything. Click the Admin View option.



Step 2:
Click ESXi Images and select Import ESXi Image.


Step 3:
Browse to the Datastore and Upload the file and click Next



The ESXi image upload will take a quick minute or two. 



Once the upload is done, click Next and Provide a Baseline Name for this ESXi ISO that was uploaded. Here, the baseline name given is Host_Upgrade. Click Finish



Step 4:
Go back to Compliance View. Right Click the ESXi host and Select Enter Maintenance Mode. Once the host enters maintenance mode, click Attach and check the baseline that was just created with the ESXi image. Click Attach 


Step 5:
Click Scan and Check Upgrades. Once the Scan task is complete the compliance status should come up as Non Compliant (Red)


If it comes up as Incompatible, then reboot the host and perform the Scan again. 

Step 6:
If HA is enabled on the cluster, then Disable HA prior to performing the Remediate option. Once the HA is disabled for the cluster where this ESXI host was, click Remediate


Step 7:
This is a simple wizard driven process with no changes required.
  • First, verify the baseline is seen Under Baseline section of Remediate wizard. Click Next
  • Accept End User License Agreement. Click Next.
  • Enter a Task Description. Click Next.
  • Uncheck DPM if it is enabled for any of the selected Clusters option. Click Next. Review and Finish.




if you observe the upgrade by opening a KVM console to the server hosting this ESXi you will see the upgrade in process.



The upgrade takes about 10-15 minutes and you can verify the upgrade by observing the updated build number.



Simple isn't it?