VMware Virtual Machine Reporting from VSphere

VMware PowerCLI is a powerful utility to generate virtual machine information and status. This is very cool and handy tool. I use to generate VMTools status, Datacenter and ESX host name information.

Command to connect vCenter:

Connect-VIServer vcenter1, vcenter2, vcenter

Initialize VMTools Version:
New-VIProperty -Name ToolsVersion -ObjectType VirtualMachine -ValueFromExtensionProperty ‘Config.tools.ToolsVersion’ -Force

Initialize VMTools Status:
New-VIProperty -Name ToolsVersionStatus -ObjectType VirtualMachine -ValueFromExtensionProperty ‘Guest.ToolsVersionStatus’ -Force

Verify VMTools status on all virtual machines and export the output to excel:
Get-VM | Select Name, ToolsVersion, ToolsVersionStatus | Export-Csv -NoTypeInformation -UseCulture -Path C:\Temp\VMToolsInfo.csv

Export VM name, cluster and ESX Host:
Get-VM | Select Name, @{N=”Cluster”;E={Get-Cluster -VM $_}}, @{N=”ESX Host”;E={Get-VMHost -VM $_}} | Export-Csv -NoTypeInformation C:\temp\VM_CLuster_Host-.csv

Export VM name and Cluster name:
Get-VM | Select Name, @{N=”Cluster”;E={Get-Cluster -VM $_}} | Export-Csv -NoTypeInformation C:\temp\test-VM_CLuster.csv

Thanks,
WintelAdmin.

VMware Error 0x0000005D

When you try to install Windows Operating System, you would come across an error code 0x0000005D. This is purely an issue related to the virtual machine profile. Please validate if you have selected a correct profile. if not please choose the correct profile and restart the installation process.

In my case, was trying to deploy Windows 2003 std edition for a legacy application using SCCM 2012. Had no clue with the error code 0x0000005D, though I have set Windows 2003 Std 32 Bit in profile. Later realized that the SCCM is using the latest version and then selected the corresponding 64bit profle like Windows Server 2003 Enterprise x64 Edition – from the drop-down list. Voila it fixed my issue.

VM profile is available at below path.

VM->Edit Settings->Options->General Options->Version

Regards,
WintelAdmin

VMware P2V or V2V gives error Unable to contact the specified host.

When you do a P2V or V2V of Windows 2008 server using VMware Converter you might get the below error:

Unable to contact the specified host. The host is not available, there is a network configuration problem, or the management services on the host are not responding.

In order to execute the conversion process, it is necessary to open the required ports on the source. This error would be displayed when the required TCP and UDP ports are not open.

Hence, the best solution is to disable the firewall to fix the issue.

In my case the issue was fixed using the below command.

NetSh Advfirewall set allprofiles state off

Thanks,
WintelAdmin

How to cancel VMware snapshot process?

Sometimes, snapshot takes huge time to get completed. We may then require to cancel the task to save time. However, we do not have any option to cancel the task in vsphere.

Please follow below steps to cancel the task.

1. Find the ESX hostname on which the virtual machine resides.
2. Establish a SSH session to the ESX host.
3. Execute the command to see all the process.
ps | grep vmx
4. Locate the Parent Process ID (the second column) for the hung VM.
5. Execute the command to kill the task
kill *parent process ID* to end the process (excluding *).

Note:
Be very careful, killing different process can harm the ESX.

Thanks,
WintelAdmin

VMware VCA Certification Voucher Free!

Recently VMware announced the new certification track – VMware Certified Associate (VCA).

The certification is available for multiple tracks: VCA-Cloud, VCA-WM and VCA-DCV.

This certification fits in below the normal VCP exam.

Highlights of VCA.

1. Doesn’t need an exam center can be taken online from home/office.

2. Requirement is of common internet browser.

3. Has got free eLearning preparation materials.

4. There are currently three VCA certifications available à VCA-Cloud, VCA-WM and VCA-DCV.

5. It’s officially VMware certified!

As an introduction offer VMware is giving you 50% discount on the exam.

