Category Archives: VMware

VMware Workstation, ESXi

VMware ESXi: A (incomplete) list of host commands Part 2

Hi,

here is part 2 of my (incomplete) list of ESXi shell commands

Managing virtual machines

First get the VMID of the vm you want to manage, you need this ID in the following commands

vim-cmd vmsvc/getallvms

Vmid  Name File Guest OS  Version  Annotation
36 .......................................

Power On
vim-cmd vmsvc/power.on 36

Power Off (Soft)

vim-cmd vmsvc/power.off 36

Power Off (Hard)

get the world ID of the virtual machine

esxcli vm process list

TestComputer

World ID: 1625788
Process ID: 0
VMX Cartel ID: 1625786
UUID: 56 4d 9e d3 8b ce ab 59-9b 22 ac 87 40 6c 48 c3
Display Name: TestComputer

And kill them

esxcli vm process kill -t [soft,hard,force] -w

esxcli vm process kill -t hard -w
1625788

Reboot a virtual machine
Continue reading VMware ESXi: A (incomplete) list of host commands Part 2

Advertisment to support michlstechblog.info

VMware ESXi: A (incomplete) list of host commands Part 1

Hi,

here is a list of some cli’s  to control a VMware ESXi host from the command line. Enable the ESXi shell and login to console or connect with a ssh client remotely.
Management
Restart Management, HA Services
/sbin/services restart

Installing Software. List/Install/Uninstall  VIBs (vSphere Installation bundle)

List vibs

esxcli software vib list

Install a vib

esxcli software vib install -v file:/tmp/[NewVIB].vib

Uninstall a vib (determine the Name of the VIB by the list command)

esxcli software vib remove -n VIBname

Install a patch

esxcli software vib install /tmp/[patchName].zip

Network

firewall state

esxcli network firewall get

Firewall rules
Continue reading VMware ESXi: A (incomplete) list of host commands Part 1

VMware: Limit the maximum number of snapshots

Hello,

in vCenter there is no global configuration parameter to limit the number of snapshots for the virtual machines. The only way is to add a limit in the vmx config file or in vCenter configuration parameters of a single virtual machine.

To set a limit of snapshots which can be taken add

snapshot.maxSnapshots = "6"
or open the configuration parameters window in vCenter and set it there.
vmware-snap-limit
Michael

VMware: Mount a .vmdk virtual disk from command line

Hi,

sometimes you want to modify some offline Vmware virtual disks from command line. For example to copy or edit config files or set some parameters in the Windows sysprep.xml file.

The VMware Workstation does not provide  a command line utility for this procedure. But there is a way to do this. Download and install the Virtual Disk Development Kit.

After installation a vmware-mount.exe command exists in the bin Folder of the installation directory.

To mount a disk readonly, choose a drive letter (X: in this example), start a cmd.exe as Administrator type the command like this:

first, change to the VMware Virtual Disk Development Kit Program folder

cd "C:\Program Files\VMware Virtual Disk Development Kit"

or append the program bin folder to PATH variable

set PATH=%PATH%;C:\Program Files\VMware Virtual Disk Development Kit\bin;


vmware-mount.exe X: d:\temp\VirtualDisk.vmdk

to mount the disk writable append /m:w at the end of the command:

vmware-mount.exe X: d:\temp\VirtualDisk.vmdk /m:w

Unmounting is quite simple:

vmware-mount.exe X: /d /f

Have fun

Michael

VMware: Computer Account is disabled after deploying Windows Clients

Hello,

last week I had to deploy 25virtual Windows (XP) Clients an on VMware ESX Cluster. One of the requirements was that the clients must be member of a Windows Active Directory.

After setting up vCenter (copy sysprep) I installed a reference Windows XP vm, convert them to a template and defined a Customization Specification like this:

Initial Customization Specification
Initial Customization Specification

During the cloning process, by using the template with the recently created custom spec, the domain join always fails and the Computer Account was disabled at each try.

Ok, now I tried modify some parameter of the Custom Specification:

  • Changing the Domain from fqdn to the NetBIOS Domain “SUB”
  • Altered the Username to SUB\joinuser or joinuser@SUB or joinuser@sub.domain.org

Continue reading VMware: Computer Account is disabled after deploying Windows Clients