Backtrack:  
 
showing posts tagged with 'vmware'
 
edited by on October 14th 2022, at 14:41
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  ...
edited by on November 8th 2021, at 17:14
Coredumps are used for analysis and debugging if/when a ESX host "crashes" with a "kernel panic". This is visualized by a purple screen (often called PSOD, similar to Windows'es "Blue Screen Of Death").

VMWare ESX 5.5 and newer introduces the ability to perform coredumps to a file instead of a partition.

To configure this, you need access to the ESX host's CLI (either through vSphere Management Assistant (vMA), directly on the host through console or SSH, or some other method). For this to work, you need "root" access (or the equivalent of it through vMA).

Once logged on, take a directory listing of the VMFS datastores to determine on which datastor  ...
edited by on August 18th 2021, at 13:53
Occassionally, the vCenter may run out of disk space on a specific disk, in which case it may become necessary to resize it. While there are many articles written about resizing a disk (like this), VMware also provides a very useful auto-resize script which automatically does the work for you, significantly improving the user experience even to those who are not familiar with resizing partitions and/or LVM in Linux. The best part is that it can be done online, so no need to stop services.

Log on to the vCenter console through SSH or through VMRC using the root account. If you wish to use SSH, you may need to enable it first through VAM.

Determine which virtual disk needs resizing. VCSA use  ...
edited by on May 3rd 2021, at 13:07
macOS installers come equipped with a script (called createinstallmedia) to create a macOS bootable USB installer drive. But sometimes it may be necessary to create a bootable ISO. The process is similar as we will use a DMG image instead of a physical drive to create the installer, which can then be converted to ISO.

Follow these steps to get the work done:

First, download the macOS installer of your choice (direct links to most installers can be found in this article). Note that you need to do this on a supported Mac with an Apple ID. The installer app will be placed in your Applications folder.

After downloading, the installer will automatically be launched: ⌘ + Q out of it.

Fir  ...
edited by on March 18th 2021, at 12:36

With PowerCLI it is very easy to get a list of provisioned storage for a list of VMs:

Get-VM | Select-Object Name,@{n="ProvisionedGB"; e={(Get-HardDisk -VM $_ | Measure-Object -Sum CapacityGB).Sum}}

You can combine this with other cmdlets to limit the search to a specific folder, datastore, etc...

To get a complete sum of all the VMs, add | Measure-Object -Sum ProvisionedGB at the end.

edited by on February 18th 2021, at 17:35
Offline installation of PowerCLI module is possible by following these easy steps:Uninstall all older PowerCLI software (6.5R1 or earlier).

Download the PowerCLI offline bundle (ZIP-file) from the PowerCLI home page.

Transfer the ZIP to the machine on which PowerCLI is to be installed.

Open Powershell on the target machine.

To determine the modules folder paths, run this:$env:PSModulePath

The modules will have to be extracted in one of the folders from the output of the above command. Both user-based and machine-based installation is possible (e.g. C:\Windows\System32\WindowsPowerShell\v1.0\Modules).

Extract the contents of the ZIP file directly into the folder.

For Windows, run this   ...
edited by 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  ...
edited by 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  ...
edited by 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   ...
edited by 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
edited by 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).   ...
edited by 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) }}

  ...
edited by 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)
$datastoreSystem.ExpandVmfsDatastore($datastore.ExtensionData.MoRef,$expandOptions.spec)
edited by 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:

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  ...
edited by 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  ...
edited by 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:

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

edited by 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:

https://blogs.vmware.com/vsphere/2019/02/understanding-the-vcenter-server-converge-tool.html

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).

edited by 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  ...
edited by 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  ...
edited by 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  ...
 
showing posts tagged with 'vmware'