showing posts tagged with 'vmware'
by lunarg on December 8th 2020, at 11:52
If the SSL-certificate on your VMware Horizon View Composer server is about to expire, it will have to be replaced. The process is pretty straight forward.

Import the new certificate (in PFX-format) in the Computer certificate store. You can use the MMC snap-in or certutil to accomplish the task. If it's not a publicly signed certificate, you will also need to make sure the intermediate and trusted root CA is imported.

Open an elevated command prompt.

Stop the VMware Horizon Composer service:net stop svid

Navigate to the install location of View Composer. The default location is C:\Program Files (x86)\VMware\VMware View Composer. On a 32-bit machine, leave out "(x86)".

Run t  ...
by lunarg on November 4th 2020, at 09:57
Using PowerCLI, you can easily retrieve the status of CPU/Memory hot-add/remove. After logging in (use Connect-ViServer), run this cmdlet:

(Get-VM | Select ExtensionData).ExtensionData.config | FT -Auto Name, MemoryHotAddEnabled,CpuHotAddEnabled,CpuHotRemoveEnabled

If you only want a list of VMs which have hot-add/remove enabled for either CPU or memory, you can use filters to filter on this:

(Get-VM | Select ExtensionData).ExtensionData.config | ? {$_.MemoryHotAddEnabled -eq $true -or $_.CpuHotAddEnabled -eq $true -or $_.CpuHotRemoveEnabled -eq $true} | Select Name, MemoryHotAddEnabled,CpuHotAddEnabled,CpuHotRemoveEnabled | FT -Auto

To export the result to CSV, replace the FT -Auto in t  ...
by lunarg on November 3rd 2020, at 16:16
It is well-known and well-documented that it's possible to create a bootable USB flash drive allowing you to create an installation media to install or re-install macOS on a Mac. Using the same and native tools, it is also possible to create a bootable ISO image. While you won't be using this very often, it could be handy in several cases (e.g. when running a specific version of macOS in VMware Fusion).

