Failed to initialize swap file busy ESXI 4.1

Reading Time: < 1 minute

When trying to power on a VM within Vpshere client, you receive an error ‘Failed to initialize swap file busy’

This is caused by locked files.

To resolve:

1) Locate which ESXi server and Datstore the .vmx is stored
2) Login to your ESXi server using SSH/Putty  (If you need to enable remote access via SSH see https://cloudbuild.co.uk/?p=1531 )
3) Type cd (location of .vmx file) and press enter (For example) cd /vmfs/volumes/EVA_EXAMPLE_R1/Servername
4) Type ls -la and press enter (This lists all files within the selected folder)
5) Look for any files end with .lck (if they exist this is what may be causing issues when attempting to power on your VM)
6) Ensure there are no other files with extensions starting with letter the letter l otherwise you will end up deleting these. To delete the .lck files type rm .l* and press enter
7) Power your machine on
8.) If you receive the following error when powering on VM ‘Cannot open the disk or one of the snapshot disks it depends on’ go to step 9
9) Migrate the machine to a different esxi host and try again

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

Passed my VCP4 exam

Reading Time: < 1 minute

After attending the five day VMware vSphere: Install, Configure, Manage [V4.1] course which i found very interesting, i decided to go for my VCP4 exam and passed.

For those thinking about going for the exam, do lots of revision. It’s not an easy exam.

Apart from the revision, I also support multiple VM environments at my place of work. I have also setup my own test vmware environment at home consisting of two ESXi 4 servers running on HP microservers. With it being a test environment. for my storage device i use another HP microserver which comes with a 250GB SATA hard drive. I removed the hard drives from the other two servers and placed into my storage box which allowed me 750GB of storage. Not a lot, but it’s only a test environment. I installed ESXi 4 onto a USB stick which i plugged into the internal USB slot on the motherboard. Works great.

 

 
Just attended the Vspehere 5 what’s new course so will be preparing for the VCP5 exam. Also looking at upgrading my home environment to VSpehere 5 which i am looking forward to. May need to purchase some additional kit.

If you’re planning of going for the exam, good luck. Hope you pass.