VMWare: Enable SSH Daemon on ESXi 3.5

Taken from the vm-help.com website:

ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 – 3.

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you’re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Once you’ve closed the vi editor, run the command /sbin/services.sh restart to restart the management services. You’ll now be able to connect to the ESXi host with a SSH client.

Tip – with some applications like WinSCP, the default encryption cipher used is AES. If you change that to Blowfish you will likely see significantly faster transfers.

Update for ESXi 3.5 Update 2 – With Update 2 the service.sh command no longer restarts the inetd process which enables SSH access. You can either restart your host or run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox      inetd, and the process ID is 1299. Then run kill -HUP <process_id> (kill -HUP 1299 in this example) and you’ll then be able to access the host via SSH.

You can also download an oem.tgz file which will enable SSH (and FTP). Copy the file to a datastore with the VI client and then to bootbank with the command cp /vmfs/volumes/<datastore>/oem.tgz /bootbank/oem.tgz and then reboot.

Windows: Win7 DVD Doesn’t Boot from USB DVD ROM Drive

This became an issue due to an old Dell Poweredge 750 Server which we were trying to build into a simple SAN. The long and the short of it was that we needed to upgrade the BIOS to A06 (which can be found here). The BIOS is installable via floppy (no floppy drives), Red Hat Linux (tried, installer didn’t work) and Windows (Oh no, really?Can’t we just have a bootable iso image?).

OK then, let’s install XP. Hang on, it doesn’t include SATA drivers and the BIOS doesn’t do AHCI – we need to customise an XP iso. Sod that.

OK, let’s install Windows 7 then. Hang on, there’s only a CD drive in the 750. Hmm. Wait! We have a USB DVD drive! Load it in, no joy. Apparently some BIOSes don’t play with the UDF file system in the DVD. This was annoying so we gave it some further thought.

Google came up with the following – Customising a Windows Install ISO – which is a very good technical explanation of the whys and whatnots of the boot sectors and how to convert the UDF system to an ISO conforming to Joliet / ISO 9660 using Linux. I didn’t have a Linux machine handy and needed a quick fix so after reading the article I reckoned I could do it quicker with PowerISO. And it works a treat with minimum fuss:

1) Open the Windows 7 DVD image in PowerISO and go to File -> Image Properties, you will see the following:

poweriso1

 

 

 

 

 

 

 

 

 

 

 

 

 

2) De-select UDF and select Joliet, making sure you have long filenames selected in the settings below:

poweriso2

 

 

 

 

 

 

 

 

 

3) Save the image, burn to DVD, insert in the USB DVD-Rom and install! Simples!

Linux: Setting File Permissions On Folders and Directories

To set all the files and folders in a directory to 755 use chmod:
chmod -R 755 /foo/bar

To set the directories to 755 and set the file to 644 for this you can use the find command e.g.
to change all the directories to 755:
find /foo/bar -type d -exec chmod 755 {} \;
to change all the files to 644:
find /foo/bar -type f -exec chmod 644 {} \;