In short, instead of writing to an USB drive, you can create a disk image and write the installer to that image, and then convert it to an ISO image file (technically it's CDR, but in nowadays modern systems they are the same). Subsequently, it is possible to write the ISO to an image (but t  ...
by lunarg on October 22nd 2020, at 14:39
When running the VMware OS Optimization Tool (OSOT), a lot of optimalization is performed to get the best possible performance out of your VDI environment. This also means certain items will be disabled of which you don't want them to be disabled, including some personalization aspects such as setting a wallpaper or a background color.

It is not possible to revert the change from outside the VDI-build: any settings applied through GPO or DEM do not get applied. This is because the local group policy takes precedence and OSOT sets several optimizations through the local group policy. By changing the local group policy in the golden image itself, you can get rid of some of the lockdowns.

To   ...
by lunarg on October 22nd 2020, at 14:38
In order to install a fresh copy of Windows Server on a VM with the VMWare Paravirtual SCSI controller, as the driver for the PVSCSI adapter is not included in the default Windows Server ISO, you would use the built-in floppy images to make the PVSCSI driver available during the installation, avoiding the need to install using a different SCSI controller and then swap the controller after the installation of the guest OS and VMWare Tools.

To facilitate this, you would add a virtual floppy drive, connect the correct floppy image containing the PVSCSI driver, and then load the driver during the disk selection portion of the installation wizard. Unfortunately, since the deprecation of the Flas  ...
by lunarg on October 22nd 2020, at 14:37

You can use VMWare's OVFTool to convert from OVF to OVA and vice-versa.

  1. Download and install OVFTool. Versions for Windows, Mac and linux are available. You'll need a (free) VMWare Account.
  2. Collect your OVF (and dependent files) and place them on the machine you've installed OVFTool on.
  3. Open a command prompt/Terminal and navigate to the folder where the files are located.
  4. Perform the conversion (adjusting command and paths according):
    For OVF to OVA (note that all files referenced in the OVF must be in the same folder):
    install-path\ovftool.exe C:\path\source.ovf C:\path\dest.ova
    For OVA to OVF:
    install-path\ovftool.exe C:\path\source.ova C:\path\dest.ovf
by lunarg on October 22nd 2020, at 14:36
A not so documented feature is the support of VMXNET3 in VMWare Fusion. It cannot be configured through the UI but by manually editing the VM configuration file (VMX-file), you can leverage it (assuming you have installed VMWare Tools and/or are running a supported guest OS).

Open the file with your favourite text editor, but avoid using Apple's TextEdit as it has a tendency to replace regular quotes with opening/closing quotes, which will break your VMX-file. You can use Terminal and open the file using Nano if you want to be sure.

Network adapters are specified with ethernet*. as the starting line, where * = the number of the network adapter (0 is the first, 1 is the second, and so on).   ...
by lunarg on May 14th 2020, at 12:20
You can force-trigger storage DRS recommendations (and possible subsequent storage vMotions) through PowerCLI.

Run the snippet below, replacing the value of $dscName to match the name of the datastore cluster you wish to trigger the DRS recommendation on:

$dscName = 'DatastoreCluster1'$dsc = Get-View -ViewType StoragePod -Filter @{'Name'=$dscName}$si = Get-View ServiceInstance$storMgr = Get-View -Id $si.Content.StorageResourceManager$storMgr.RefreshStorageDrsRecommendation($dsc.MoRef)$dsc.UpdateViewData()if($dsc.PodStorageDrsEntry.Recommendation){ $dsc.PodStorageDrsEntry.Recommendation | %{ $storMgr.ApplyStorageDrsRecommendationToPod_Task($dsc.MoRef,$_.Key) }}

by lunarg on May 14th 2020, at 12:17

If the webclient is letting you down, you can also use PowerCLI to expand datastores.

First, as usual, expand the volume on the storage level. Then, fire up PowerCLI, log on to the vCenter/host and run the following script, replacing the name of the datastore you wish to expand:

$name = 'Datastore1'
$datastore = Get-Datastore $name
$esxi = Get-View -Id ($Datastore.ExtensionData.Host | Select -Last 1 | Select -ExpandProperty Key) 
$datastoreSystem = Get-View -Id $esxi.ConfigManager.DatastoreSystem
$expandOptions = $datastoreSystem.QueryVmfsDatastoreExpandOptions($datastore.ExtensionData.MoRef)
by lunarg on December 9th 2019, at 16:54
I had an issue where vMotion would no longer work. When selecting the target host in the vCenter UI, the compatibility check would fail with the error:

A general system error occurred: Connection refused: The remote service is not running OR is overloaded, OR a firewall is rejecting connections.

A Google search for the issue reveals quite a bit of possible causes, mostly pointing to several more standard causes, which were all in order. When digging deeper in the logs, I stumbled upon the same message appearing in /storage/log/vmware/vmware-vpxd/vpxd.log.

Continuing the search, someone mentioned that it could be caused by services not started, which can easily be revealed when loggi  ...
by lunarg on December 9th 2019, at 15:45
You can disable password expiration from the command-line when logging on using SSH or by enabling the Bash shell. Note that you will need root privileges (i.e. root account) to make this change.

If shell access is not enabled, you need to enable it first:

Log on to the appliance management portal: https://ip-or-fqdn:5480/.

In the Navigator, click on Access. On the right side (Access Settings), click on the Edit button.

Tick the box next to Enable SSH Login for remote access, or if you rather prefer making the change through the VMRC, check the box Enable BASH Shell. Then click OK. The change is effective immediately.

Log on to the shell using either SSH (using PuTTY or another applicat  ...
by lunarg on October 11th 2019, at 13:55

Not straightforward to find on the website (but with a little bit of Googling, here it is): an overview of the system requirements for VMware Fusion. All versions are listed:

by lunarg on October 9th 2019, at 15:19

A very nice article explaining how to migrate from an external Platform Service Controller to an embedded one:

A note about versioning: use the same version of the converge tool as the version of your vCenter and PSC. Otherwise the converge will most likely fail (as it did when using 6.7 tool on a 6.5 environment).

by lunarg on September 18th 2019, at 12:02
When adding a new disk to a live system (e.g. a linux VM), the new disk may not always show up. Additionally, when resizing a disk through the hypervisor, the VM may not always immediately have the new size available for use. Luckily, you can trigger a rescan of the SCSI bus through the sysfs system.

For this to work, you'll need to have shell and root access to the server/VM.

Modern linux kernels automatically detect the addition of a disk, but in case it doesn't, you can trigger a rescan of a specific (virtual) SCSI controller:

echo "- - -" > /sys/class/scsi_host/hostX/scan

Replace hostX with the number of the SCSI controller, where host0 is the first, host1 is the second, et  ...
by lunarg on September 9th 2019, at 16:54
On VCSA, the database is stored on a separate disk. It could happen that this disk runs out of room, causing Vcenter to no longer function properly. One way to resolve this is by running database clean up as mentioned in KB 2110031. However, if this is not possible, or you don't want to clear out the data, you can also resize the disk.

For this to work, you'll need root access and access to the bash-shell, either on the console or through SSH.

Before resizing, identify the physical disk to be resized. For VCSA 6.5 and 6.7, this should normally be Disk 8 (device node in linux = /dev/sdh), but your setup may vary, so it's best to double-check this.

In VCSA 6.5 and 6.7, the database is locat  ...
by lunarg on September 9th 2019, at 12:45
Handling snapshots (creating, deleting, restoring) is rather intuitive when you already have some experience with PowerCLI. As a reference, here are some one-liners. As always with Powershell, there's more than one way to achieve a goal... The examples used here assume a VM named "SRV01". Adjust as needed.

Create a snapshot:

Get-VM SRV01 | New-Snapshot -Name "My snapshot"

Remove all snapshots (disabling confirmation request in the process):

Get-VM SRV01 | Get-Snapshot | Remove-Snapshot -Confirm:$false

To handle a specific snapshot, you could do something like this:

$vm = Get-VM SRV01$snap = Get-Snapshot -VM $vm -Name "My snapshot"# do something with the sn  ...
by lunarg on February 8th 2019, at 10:02

If for some reason the deployment of the VMWare vConverter agent fails, you can also copy the installer to the machine you wish to P2V and manually install it.

On the machine VMWare vConverter is installed, navigate to the location where it's installed (by default: C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone), and look for the file VMware-Converter-Agent.exe. Copy over this file over to the target machine and run it to install the agent. Accept the defaults, including the TCP-port (unless your setup requires you to change it). Once finished, a service will have been installed and you will be able to connect to it using vConverter.

by lunarg on January 29th 2019, at 12:03

Found this article online about how vSphere virtualizes NUMA and how this is relevant to the configuration of vCPUs in your VMs:

by lunarg on January 11th 2019, at 10:04

In the event of migrating your old vCenter Server to a new version (or from Windows to the appliance), it may become necessary to first clear out old historical data. Not only will this speed up the migration process considerably, it will also prevent certain issues which may block the migration from completing successfully.

VMWare provided a KB with database scripts which allow you to selectively purge historical data and decreasing the database size: KB 2110031.

by lunarg on December 20th 2018, at 11:17
Starting or stopping the SSH service on multiple ESXi hosts can be a tedious job when having to do this via the vSphere (Web)Client. Fortunately, you can also use PowerCLI to start/stop services quickly. With a little scripting, you can expand this to start/stop services on a set of hosts, a cluster, or the entire vCenter.

First, start PowerCLI and make a connection to the vCenter. For automation, you can use something like this (note that you have to add code for credentials, if needed):

if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) { Add-PSSnapin VMware.VimAutomation.Core | Out-Null }Connect-VIServer vcenter.domain.local

Once that's done, you can ga  ...
showing posts tagged with 'vmware'