vSphere – Virtual Machine Will Not ‘Power Off’ (Hangs at 95%)

KB ID 0000911 

Problem

I had a virtual machine crash on me, while I was doing some work on it As I was unable to shut it down gracefully, I attempted to ‘Power Off’. It progressed to 95% and stopped there.

Expecting it to ‘time out’, I carried on with some other work and kept an eye on it. 30 minutes later there was still no progress.

Solution

1. Enable SSH access on the ESX host that is hosting the problem VM.

2. Connect to the ESX host via SSH, and logon as root. Execute the following command to see all the running VMs on this host, and list their world ID numbers.

[box]

esxcli vm process list[/box]

 

3. Once you have the World ID of the problem VM, you can attempt to power it off with the following command;

[box]

Syntax

esxcli vm process kill --type {soft,hard,force} --world-id {ID Number}
Example

esxcli vm process kill –type hard –world-id 1397444

 

[/box]

4. Check, and your VM should now be powered off.

If That Didn’t Work (How to Kill a VM)

Note: This is a last resort.

1. Issue the following command to locate the Process ID’s that are associated with the problem VM.

[box]

Syntax

ps | grep "VM Name"

Example

ps | grep "2012 Test"

[/box]

You will get all the processes, and they are preceded by two columns of numbers, the first column contains the individual PID’s. The second column is the PID for the parent process, this is the one you need.

2. Armed with your PID, you need to terminate that parent process with the following command;

[box]

Syntax

kill {PID}
Example

kill 1398644

[/box]

3. Check, and your VM should now be powered off.

Related Articles, References, Credits, or External Links

NA

You have been logged on with a temporary profile”

KB ID 0000033

Problem

After renaming (because you didn’t want to lose the profile) or deleting a user profile, from the “users” directory. You will see the following error when you attempt to log on as the deleted user;

 

Error: You have been logged on with a temporary profile You cannot access your files and files created in this profile will be deleted when you log off. To fix this, log off and try logging on later. Please see the event log for details or contact your system administrator.

You will also see Event ID 1511 logged to the machines application log.

 

Solution

1. Log on to the machine with administrative rights.

2. Click Start > In the Start Search box type Regedit {enter}.

3. Navigate to;

[box] HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList[/box]

4. Here you will see the SID (Security Identifier) for all the users on the machine, you will notice one has .bak on the end of it.

5. Delete the entire key that ends in .bak then reboot and log on as the user in question.

How to properly delete a user profile

Note: You might want to take a backup of the c:users{user_profile} folder first.

1. Click Start > in the Search/Run box type sysdm.cpl {enter} > Select the Advanced tab > User Profile Section > Settings.

2. Locate the offending profile and select delete > then confirm.

Deleting Multiple Profiles

Update 28/01/13 (Email form Rick Sparrow)

If you have several profiles to remove, this method can be quite time consuming. There is a command line utility called delprof2 that works the same as Microsoft’s old delprof, but is compatible with Windows 7. You can remove all inactive profiles instead of one at a time.

Related Articles, References, Credits, or External Links

Original article written: 23/05/09

Thanks to Rick Sparrow for the feedback.