Vmware: Difference between revisions

From DWIKI
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Links=
*https://www.altaro.com/vmware/top-20-esxcli-commands/
*[https://kb.vmware.com/s/article/1030381 Understanding SCSI device/target NMP errors/conditions in ESX/ESXi 4.x and ESXi 5.x/6.0 (1030381)]
*[https://www.vmguru.com/2015/12/best-practices-running-vmware-with-nfs/ Best Practices running VMware with NFS]
=FAQ=
=FAQ=
==Mount vmfs in linux==
==Cloning on command line==
==Cloning on command line==
Used vmkfstool and create new VM using "Use existing virtual disk"
Used vmkfstool and create new VM using "Use existing virtual disk"
Line 5: Line 13:
==Info==
==Info==
  esxtop
  esxtop
==SNMP==
*https://blogs.vmware.com/vsphere/2012/11/configuring-snmp-v1v2cv3-using-esxcli-5-1.html
*https://docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.vcenterhost.doc/GUID-8D52E028-885A-4FE3-A00B-5403991D725D.html
*https://computingforgeeks.com/how-to-monitor-vmware-esxi-host-using-librenms/
esxcli system snmp set --communities public
esxcli system snmp set --target <server ip>@161/public
esxcli system snmp set --enable true
===snmpd has not been enabled===
Means the GUI is stupid
esxcli system snmp set --communities public
esxcli system snmp get
https://serenity-networks.com/how-to-enable-snmp-on-esxi-5-5-5-6-for-remote-monitoring/
===snmpd: No library available for additional MIBs: No such file or directory===
===snmpd: No library available for plugin VS support===
===Error: Unknown command or namespace system snmp set –communities public===
because it's a mess
===Must first configure at least one v1|v2c|v3 trap target===
===Error: Unknown command or namespace systen snmp test===
another secret


==Remount nfs==
==Remount nfs==
Line 12: Line 54:
==Get system UUID==
==Get system UUID==
  esxcli system uuid get
  esxcli system uuid get
==Network configuration==
https://www.altaro.com/vmware/vsphere-networking-basics-part-1/
== Show network addresses ==
esxcli network ip interface ipv4 get
== Show network interfaces ==
esxcli network ip interface list
==Set network address==
esxcli network ip interface ipv4 set -i vmk0 -t static --ipv4=192.168.12.11 -N 255.255.255.0
==Show hardware info==
esxcli hardware pci list
==Show routing table==
  esxcli network ip route ipv4 list
==Show VM information==
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/get.guest <vmid>
==Start VM from commandline==
Esx4/5/6.0
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.on <vmid>
==List network interfaces==
esxcfg-nics -l
[[Category:Virtualization]]

Latest revision as of 09:21, 31 October 2023

Links

FAQ

Mount vmfs in linux

Cloning on command line

Used vmkfstool and create new VM using "Use existing virtual disk"

Info

esxtop


SNMP

esxcli system snmp set --communities public
esxcli system snmp set --target <server ip>@161/public
esxcli system snmp set --enable true


snmpd has not been enabled

Means the GUI is stupid

esxcli system snmp set --communities public
esxcli system snmp get

https://serenity-networks.com/how-to-enable-snmp-on-esxi-5-5-5-6-for-remote-monitoring/


snmpd: No library available for additional MIBs: No such file or directory

snmpd: No library available for plugin VS support

Error: Unknown command or namespace system snmp set –communities public

because it's a mess

Must first configure at least one v1|v2c|v3 trap target

Error: Unknown command or namespace systen snmp test

another secret

Remount nfs


Get system UUID

esxcli system uuid get


Network configuration

https://www.altaro.com/vmware/vsphere-networking-basics-part-1/


Show network addresses

esxcli network ip interface ipv4 get

Show network interfaces

esxcli network ip interface list

Set network address

esxcli network ip interface ipv4 set -i vmk0 -t static --ipv4=192.168.12.11 -N 255.255.255.0

Show hardware info

esxcli hardware pci list


Show routing table

 esxcli network ip route ipv4 list


Show VM information

vim-cmd vmsvc/getallvms
vim-cmd vmsvc/get.guest <vmid>

Start VM from commandline

Esx4/5/6.0

vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.on <vmid>

List network interfaces

esxcfg-nics -l