Identifying orphoned virtual machines and hard disks in vSphere

Connect to the shell of the ESXi host system and browse to location of the datastore (/vmfs/volumes/{datastore name}) to which you want to identity orphoned virtual machine hard disks and invoke the following command. This will return all virtual machine hard disks to which the modified date is seven days in the past (-mtime +7) … More Identifying orphoned virtual machines and hard disks in vSphere

PowerCLI: Configure Log rotation and size options for vmware.log

By default, the virtual machine log file (vmware.log) is rotated as a result of the virtual machine’s Power On or Power Off operation. , In order to limit the total size this can grow to you may configure the log you may configure a log rotation size and level of rotation. Also, this can add a level … More PowerCLI: Configure Log rotation and size options for vmware.log

Retrieving VM CDDrive information using PowerCLI

I was recently looking at retrieving a number of VMs where the CD Drive was connected to a Datastore ISO file.  This is possible be using the Get-CDDrive cmdlet to retrieve the device type information. To retreive information for a single VM we can use the following: Get-VM VM1 | Get-CDDrive The below information will be … More Retrieving VM CDDrive information using PowerCLI

Calculate vCPU to pCPU ratio for Hosts using PowerCLI

In some capacity planning scenarios, statistical information is not taken into account and the management of resources through best efforts can become a  rule of thumb scenario. In the case, of CPU resource the concept of vCPU to CPU ratio has been discussed as a possible method. Using PowerCLI I was able to produce the ratio … More Calculate vCPU to pCPU ratio for Hosts using PowerCLI