VMWare ESXi
Steps:
- install ESXi onto the hardware (use unetbootin to create the image, don't follow the manual: it's shit)
- install VMWare vSphere client onto your PC
- Connect using the vSphere client
- In the server -> configuration -> Licensed Features (under Software) - Edit (on the right) and enter the license key: H401K-82H0M-K8F49-0H9A4-95CM0
add new user
Go to local users and groups and right click on the screen to add a new user. The password needs to be 8 characters long.
Then go to permissions and right click on the screen to add a permission. Choose the assigned role and then add the new user (on the left)
auto start vm's
under the configuration tab for the machine, at "Virtual Machine Startup/Shutdown"
Choose Properties. You can configure the startup/shutdown here.
keyboard shortcuts for console
Ctrl+Shift+Insert Sends Ctrl+Alt+Delete
Ctrl+G Transfers mouse and keyboard input from the local machine to the virtual machine (same as clicking in the window) great for when you don't have a mouse handy
Ctrl+Alt+Enter Full Screen VM
Ctrl+Alt Unlocks mouse/keyboard from VM console window, also exists full screen mode
Ctrl+Shift+X Exit VM Console
installing tools on a VM
The tools allow you to do things like copy paste into the console. In order to install the tools, you mount a CD from the internal datastore. Choose the version for the OS you have. Mount the CD, then copy the contents to /usr/local/src and unzip them. Inside this directory you run the perl scripts. For Linux you will need the kernel headers package
Resetting the password for ESXi
There is the Cisco Way and the
NB you will have to use udpkg to install gzip from the cdrom (find the deb and use udpkg -i file.deb). Also you will need nano editor because vi isn't installed with the rescue disk.
After the host was shut down, I booted up with the Linux live CD. I then ran the commands fdisk -l and ls -l /mnt/sda5/ / ls -l /mnt/sda6/ to determine the location of the most recent state.tgz file. Note that if you're using ESXi Embedded then you may only see local.tgz instead of state.tgz and you should then copy and recreate that file.
After determining where the most recent state.tgz file was located, this was copied to /tmp. gzip and tar were then used to extract local.tgz from state.tgz. If you're using ESXi Embedded then you will copy local.tgz to tmp and run gzip and tar on that file. Once local.tar was extracted the cd etc command was run followed by vi shadow
ssentially you'll want to have the root entry as root::13358:0:99999:7::: . Once you have removed the password hash, press ESC and to save the change type in :wq and press Enter. You can run cat shadow to confirm that the change was saved successfully.
Once the shadow file has been updated, you'll use cd .. to go back to /tmp and then run tar -czvf local.tgz etc to create the local.tgz file. If you're using ESXi Embedded then you'll copy this file to the drive where it came from in step 3. Otherwise you'll run tar -czvf state.tgz local.tgz to create state.tgz which should then be copied to the correct location. In the below image you'll notice that I don't always use the -v option with the tar command.
Once the file has been copied back to the /bootbank partition the host can be rebooted back into ESXi. You'll be able to login with the root account with no password and will be greeted with the familiar message to change the root password