Oct 9

Updated for ESXi 4
If you have a linux box and a 1 gig thumb drive, here is how to install VMWare ESXi onto that drive in 2 commands.    Download the ESXi ISO and then mount it in linux like so

mount -t iso9660 -o loop VMware-VMvisor-Installer-4.0.0-171294.x86_64.iso /mnt/esx

Now we’re going to write the installer file to the thumbdrive. I’m assuming the thumbdrive is /dev/sdb

tar xvzf /mnt/esx/image.tgz usr/lib/vmware/installer/VMware-VMvisor-big-171294-x86_64.dd.bz2 -O | bzip2 -d -c | dd of=/dev/sdb

This will take a little bit, but once it’s done you’re good to go. pop that drive into a USB boot capable board, configure your storage and away you go!

Jul 27

Sometimes VMs in ESX get into a bad way and just won’t shut down. When you absolutely, positively have to kill every reference to a VM, nothing does the job quiet like your Fathers light sabre the vmsupport command.

vm-support -x

Will give you a list of all of the running VMs and their VMIDs.

vm-support -X VMID

Will kill that VM like Qui-Gon Jinn.

Jul 7

nabbed from command line fu with a clarification from blalor. appears that this is only for Fusion,
You can start a virtual machine in vmware without using the gui by using the vmrun command line.

vmrun start /PathTo/virtual_machine.vmx nogui

Apr 23

I enabled ssh on my ESXi server to help me troubleshoot what appears to be a hardware problem.  Hardware problems can be a real pain to troubleshoot and since this one involved the USB storage that was encapsulating my ESXi install, sometimes rebooting when it was broken didn’t really work. It would just hang and I would have to power cycle the server.  Turns out that was an issue with ESXi trying to be responsible and syncing the filesystems  before it goes into reboot and, when the Hypervisor1 and Hypervisor2 fileystems aren’t available, this turns into a dead lock.  Not to fear! simply ssh into the server and, without using tab completion, type this entire command into the console and hit enter.

reboot -f -n

That tells ESXi to reboot without doing a sync/flush to disk and without going through init. Essentially pulling the power cord. It’s drastic and it can cause no shortage of issues on your VMs filesystems, but when you are remote and can’t reach the cord this is a good option to have!

Apr 22

In an effort to streamline the install of ESXi, vmware removed the management console that was used by so many advanced administrators to get day to day work done. This wouldn’t be a problem if adequate substitutes had been provided, but the Virtual Infrastructure Client and remote command line just don’t cut it. Here is how you can re-enable ssh on an ESXi server and work around not having SCP.
First, enable ssh by going to your physical ESXi console, logging in and hitting Alt + F1.
When you Alt + hit F1, you will see a screen that doesn’t have any way for you to interact with it. type the word “unsupported” into that screen and press enter. You will now be prompted to enter your password and you’ll get a big message about this being an unsupported operating mode for ESXi. Ignore that.
Now you need to edit the /etc/inetd.conf file using vi. Find the line that starts with
#ssh
and remove the #.
reboot your server and ssh should be working (you could alternatively kill -HUP inetd, but rebooting works too).
Unfortunatly, while this gives us ssh access, it doesn’t give us scp (or sftp which is just a gui frontend to scp). But no worries, scp is just a GUI around STDIN and STDOUT redirect in ssh. Lets say we wanted to scp a file called test.txt over to our ESXi machine. Using ssh from my linux box (might work in ssh for windows, haven’t tried that) I run the following command

cat test.txt | ssh root@esx “cat >test.txt”

And test.txt is transferred to my ESXi box using ssh! I’ve already dumped several ISO and VMDK files straight into the SATA based VMFS stores on my ESXi server.

« Previous Entries