Image Image Image Image Image Image Image Image Image Image

Ubuntu Server | November 28, 2020

Scroll to top

Top

No Comments

Comandi utili VMware Esxi

Comandi utili VMware Esxi
Francesco Gabriele

Questi comandi eseguiti da shell possono salvarti la vita… 😀

Rebooting a running VM Guest

1. ssh into ESXi host
2. List all VMs
vim-cmd vmsvc/getallvms
3. Get the power state of the VM in question - vim-cmd vmsvc/power.getstate <vm-id#>
vim-cmd vmsvc/power.getstate 128
4. VMware Tools Soft Reboot - vim-cmd vmsvc/power.reboot <vm-id#>
vim-cmd vmsvc/power.reboot 128

Hard Reboot that VM (this is only if you can not do it through vmtools) - vim-cmd vmsvc/power.reset <vm-id#>
vim-cmd vmsvc/power.reset 128

Get All vmsvc commands
vim-cmd vmsvc

Check guest VM IP
vim-cmd vmsvc/get.summary 128
http://robertbchase.blogspot.com/2008/12/vmware-esxi-ssh-cli-commands.html

Set Jumbo Frames on Switch0
1. List Switchs and MTU Settings
esxcfg-vswitch -l
2. Set MTU to 9000 for Switch0
esxcfg-vswitch -m 9000 vSwitch0
3. Verify
esxcfg-vswitch -l
esxcfg-nics -l

Migrate script that will convert vmdks to thin provision
http://www.bryanpopham.com/tutorials/migrate.sh.ESXi.txt

Install Drivers ESXi SSH
#1. List Drivers
esxcli software vib list
#2 Install Driver that SCP to /tmp
esxcli software vib install -d /tmp/LSI_2.27.08.036vm50-offline_bundle-637081.zip
www.tinkertry.com/lsi92658iesxi5/

RDM Sata Drives
1. Find you disk to RDM in the /dev/disks folder
ls -lah /dev/disks/

2. Make a RDM vmdk in a local datastore
vmkfstools -z /vmfs/devices/disks/naa.4xxxc6xxxxxxxxcf /vmfs/volumes/(your localDS name)/RDM.naa.4xxxc6xxxxxxxxcf.vmdk

3. Add RDM.naa.4xxxc6xxxxxxxxcf.vmdk to your VM in vSphere Client
http://blog.davidwarburton.net/2010/10/25/rdm-mapping-of-local-sata-storage-for-esxi/

Backup Config
1. Flush conf changes
vim-cmd hostsvc/firmware/sync_config

2. Make backup file & download in browser naming it configBundle.tgz
vim-cmd hostsvc/firmware/backup_config
Alternative method scp the file from /tmp/scratch/downloads/

Restore Config
1. scp configBundle.tgz to /tmp

2. Set server to maintenance mode
vim-cmd hostsvc/maintenance_mode_enter

3. Restore conf that you scp to /tmp
vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz

Submit a Comment

*

adidas yeezy 650 boost adidas yeezy boost 650 adidas yeezy 650 boost colorways adidas yeezy 650 350 2 0 boost yeezy boost 650 adidas yeezy boost 650 supreme x nike air uptempo release info adidas yeezy boost 650 v1 sample detailed look adidas yeezy boost 650 v1 sample adidas yeezy boost 650 v1 sample adidas yeezy boost 650 v1 adidas yeezy 650 boost adidas yeezy boost 650 adidas yeezy 650 boost colorways adidas yeezy 650 350 2 0 boost yeezy boost 650 adidas yeezy boost 650 supreme x nike air uptempo release info adidas yeezy boost 650 v1 sample detailed look adidas yeezy boost 650 v1 sample