Table of Contents
VMware Misc
VMware Enable SCP Outgoing
From the command line enter the following.
esxcli network firewall ruleset set -e true -r sshClient
VMware Access Filesystem
In order to be able to Access and or mount VMware Filesystem you need to have vmfs-tools installed.
apt-get install vmfs-tools
Next list the content of the datastore.
ls -la /dev/disk/by-id/
To mount for example sdd1 you would probably do something like this.
mkdir /tmp/mount vmfs-fuse /dev/sdd1 /tmp/mount/ ls -la /tmp/mount/
Remember to unmount when done.
umount /tmp/mount/
Kill a unresponsive and or invisible VMguest by using ssh directly on the hypervisor.
ssh into the hypervisor that is hosting the guest example we want to kill public_mailserver_1.local:
ssh -l root hypervisor_dns_name or ip
Get a list of the VM's currently running.
esxcli vm process list
we will get a list of VM's with attached info. We are interested in this machine:
public_mailserver_1 World ID: 19485020 Process ID: 0 VMX Cartel ID: 19485013 UUID: 42 08 83 01 2f 1e f0 9c-19 2c 73 3e b4 8e 8b 90 Display Name: staging-csi7-db01 Config File: /vmfs/volumes/554b6ebc-96677e98-3229-a41f72cefa41/public_mailserver_1/public_mailserver_1.vmx
In order to kill the machine we issue the following command:
esxcli vm process kill –type=soft/hard/force –world-id=xxxxxx
To kill staging-csi7-db01.intnet the command parameters to use would be the following:
esxcli vm process kill --type=hard --world-id=19485020
To see if the machine was killed we could list all VM's again. If the machine is still present use the force paramater instead.
PowerCLI install and use VMware PowerCli cmdlets on windows
Launch Windows Powershell and load the VMware PowerCli Snapins
# Adds the base cmdlets Add-PSSnapin VMware.VimAutomation.Core Add-PSSnapin VMware.VimAutomation.Vds # This line below is optional and adds some helper functions and appearance this can be modified for your needs. . "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-VIToolkitEnvironment.ps1"