• Home
  • News
  • Technical Guides
  • Troubleshooting
  • Download
  • Videos
  • Top Bloggers!
  • About

VirtualVCP IT Virtualization

rynardtspies: Worst day on the job by far! 1 day ago from TwInbox

Stuck task on VM PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Rynardt Spies   
Monday, 29 June 2009 17:05

This is by no means a new issue. However, I still get support calls regarding tasks that get stuck on VMs. What do I mean by "stuck tasks"? Well, I've seen cases where a snapshot task initiated by VCB got stuck in the state of "Creating Virtual Machine Snapshot". Then VM goes down and cannot be accessed via the console, does not respond to pings, and the status of VMtools turns to "Unknown". You also cannot do "Power On" on the VM either as the "Creating Virtual Machine Snapshot" task is still showing as an active task. You can wait, but after 30 minutes, chances are that it won't sort itself out, so user intervention is required!

This is normally the approuch I take to sort this out:

1. Make sure that the VM is inaccessible to everyone and that it really is down.

2. Browse the datastore where the VM is located (best to do this via the CLI on the service console with "ls -lh") and check the time stamps of the files to see how log the snapshots, if any,have been sitting there for.
3. in VirtualCenter, or "vCenter" the VM will probably still be showing as powered on. Check on which of your ESX hosts it is running.
4. Log onto the service console of the ESX host that is running the VM. Elevate your priviledges to root.
5. Now, as the VM has an active task, you won't be able to send any other commands to the VM. You won't be able to use vmware-cmd to change the state of the VM either. Until the task that's stuck in progress has completed, the ESX host will not be able to send any power commands to the VM. The only way to now release the VM from it's sorry state and get rid of the "Active task" is to kill the VM's running process from the service console. In order to do so, you need to find the PID for the "running" VM. To get the PID do:

The Syntax is:
ps -auxwww |grep <VM-NAME>

Example:
Suppose you have a VM called WKSTNL01 The command will be:
ps -auxwww |grep WKSTNL01


This should return something like this:

root     12322  0.0  0.4   3140  1320 ?        S<s  13:32   0:03 /usr/lib/vmware/bin/vmkload_app --sched.group=host/user/pool1 /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user/pool1 -# name=VMware ESX;version=4.0.0;buildnumber=164009;licensename=VMware ESX Server;licenseversion=4.0 build-164009; -@ pipe=/tmp/vmhsdaemon-0/vmx673aca8b7403868b; /vmfs/volumes/489a1228-2bfd25b5-6a2c-000e0cc41e52/WKSTNL01/WKSTNL01.vmx

The PID in this instance is 12322. This is what we need to kill.

6. Kill the process ID with kill -9:

kill -9 12322


7. Delete any snapshots created

8. Power On the VM.

  • Add New
  • Search
  • RSS
Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Security Image
Please input the anti-spam code that you can read in the image.
Joomla components by Compojoom
< Prev   Next >
 
SocialTwist Tell-a-Friend

vmw-vcp_logo_260x40

vmw-vexpert_logo_223x40

 

View Rynardt Spies's profile on LinkedIn

 

Poll

ESX or ESXi in Production Environment?
 

What's the latest?

  • vSphere 4.1: VPXA Holds ESX Host at Ransom
  • Replacing vSphere SSL Certificates
  • The London UK VMware User Group Meeting on 15 July 2010
  • My thoughts on the VCDX Enterprise Admin Exam
  • New vSphere Patches Released on 10 June 2010

Popular

  • ESX 3i: Host in HA Cluster must have userworld swap enabled
  • ESX 3.5 on HP Proliant ML115 G5
  • VMware ESXi 3.5 on HP Proliant ML110 G5
  • Patching ESX 3.5 Using esxupdate
  • Cheap and quiet solution for a home-based ESX Server

Where Am I Today?

calendar_icon_s

Login to VirtualVCP

In order to leave comments, please log in.



  • Forgot your password?
  • Forgot your username?

Support VirtualVCP!

Information and Resources on this site are 100% free, however it costs money to run this site. Please help support this site by giving a donation.

Amount: 

RSS Feeds

VirtualVCP Virtualization Blog - ATOM Feed
VirtualVCP Virtualization Blog - RSS 0.91 Feed
VirtualVCP Virtualization Blog - RSS 2.0 Feed
VirtualVCP IT Virtualization, Powered by Joomla!; Joomla templates by SiteGround vBulletin hosting provider!

valid xhtml valid css