Tiny Deathstars of Foulness

You shouldn’t have to reboot your ESX servers very often. But when you do, you might want the virtual machines to start up automatically. To configure a virtual machine to start up (or shut down) automatically select the host and click on the Configuration tab.

Then click on virtual machine Startup/Shutdown and click on Properties, selecting “Allow virtual machines to start and stop automatically with the system”. As I mentioned in a previous article, you can also configure the operating system to start after a brief delay by providing a Default Startup Delay time, allowing time for booting systems to run scripts or to throw them into Safe Mode. You can also configure automated shutdown options at this screen as well.

Also use the Move Up and Move Down options to indicate what order virtual machines start when the system starts. Click Save and the configs are written to the system.

June 10th, 2013

Posted In: VMware, Windows Server

Tags: , , , , , , , ,

Sometimes you need to boot a system into Safe Mode. But with a virtual machine you don’t have enough time to put a Windows system into Safe Mode. To put a normal system into safe mode, you can just hit the F8 key when Windows is booting. But with a virtual machine the BIOS screen is by default set to go away in 0 settings. Therefore, you need to add a boot delay to mimic a physical host. To get a virtual machine in ESX to have such a boot delay, view all the virtual machines and then right click on the virtual machine you need to configure a delay for.

Next, click on Edit Settings and then click on Option. In the options screen, click on Options and then Boot Options. At the Boot Options screen, set the Power-on Boot Delay to 5000ms, which will give you a 5 second delay. Given that 5 second delay you will be able to click on a booting virtual machine and then press the F8 key. From here, open the console window for the virtual machine and start the boot process.

June 8th, 2013

Posted In: Microsoft Exchange Server

Tags: , , , , , ,

To register a virtual machine using VMware’s ESX and ESXi is a pretty straight forward process. You will use the vmware-cmd and respectively. On ESX, simply issues the vmware-cmd followed by the path to your vmx file and then the register verb. For example, if the path to the vmx were /VMs/XP/xp.vmx then you would use the following command to register that virtual machine to ESX:

vmware-cmd /VMs/XP/xp.vmx register

ESXi (and vSphere) are just a bit more complex (what, bein’ perl and all). You will need to define the -H for the host, the -U for username and the -P for password as well. The path to the vmx and the register verb follow the operators.

January 17th, 2011

Posted In: VMware

Tags: , , , , ,

Most of us will be familiar with the df command. But in ESX, you use the vdf command, located in /usr/sbin. Running the vdf command will net you similar output to what you see with df. Simply run the following to see free space on each of your disks:

vdf -h

You can also list all of your data stores to correlate the vdf output with esxcfg:

/usr/sbin/esxcfg-scsidevs -c

Or to list LUNs:

/usr/sbin/esxcfg-mpath -L

BTW, if you’re running out of free space, in my experience, first look to your snapshots and check how much space they’re consuming…

April 28th, 2010

Posted In: VMware

Tags: , , , ,

The ESX firewall can be managed from the command line. If you login over SSH you can then use the following command to view (query) all of the active firewall entries (for those BSD/OS X folks, this command is similar to the ipfw command):

esxcfg-firewall –q

So we’re going to step through opening ports 3389 and 25 UDP and TCP into and out of our VM. We’re going to continue using the esxcfg-firewall command, as it’s the primary interface into the ESX servers/clusters firewall engine. We’re also going to use the -o option to open the port and then follow that up with a comma delimited set of parameters for the port (port # followed by whether it’s tcp or udp followed by whether it’s incoming or outgoing followed by a friendly name, which is just for us to be able to find our rules later):

esxcfg-firewall -o 3389,udp,in,LDAPUDPIN
esxcfg-firewall -o 3389,udp,out,LDAPUDPOUT
esxcfg-firewall -o 3389,tcp,in,LDAPTCPIN
esxcfg-firewall -o 3389,tcp,out,LDAPTCPOUT
esxcfg-firewall -o 25,tcp,in,SMTPTCPIN
esxcfg-firewall -o 25,tcp,out,SMTPTCPOUT
esxcfg-firewall -o 25,udp,out,SMTPUDPOUT
esxcfg-firewall -o 25,udp,in,SMTPUDPIN

April 14th, 2009

Posted In: VMware

Tags: , ,