A few days ago, I was presented with a situation that I had a failed ESX Server which needed to be re-installed. How and what happened is another tory for another time though.
I wanted to get some information off of the ESX host, namely the configuration and the whole /var/log partition for the purposes of opening an SR with VMware to analyze the issue.
In this particular case I could only get into single mode on the ESX host, so I did not have any network connectivity to the outside.
So I thought that I might as well use a USB stick. Well life is not so simple. The only one I had on me was a 16GB Sandisk Cruzer. Now this USB stick was formatted in Windows, and of course because of the partition size - it was NTFS.
Now the process of mounting a USB stick on an ESX host is really very simple.
- Plug it in
- dmesg to get the identity of the drive that was just inserted (for example /dev/sda)
- mkdir /tmp/usb
- mount /dev/sda /tmp/usb
It is that simple.
I needed to copy off the files before I wiped and re-installed the host.
I thought - where else do I have an available USB stick? And Bling! Light bulb!! My phone!!!
- Plugged it into the host.
- Found the identity from dmesg
- Created the directory, mounted the device
- Copied off my files
- umount /tmp/usb
I now had the necessary files on my phone - which I could thereafter forward to the relevant people.
Handy to have a phone wherever you go, don't you think?