vmware-toolbox-cmd -v #check installed version /usr/bin/vmware-uninstall-tools.pl #uninstall ./vmware-install.pl -d #install with default values
http://www.vmware.com/support/pubs/vi_pubs.html
http://www.vmware.com/support/vi3/doc/vi3_vum_10_sizing_estimator.xls
P2V:
To start the client with US language please add the following to your windows shortcut:
"-locale en_US" #Start with US language (add to shortcut properties without ")
To preset the user information (to avoid putting it in each time) please add the following to your windows shortcut:
"-u domain\username"
Browser-URL:
https://vcenter-server.local/vsphere-client
https://vcenter-server.local/vsphere-client/?locale=en_US&csp
Appliance:
A „LUN“ (or virtual Disk) can be recognised in a VMware Virtual Maschine (Linux) with the following command:
echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host0/scan
“host1” represents the controller ID.
Another solution:
rescan-scsi-bus
Note: The package “scsitools” is required (apt-get install scsitools)!
Last solution (this works always even on older linux-derivates):
echo 1 > /sys/class/scsi_device/0:0:1:0/device/rescan echo 1 > /sys/class/scsi_disk/0:0:2:0/device/rescan echo 1 > /sys/class/scsi_disk/1\:0\:2\:0/device/rescan
The VM Kernel Port has to be mapped to the iSCSI HBA:
esxcli --server 10.6.11.11 swiscsi nic list -d vmhba38 #List the Konfiguration esxcli --server 10.6.11.11 swiscsi nic add -n vmk0 -d vmhba38 #Set HBA esxcli swiscsi nic remove esxcli -n vmkX -d vmhba3X
To restart all management agents on the host, run the command:
services.sh restart
List VM´s
vim-cmd vmsvc/getallvms
Show details/ WorldNumber:
esxcli vm process list
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>
Kill VM:
esxcli vm process kill -t [soft,hard,force] -w WorldNumber
Example:
esxcli vm process kill --type=soft --world-id=35041
ESXi 4/ 4.1:
List VM´s:
vmware-cmd -l
Start/ Stop/ Restart/ Suspend/ State of VM´s:
vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx start
To stop VM/VPS, enter:
vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx stop
To reset VM/VPS, enter:
vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx reset
To suspend VM/VPS, enter:
vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx suspend
Find out if OpenBSD VM is on or off:
vmware-cmd /disk2.vmware/vms/OpenBSD/OpenBSD.vmx getstate
vim-cmd vmsvc/getallvms #Overview vm´s
esxcli software vib list | egrep ixgbe #Show "vSphere Installation Bundle" (vib) esxcli system module list |grep ixgbe #Show "is loaded" and "is active" esxcli software vib get -n ixgben #Detailed view esxcli system module set --enabled=false --module=ixgben #Deactivate NIC-module "ixgben". Reboot is required!
ESXi 5.x:
esxcli storage nfs add -H HOST-IP-OR-FQDN -s NFS-Share-Name -v DataStoreName esxcli storage nfs remove -v NFS_Datastore_Name esxcfg-nas -l esxcli storage nfs list
/var/log # less vobd.log #network /var/log # less vmkernel.log | grep -i doubt /var/log # less vmkernel.log | grep -i dead /var/log # less vmkernel.log | grep -i want /var/log # less vmkwarning.log
To view the status of your vmnics, you can use the
esxcfg-nics -l esxcli network nic list
To get networkdevice driver information:
ethtool -i vmnicX ethtool -i vmnic11
Note: Please run previously “esxcfg-nics -l” to get a summary of networkdevices or have a look on vSphere-Client → Configuration → Networking
When using an SSH shell or local console session on ESXi 5.5 and 5.1:
watch ntpq -p localhost_or_127.0.0.1
When using a Linux client for ESXi/ESX 4.x:
watch "ntpq -p ESX_host_IP_or_domain_name"
esxcfg-firewall -s #Show all services esxcfg-firewall --enableService sshClient #Enable sshClient
Copy a virtual disk (*.vmdk)
vmkfstools -i source.vmdk destination.vmdk
Create a new virtual disk with cmdline:
vmkfstools -d thick -a lsilogic -c 30G disc.vmdk #ESX3, ESX3,5 vmkfstools -d eagerzeroedthick -a lsilogic -c 30G disc.vmdk #ESX4, 5, ESXi 4,5
Convert a VMWare Server disk to ESX as follows:
vmkfstools -i ATIX_SLES10_SP3-s001.vmdk -d eagerzeroedthick ATIX_SLES10_SP3_thick.vmdk #Convert an existing VMWare Server disk into "thick" format esx4 disk vmkfstools -i Win2ksource.vmdk Win2Knew.vmdk #Convert an existing VMWare Server disk into a esx4 disk
Get/ change UUID (e. g. if a disk has been restored from backup):
vmkfstools -J getuuid /vmfs/volumes/datastore/VM/vm.vmdk vmkfstools -J setuuid /vmfs/volumes/datastore/VM/vm.vmdk
UUID doesn´t need to be changed!
Manage the ESXi Server via the vMA (vSphere Management Assistant):
1. Access the vMA with the “vi-admin” user (e.g. SSH)
2. Add a server as follows:
sudo vifp addserver <servername>
3. Switch to the ESXi with the following command:
vifptarget -s x.x.x.x
Create a virtual shared disk:
vmkfstools -d eagerzeroedthick -a lsilogic -c 500G /vmfs/volumes/storage_name/disk.vmdk
More vMA commands:
resxtop -server IP #"top". Enter "n" to show NICS and related VM´s
List all VM´s on console:
vim-cmd vmsvc/getallvms
This should allow root user to access VMware ESX box remotely using SSH.
To share a virtual disk you have to edit the “*.vmx” config-file as follows:
Add at the end of the file add:
disk.locking = "false"
Additionally you have to change
scsi0.sharedBus = "none"
to
scsi0.sharedBus = "virtual"
The ID number behind scsi (“0” in the example) represents the SCSI Controller ID!
To enter Bios add
bios.forceSetupOnce = "TRUE"
to the *.vmx config file and you are entering once the Bios
esxcli swiscsi nic remove -n vmk2 -d vmhba38 esxcli swiscsi nic list -d vmhba38
vmware-uninstall-tools.pl
Overview Services:
Service Description | Service Name |
---|---|
VMware VirtualCenter Server Service | vmware-vpxd |
Embedded vPostgres Database service | vmware-vpostgres |
VMware Tools Service | vmware-tools-services |
VMware vSphere Profile-Driven Storage Service | vmware-sps |
VMware vCenter Inventory Service | vmware-inventoryservice |
VMware vSphere Network Dump Collector service | vmware-netdumper |
VMware vSphere Log Browser | vmware-logbrowser |
VMware vSphere Auto Deploy service | vmware-rbd-watchdog |
VMware vSphere Web Client | vsphere-client |
[For vSphere 5.1 Only] vCenter Single Sign-On 5.1 | vmware-sso |
[For vSphere 5.5 Only] vCenter Single Sign-On 5.5 - VMware Directory Service | vmdird |
[For vSphere 5.5 Only] vCenter Single Sign-On 5.5 - VMware Certificate Service | vmcad |
[For vSphere 5.5 Only] vCenter Single Sign-On 5.5 - VMware Secure Token Service | vmware-stsd |
[For vSphere 5.5 Only] vCenter Single Sign-On 5.5 - VMware Kdc Service | vmkdcd |
[For vSphere 5.5 Only] vCenter Single Sign-On 5.5 - VMware Identity Management Service | vmware-sts-idmd |
Check Version vs. Buildnumber:
CPU-Info:
vim-cmd hostsvc/hostsummary | grep cpuModel
Collecting data from vCenter and export to xml-files for documentation of the cluster. Check: