User Tools

Site Tools


wiki:vmware


Wiki

VMWare

Networking

Remove VLAN Tagging On Management Interface

/usr/sbin/esxcfg-vswitch -p Management -v 0

Storage

Change Round-Robin IOPS Limits Per Connection

On vSphere5:

for i in `ls /vmfs/devices/disks/ | grep naa.60 | grep -v :` ; do echo $i ; /usr/sbin/esxcli storage nmp psp roundrobin deviceconfig set --type=iops --iops %IOPSNUMBER% --device=$i ;done

or

for i in `ls /vmfs/devices/disks/ | grep naa | grep -v “:”`;
do esxcli storage nmp device set –device $i –psp VMW_PSP_RR; done

List All The SCSI Paths On The System

esxcli storage core path list

NFS

Add a new NFS volume

/sbin/esxcfg-nas -a %NAME% -o %HOST% -s %NFSMOUNTPOINT%

Delete an NFS connection

/sbin/esxcfg-nas -d %CONNECTIONNAME%

List all NFS connections

/sbin/esxcfg-nas -l

Set Round-Robin As Default Policy

On vSphere 5.0 and 5.1:

/usr/sbin/esxcli storage nmp satp set --default-psp=VMW_PSP_RR

On vSphere 5.5: Verify SATP used and run

esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_ALUA

You need to reboot to apply the changes.

VM Management

VM Power Management

ESXi 4.0, 4.1 and 5.0

List the inventory ID of the virtual machine with the command:

vim-cmd vmsvc/getallvms |grep <vm name>

Check the power state of the virtual machine with the command:

vim-cmd vmsvc/power.getstate <vmid>

Power-on the virtual machine with the command:

vim-cmd vmsvc/power.on <vmid>
ESX 4.0 and 4.1

To list the path of all the virtual machines on the host:

vmware-cmd -l

Get the state of the virtual machine with the command:

vmware-cmd <path to the VMX file> getstate

Power on the virtual machine with the command:

vmware-cmd <path to the VMX file> start

vSphere CLI

Get Server Serial Number

esxcfg-info | grep "Serial N"

List Virtual Machines with snapshots

Get-VM | Get-Snapshot | Select Created, VM, SizeMB

vSphere Client

Remove SSH Warning

From vSphere Client:

Select the ESXi host from the Inventory.
Select Advanced Settings from the Software menu.
Navigate to UserVars > UserVars.SuppressShellWarning.
Set the value from 0 to 1.
Click OK.

From esxcli:

esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

ToDo

To restart the management agents on ESXi:

DCUI:

1. Connect to the console of your ESXi host.
2. Press F2 to customize the system.
3. Log in as root.
4. Use the Up/Down arrows to navigate to Restart Management Agents.

Note: In ESXi 4.1 and ESXi 5.x, this option is available under Troubleshooting Options.

5. Press Enter.
6. Press F11 to restart the services.
7. When the service has been restarted, press Enter.
8. Press Esc to log out of the system.

From Local Console or SSH:

1. Log in to SSH or Local console as root.
2. Run these commands:

/etc/init.d/hostd restart /etc/init.d/vpxa restart

wiki/vmware.txt · Last modified: 2019/12/30 08:56 by 127.0.0.1