However, we now have an offer to make it 100% discount using an additional exam voucher “VCA13GKN” (*Valid for very Limited period).

 

Reference and more information visit: VMware Certified Associate

 

Thanks,

WintelAdmin

How to enable SSH for the ESXi Server?

Enabling SSH for the ESXi Shell
By default, you cannot access the ESXi Shell using a Secure Shell client. You can enable SSH access from the direct console.
To enable SSH access in the direct console
1. At the direct console of the ESXi host, press F2 and provide credentials when prompted.
2. Scroll to Troubleshooting Options, and press Enter.
3. Select Enable SSH and press Enter once. On the left, Enable SSH changes to Disable SSH. On the right, SSH is Disabled changes to SSH is Enabled.
4. Press Esc until you return to the main direct console screen.
You can enable remote command execution from the vSphere Client.

To enable SSH from the vSphere Client
1. Select the host and click the Configuration tab.
2. Click Security Profile in the Software panel.
3. In the Services section, click Properties.
4. Select SSH and click Options.
5. Change the SSH options.
■ To temporarily start or stop the service, click the Start or Stop button.
■ To enable SSH permanently, click Start and stop with host. The change takes effect the next time you reboot the host.
6. Click OK.
After you have enabled SSH, you can use an SSH client to log in to the ESXi Shell and run ESXi Shell commands.

Accessing the ESXi Shell with SSH
If SSH is enabled on your ESXi host, you can use an SSH client to run commands on that shell.
To access the ESXi Shell with SSH
1. Open an SSH client.
2. Specify the IP address or domain name of the ESXi host.Precise directions vary depending on the SSH client you use. See vendor documentation and support.
3. Provide credentials when prompted.

Thanks,
Winteladmin.com

How to change blocksize (file size limit) on VMFS3 filesystem

If you are trying to create a VM with disk drive size larger than 256 you will get this error :

File is larger than the maximum size supported by datastore.

This happens because by default VMware ESX running VMFS3 uses 1M blocksize with a limitation of 256 GB disk size for the guest virtual machine. However it is possible to change the block size.

To changethe block size on a VMFS3 filesystem you can use vmkfstools command from command line ro reformat the parition. The vmkfstools command can be run on ESX server :

#vmkfstools –create vmfs3 –blocksize 2M vmhba1:0:0:2

Block size and vmdk size limitation

File is larger than the maximum size supported by datastore.

This happens because by default VMware ESX running VMFS3 uses 1M blocksize with a limitation of 256 GB disk size for the guest virtual machine. However it is possible to change or rather increase the size of disk drive that you can create for the virtual machine. If you can change block size to 2M on VMFS3 filesystem on your ESX server you can create disk drive upto 512GB size for the virtual machine.VMware Recommends following block size to create large disk drive on virtual machines :

1M Block Size max VMFS-3 = 256G
2M Block Size max VMFS-3 = 512G
4M Block Size max VMFS-3 = 1024G
8M Block Size max VMFS-3 = 2048G

File size larger than 2048 GB is not supported on VMFS3 filesystem, using VMFS2 you can go upto 16 M block size but that option is not available on VMFS3 filesystems.To changethe block size on a VMFS3 filesystem you can use vmkfstools command from command line ro reformat the parition. The vmkfstools command can be run on ESX server :

#vmkfstools –create vmfs3 –blocksize 2M vmhba1:0:0:2

Extending the C drive Disk Space on Virtual Machine (VMWARE)

For Extending the C drive disk space on Virtual Machine (VMWARE):

Step – 1
Adding the additional space on harddisk 1.

Step – 2
Shutdown the system.

Step – 3
Mount the .vmdk file on another virtual machine as disk1 (probably it would
be disk 1).

Step – 4
Configure the disk 1 on second system and reboot.

Step – 5

Disk Part 1

Step – 6
List volumes

Disk Part 2

Step – 7
Select volume #

Disk Part 3

Step – 8
type extend

Step – 9
Shutdown the system

Step – 10
Remove the disk

Step – 11
Start the system A again (now you can see the extended disk).