Announcement

Collapse
No announcement yet.

ESXi 4 VM hangs at 95% restart and failed to kill -9

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ESXi 4 VM hangs at 95% restart and failed to kill -9

    I'm having problem with my Windows Server 2003 x86 VM, in the middle of installing IIS server, What I did is that i insert the CD into the ESXi host and then from my VSphere client I point to use the host CD-ROM drive and it hangs,

    What I've done:
    1. Force restart the VM and it stuck in 95% of restart process.
    2. in the SSL console of ESXi: services.sh restart
    3. re-register the VM from datastore view into the VCenter (with the same name VMWS05) and it hangs with Status "In Progress", after 20+ minutes it came with the following error:
    Code:
    An error occurred while communicating with the remote host.
    and the VM is not registered in the VCenter still.
    4. tried to kill the process like the following but still stuck ?
    Code:
    	~ # ps -ef | grep vmws05
    	3854821 14064 Worker#0:Win2003x86_vmws05 /bin/vmx
    	14071      vmm0:Win2003x86_vmws05
    	~ # kill -9 14071
    	ash: cannot kill pid 14071: No such process
    	~ # ps -ef | grep vmws05
    	3854821 14064 Worker#0:Win2003x86_vmws05 /bin/vmx
    	14071      vmm0:Win2003x86_vmws05
    	~ # kill -9 14064
    	ash: cannot kill pid 14064: No such process
    	~ # kill -9 3854821
    	ash: cannot kill pid 3854821: No such process
    	~ # ps -ef | grep vmws05
    	3854821 14064 Worker#0:Win2003x86_vmws05 /bin/vmx
    	14071      vmm0:Win2003x86_vmws05
    any kind of help would be greatly appreciated.

    Note:
    VMware ESXi 4.0.0 build 244038
    VMwre VCenter Server 4.0.0 build 208111


    Thanks.

  • #2
    Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

    Albertwt,

    Does the VM have any non-committed snapshots? Anything in the log files that might be of help?

    -Jason
    MCSA/MCSE 2K3,MCITP:ESA,MCTS x 4,VCP x 2

    Comment


    • #3
      Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

      Originally posted by VWA4 View Post
      Albertwt,

      Does the VM have any non-committed snapshots? Anything in the log files that might be of help?

      -Jason
      Thanks for your reply Jason !

      until now I'm still struggling with re-adding the VM back into the VMware VCenter 4,

      I've created a custom VM with the same name and just add the VMDK into my new VM it returns: Unable to access file <unspecified filename> since it is locked.

      Comment


      • #4
        Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

        Originally posted by Albertwt View Post
        I've created a custom VM with the same name and just add the VMDK into my new VM it returns: Unable to access file <unspecified filename> since it is locked.
        Albertwt,

        Try the steps in this VMware KB article to try and identify the locked file. KB is HERE.

        -Jason
        MCSA/MCSE 2K3,MCITP:ESA,MCTS x 4,VCP x 2

        Comment


        • #5
          Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

          Thanks for your reply Jason,

          the vm-support command also doesn't work sadly:

          Code:
          ~ # vm-support -x | grep vmws05
          vmid=14071      Win2003x86_vmws05
          
          ~ # vm-support -X 14071 -d0 -w /vmfs/volumes/MD3000i_VMFS1/Win2003x86_vmws05
          
          ~ # ps -auxwww | grep vmws05
          
          ps: invalid option -- a
          ps: unknown option ?
          ps: invalid option -- x
          ps: unknown option ?
          ps: invalid option -- w
          ps: unknown option ?
          ps: invalid option -- w
          ps: unknown option ?
          ps: invalid option -- w
          ps: unknown option ?
          
          3854821 14064 Worker#0:Win2003x86_vmws05 /bin/vmx
          
          ~ # kill -hup 14064
          ash: cannot kill pid 14064: No such process
          
          ~ # kill -hup 3854821
          ash: cannot kill pid 3854821: No such process
          
          ~ # ps -g | grep vmws05
          3854821 14064 Worker#0:Win2003x86_vmws0514064 14064 /bin/vmx
          14071 vmm0:Win2003x86_vmws05
          
          ~ # kill -9 14064
          ash: cannot kill pid 14064: No such process
          so I'm confused and only have the last resort of suspending all of the VMs then put the host into maintenance mode.

          Comment


          • #6
            Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

            Albert,

            In the KB article it mentions removing the .vswp file as on last attempt prior to rebooting the ESX host servers. Did you work through this process:

            Removing the .vswp file


            The .vswp file is used by running virtual machines as memory swap space. It is typically deleted when the virtual machine is powered off. If this file and its reference in the .vmx file still exist when powering back on, it can prevent the virtual machine from starting. If the virtual machine is not running, this file can safely be deleted.

            To remove the .vswp file:

            1. To move to the virtual machine's directory, run the command:

              [[email protected]]# cd /vmfs/volumes/<UUID>/<VMDIR>
            2. To delete the .vswp file, run the command:

              [[email protected]]# rm /vmfs/volumes/<UUID>/<VMDIR>/<VMNAME>.vswp

              Note: Depending on the lock held on this file, it may or may not be successfully removed.

            3. To backup the virtual machine's . vmx file, run the command:

              [[email protected]]# cp <VMNAME>.vmx <VMNAME>.vmx.bak
            4. Use a text editor to open the . vmx file for the virtual machine. Locate and delete the line:

              sched.swap.derivedName
            5. Save and exit the file.
            6. Try to power on the virtual machine. If the issue persists, proceed to the next section to remove the lock. Rebooting the ESX host

            -Jason
            MCSA/MCSE 2K3,MCITP:ESA,MCTS x 4,VCP x 2

            Comment


            • #7
              Re: ESXi 4 VM hangs at 95% restart and failed to kill -9

              thanks guys for all of your reply,

              I finally reboot the host after all and it works.
              so sad to know that one single VM crashed then the whole server must be restarted

              Comment

              Working...
              X