You can easily update your vCenter Server Appliance (VCSA) offline by downloading a product patch ISO and via the CLI.
Download the latest patch from VMware Patch Download Center. Select VC from the Search by Product drop-down menu, then select the correct version (i.e. 6.0 or 6.5). Download the patch ISO and attach it to the VCSA.
Log in to the shell (using SSH or VMRC) and initiate the update:
software-packages stage --iso --acceptEulas
software-packages list --staged
software-packages install --staged
After the update has finished, you will have to reboot the VCSA.
You can use either esxcli or vicfg-hostops to enter/exit maintenance mode.
esxcli
vicfg-hostops
Note that you can use vicfg-hostops --operation info to check whether the host is finished with entering maintenance mode or is still busy.
PowerCLI
After connecting to the host or vCenter server:
Sometimes, you need to temporarily start a service (such as SSH) to perform some maintenance task. PowerCLI can help you with this:
To start the SSH server on each host of a vCenter:
Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-SSH"} | Start-VMHostService
To stop the SSH server:
Get-VMHost | Get-VMHostService | ? {$_.Key -eq "TSM-SSH"} | Stop-VMHostService -Confirm:$false
As always, you can make adjustments to the oneliner to select another service to start/stop, or further limit the selection of hosts to a cluster or a group of hosts (e.g. filtered by name).
If for any reason you need to determine whether a specific instance of VMWare View Connection Server is installed as a standalone server or a replica server, you can do so by looking into the registry.
In HKEY_LOCAL_MACHINE\Software\VMware, Inc.\VMware VDM, the value ServerInstanceType will indicate which type the CS is:
1 = standalone/first CS
2 = replica CS
Note that this doesn't really matter, as the only difference between them is whether they set up a new ADAM instance or connect to an existing one. After the installation of VCS, they are identical.
Hyper-V does not allow to be installed on a machine that's already virtual (such as on another Hyper-V or VMWare). For VMWare, you can circumvent this by adding custom configuration parameters to the VM's configuration.
Add these to the VM's configuration, either through the vSphere (web)client, or by directly editing the VMX-file:
hvh.enable = TRUE hypervisor.cpuid.v0 = FALSE
If you're editing the VMX-file, you need to enclose the values (behind the =) in double quotes (").
I wrote a script to list virtual disk information for a specified VM, including VMDK path, SCSI IDs and more. It is loosely based on this script but excludes all WMI info.
It is possible to install the integration plugins for VMware on an ESX host directly from the Nimble website, provided your hosts have internet access:
esxcli software vib install -d http://update.nimblestorage.com/esx5/ncm
With PowerCLI, you can generate all sorts of lists. To retrieve the configured and reported OS version of your VMs, try running this one-liner:
Get-VM | Sort | Get-View -Property @("Name", "Config.GuestFullName", "Guest.GuestFullName", "Guest.IpAddress") | Select -Property Name, @{N="Configured OS";E={$_.Config.GuestFullName}}, @{N="Running OS";E={$_.Guest.GuestFullName}}, @{N="IP Address";E={@($_.Guest.IpAddress)}} | Export-CSV -Delimiter ";" -Path "vms.csv"
« ‹ | March 2021 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |