Vmware: Difference between revisions

From Piszczynski
piszczynski>Aleks
piszczynski>Aleks
No edit summary
Line 1: Line 1:
== Apply ESXI Patches from vsphere ==
Make sure you have taken a backup of the config from the esxi host
Select the updates tab from the host in vsphere
Select attach and create baseline in attached baselines options and then create the baseline with the patches you want to install. If baseline already exists then select attach baseline and select.
Click on the baseline tickbox and select check compliance and wait for checks to complete.
If no errors select the pre-check remediation option and look for errors
If no problems then select the baseline and click on remediate then follow through the options and click remediate.


== Apply ESXI patch from console ==
== Apply ESXI patch from console ==

Revision as of 17:06, 1 December 2022

Apply ESXI Patches from vsphere

Make sure you have taken a backup of the config from the esxi host

Select the updates tab from the host in vsphere

Select attach and create baseline in attached baselines options and then create the baseline with the patches you want to install. If baseline already exists then select attach baseline and select.

Click on the baseline tickbox and select check compliance and wait for checks to complete.

If no errors select the pre-check remediation option and look for errors

If no problems then select the baseline and click on remediate then follow through the options and click remediate.

Apply ESXI patch from console

Copy patch to datastore accessible from esxi shell using winscp

  • esxcli software vib update -d "<Path to patch>"

Access ESXI console

Access ESXI console via ssh session:

  • dcui


Backup ESXI Host config

Sync running config with stored config:

  • vim-cmd hostsvc/firmware/sync_config

Backup Config:

  • vim-cmd hostsvc/firmware/backup_config

Copy the download location into web browser to download and save the config

https://kb.vmware.com/s/article/2042141

Vcenter and ESXI logs

Identify and clear down logs using info here:

https://kb.vmware.com/s/article/76563

Way to clear high disk usage in logs:

  • cd /storage/log/vmware/content-library/
  • echo > content-library-runtime.log.stdout

https://kb.vmware.com/s/article/89009

Access VCSA - vCenter appliance

vCenter Server Appliance Management Interface can be accessed in the web interface on teh following port and url:

PCIE GPU Passthrough

To get passthrough working on esxi host to VM you will need to change a few settings. This works for HP ML350 Gen9 Host:

Add the correct configuration to the /etc/vmware/passthru.map file on the esxi host: There will be a line like this:

# NVIDIA

10de  ffff  bridge  false

Add beneath:

10de  <Code for your GPU>  d3d0  false

The codes can be found here: https://devicehunt.com/view/type/pci/vendor/10DE/device/11C6


Then modify the following parameters of the VM (can be done in the edit settings > VM advanced section on in the .vmx file)

  • hypervisor.cpuid.v0 = FALSE
  • pciPassthru0.msiEnabled = FALSE

If the GPU has a lot of memory you may want to enable the following parameter:

  • pciPassthru.use64bitMMIO="TRUE"


USB Passthrough

For USB passthrough of devices it can be a pain. For HID devices you will need to specify that it should not be controlled by the host.

You will need to find the details of all the USB devices with the following command:

  • lsusb -v | grep -E '(^Bus|HID)'

then locate the vendor id and the device id (vvvv:dddd) in results next to the device name.

In the VM advanced settings add in the following parameters:

  • usb.generic.allowHID = "TRUE"
  • usb.quirks.device0 = "0xVVVV:0xDDDD allow"

Then in /etc/vmware/config file on the host add the following line:

  • usb.quirks.device0 = "0xVVVV:0xDDDD allow"

Then add in a line to the boot config located here: /bootbank/boot.cfg to disable the host from taking control of the device:

  • CONFIG./USB/quirks=0xVVVV:0xDDDD::0xffff:UQ_KBD_IGNORE

Reboot the Host.

VM Recovery

If a windows VM is not booting and needs to be recovered you may need to sideload the PVSCSI drivers - these can usually be loaded from a virtual cdrom drive in vmware during the windows installation/recovery process when you have booted from installation media. The drivers should be in vmware in a windows.iso located in vmimages\tools-isoimages