Vsphere 5 – Access esxi console via putty

Reading Time: < 1 minute

With Vpshere5, vmware have added a benefit of being able to access the esxi console via SSH/Putty so you don’t have to visit the esxi server.

 To do this, login to your esxi host and type dcui. See screen shot below taken from within a putty session. (Click image to enlarge).

 

 

msg.hbacommon.outofspace: There is no more space for virtual disk

Reading Time: 2 minutes

I have setup a test vmware 4 environment at home, using esxi4. The setup consists of a few virtual machines, two esxi servers and a storage box.

Today, i found that a couple of machines were not booting correctly due to the datastore they lived on running out of free space. I created a few snapshots a while ago but did not remove them so had built up over time. Do not try the same on a live environment. Mine was just a test environment.

Anyway, the error which appeared is shown below

I had the option of extending the datastore which would have resolved the issue, but decided to resolve the difficult way. 

I tried removing all snapshots but received error below: Click to enlarge

 

‘The operation cannot be allowed at the current time because the virtual machine has a question pending: There is no more space for virtual disk. You might be able to continue this session by freeing disk space on the relevant volume and clicking retry.’

I tried migrating but obviously couldn’t due to a snapshot being attached.

I tried powering down the machines so i could attempt to remove the snapshots, but machine would not  power down.

Finally, i decided to kill the machine so enabled SSH on the esxi host the machines were sitting on. Instruction on how to enable SSH can be found at https://cloudbuild.co.uk/?p=1531

1) Logged onto the esxi 4 host using putty. The below also works with esxi5
2) I typed ps | grep vmx  
The command  above listed the vmx’s on the host. See screen shot below. Your output should be similar.

3) The first column lists the PID and the second contains the parent PID. Make a note of the Parent PID in the second column for the VM you are experiencing issues with.

Please take a note of the correct parent PID as you could shutdown the wrong VM.

4) I typed kill ‘Parent PID’ – replace parent pid with the id you noted in step 3. Press enter

5) Wait for a few seconds and carry out step 2 again, to check whether the machine has disappeared.

6) My results showed that i had successfully killed the VM parent PID. If you find that the parent pid still exists, give it a minute. If the issue still exists, try   kill – 9 ‘Parent PID’   replace parent pid with the id you noted in step 3. Press enter

7) After carrying out the above steps, i was able to remove the snapshots succcessfully and migrate the machine to a larger data store.

How to enable SSH via Vsphere 4

Reading Time: < 1 minute

There are two ways to enable SSH to allow you to putty onto a host.

1) Enable physically by visiting the esx/esxi host.
2) I am going to explain how to enable via the vsphere client incase you can’t get to host due to it being at a remote site, and you don’t have ilo access.

1) Firstly, access vsphere
2) Click your esx/esxi host
3) Click the configuration tab
4) Click Security Profile, located under the software box
5) Click properties located towards the right
6) Locate Remote Tech Support (SSH) and click. Status should be stopped by default. See screen shot below.


7) Click the options button
.8) Select your choice. I’m going for Start automatically
9) Click the Start button
10) Click OK and OK again