Configure .vmx file for advanced configuration scenarios

• List all VMs registered to this host (This reveals the Vmid needed for other commands):

vim-cmd /vmsvc/getallvms

• Unregister a VM

vim-cmd /vmsvc/unregister <Vmid>:
~ # vim-cmd /vmsvc/getallvm

Run it once more:

~ # vim-cmd /vmsvc/getallvms

No more exists, go to VM location:

~ # cd /vmfs/volumes/Vmfs32Bcloned/WIn7-05

• Register a VM

vim-cmd /solo/register /path/to/file.vmx:

/vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05 # vim-cmd /solo/register /vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05/WIn7-05.vmx

So it has new Vmid# 9

/vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05 # vim-cmd /vmsvc/getallvms

From <http://www.yellow-bricks.com/2011/11/16/esxi-commandline-work/>

I want to in place add this setting:

Limit Informational Messages from Virtual Machines to VMX Files

From <http://pubs.vmware.com/vsphere-55/topic/com.vmware.vsphere.security.doc/GUID-91BF834E-CB92-4014-8CF7-29CE40F3E8A3.html>

tools.setInfo.sizeLimit=104857

Note the first lines settings:

/vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05 # sed “3i tools.setInfo.sizeLimit=104857” WIn7-05.vmx

I have screwed my vmx file up 😀

/vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05 # sed “i Ahmad Sabry” WIn7-05.vmx

So how to fix it ?

Her is ID 9

Run this command:

/vmfs/volumes/550eb87c-0d0120ef-6adf-0000c9851d82/WIn7-05 # vim-cmd vmsvc/reload 9

Then check my file:

No more of ME 🙂

So now the point is not how to add some lines or settings in VMX file, but in how to reach them from DOCs while in Exam:

For getting settings about: Securing Virtual Machine

Removing Unnecessary Hardware Devices

Or

Disable Unexposed Features

Or

Disable Copy and Paste Operations Between Guest Operating System and Remote Console:

Or

Prevent a Virtual Machine User or Process from Disconnecting Devices in the vSphere Web Client:

Or

Modify Guest Operating System Variable Memory Limit in the vSphere Web Client:

tools.setInfo.sizeLimit and set the value to the number of bytes

Or

Prevent the Guest Operating System Processes from Sending Configuration Messages to the Host:

isolation.tools.setinfo.disable In the Value column: true

Or

Prevent Virtual Disk Shrinking in the vSphere Web Client:

Or

Log size and Limit the Number of Log Files in the vSphere Web Client or last to disable logging:

log.rotateSize=200000

vmx.log.keepOld = “10”

logging = “FALSE”

Set: VMX file Size:
tools.setInfo.sizeLimit = “1048576” in Kilobytes

Sending Virtual Machines performance counters into Windows PerfMon:

tools.guestlib.enableHostInfo = “FALSE”

it is disabled by default , if it is set to True, then you can collect the below:

GUESTLIB_HOST_CPU_NUM_CORES
GUESTLIB_HOST_CPU_USED_MS
GUESTLIB_HOST_MEM_SWAPPED_MB
GUESTLIB_HOST_MEM_SHARED_MB
GUESTLIB_HOST_MEM_USED_MB
GUESTLIB_HOST_MEM_PHYS_MB
GUESTLIB_HOST_MEM_PHYS_FREE_MB
GUESTLIB_HOST_MEM_KERN_OVHD_MB
GUESTLIB_HOST_MEM_MAPPED_MB
GUESTLIB_HOST_MEM_UNMAPPED_MB

Virtual Machines with RDMs Need to Ignore SCSI INQUIRY Cache:

scsix:y.ignoreDeviceInquiryCache = “true”

Low Throughput for UDP Workloads on Windows VMs When a Windows virtual machine transmits UDP packets are larger than 1024 bytes:

1- Increase the threshold in bytes at which Windows changes its behavior for UDP packets by modifying the registry of the Windows guest OS:
a-Locate the HKLMSystemCurrentControlSetServicesAfdParameters registry key.
b-Add a value with the name FastSendDatagramThreshold of type DWORD equal to 1500.

2- Modify the coalescing settings in the .VMX file for the virtual machine NIC, if the VM with VMXNET3 vNIC adapter:
ethernetX.coalescingScheme Value: rbc
ethernetX.coalescingParams Value: 16000
ethernetX.coalescingScheme Value: disabled
ethernetX.coalescingScheme Value: calibrate

Also you can search by: repeated characters when typing:

First article is what you want:

In .vmx file: keyboard.typematicMinDelay = “2000000”

Or in Configuration Parameters:

Under Name enter keyboard.typematicMinDelay In the Value field 2000000

Downgrading the virtual machine hardware version in ESX/ESXi (1028019)

· Revert to a snapshot created before upgrading the virtual machine hardware. For more information,

· Use VMware vCenter Converter Standalone and select the required virtual hardware version in the Specify Destination wizard.

· Create a new virtual machine with required hardware version and attach the existing disk from the virtual machine.

From <http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1028019>

Enabling Changed Block Tracking (CBT) on virtual machines (1031873)
From <http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1031873&sliceId=1&docTypeID=DT_KB_1_1&dialogID=592491899&stateId=0%200%20592511633>

Virtual machine does not power on when there is high CPU reservation(1001637)
From <http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1001637>

Error Messages:
operation is not allowed in current state 
CPU min outside valid range
Failed to find a host for powering on the virtual machine
Invalid CPU allocation requested for VM
> Open the <vm-name>.vmx file in a text editor and locate the line: sched.cpu.min = “3230”,The value identified in the quotes exceeds the amount of physical CPU for one core. Lower the reservation by changing this value.

Virtual machine becomes orphaned and reports a Not protected status when trying to enable Fault tolerance (1019675)From <http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1019675&sliceId=2&docTypeID=DT_KB_1_1&dialogID=592781584&stateId=0%200%20592795768>
Symptoms:
-If you try to enable Fault Tolerance on a virtual machine, it goes into an orphaned state in vCenter Server
-If you try to enable Fault Tolerance on a virtual machine, its Summary tab displays the message:
> Fault Tolerance Status: Not protected (Need Secondary VM)
Open the .vmx file in a text editor and delete the line: checkpoint.cptConfigName = “Virtual Machine Name”

Nice reference # VMX-file parameters  From <http://sanbarrow.com/vmx.html>

Advertisements

About Ahmad Sabry ElGendi

https://www.linkedin.com/pub/ahmad-elgendi/94/223/559
This entry was posted in Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s