Posts

SharesFacebookTwitterGoogle+PinterestEmailSumoMe VMware ESX – “Unable to access a file since it is locked

Image
After transferring and/or trying to restart a VM in ESX you may be presented with the error message “Unable to access a file since it is locked”. Now what you need to do is work out what is actually locking this file and then (unsurprisingly) find a way to unlock it. Generally the problem will be caused by one of three things. 1.  Process Lock:  There is a process on the ESX server that still has hold of a file(s) used by the VM.  This is one of the most common causes.  To resolve this there have been a couple of good VMware Forum postings  here  and  here  that have been consolidated to  this useful posting over  at  GabesVirtualWorld.com   (*Note: It is worth checking out the comment by Kent at the bottom of the posting).  Also, check out Tecumseh’s posting  here . 2.  Disk Naming Conflict:  Two or more disks with the same VMDK name. This can be caused by another disk with the same VMDK file name...

VMware ESX – How to easily recreate a missing or corrupt VMX file.

Image
VMware ESX – How to easily recreate a missing or corrupt VMX file. by  Simon Seagrave   32 Comments Do you have a VM that is missing its VMX file or maybe the VM’s VMX file has corrupted? Now you could manually recreate a missing or corrupt VMX file (restoring one from a backup would be the best solution) but a quick and easy way for recreating it is to create a new VM within the VMware Infrastructure Client (VIC) or via CLI/RCLI.  During the creation process point the new VM’s drives to the existing disk (VMDK) files of the server with the corrupt/missing VMX file. Below are the basic steps for doing this via the VMware Infrastructure Client interface. Before beginning to start the process to recreate the VMX file, if it exists, remove the VM from the VMware Infrastructure Clients inventory list (right click on the VM and select ‘Remove from Inventory’). Also if you are trying to replace a corrupted VMX file then rename (preferable option) or delete the o...

Running virtual machine is inaccessible and has missing configuration files (2006648)

Symptoms A running virtual machine shows as inaccessible in vCenter Server A running virtual machine shows as Unknown when vSphere Client is connected directly to the host. A running virtual machine is missing the .vmx file on the datastore but may have other related files in the virtual machine directory. You can remote into the virtual machine and it is still up and running. Cause This issue occurs if the .vmx file of a running virtual machine has been deleted. Resolution To resolve this issue, recreate the virtual machine. To recreate the virtual machine: Install VMware Standalone Converter on the running virtual machine. To download VMware Converter Standalone, see the  VMware Download Center . Perform a V2V conversion and create a new virtual machine, which creates all of the necessary configuration files. Log in to the newly converted virtual machine and reboot. If the conversion was successful, the virtual machine boots properly. If not, re-try...

Unable to Start VM in ESXi 6.5

https://communities.vmware.com/thread/567780

Some Useful Storage Commands

Command to view all LUNs presented to a host #esxcfg-scsidevs -c And to check about a specific LUN, #esxcfg-scsidevs -c | grep  naa.id To find the unique identifier of the LUN,  you may run this command: # esxcfg-scsidevs -m To find associated datastore using a LUN id #esxcfg-scsidevs -m|grep  naa.id To get a list of RDM disks, you may run following command , #find /vmfs/volumes/ -type f -name ‘*.vmdk’ -size -1024k -exec grep -l ‘^createType=.*RawDeviceMap’ {} \; > /Datastore123/ rdmsluns.txt   This command will save the list of all RDM disk to a text file  rdmluns.txt  and save it to Datastore123. Now Run following command to find the associated LUNs, #for i in `cat /tmp/ rdmsluns.txt `; do vmkfstools -q $i; done This command will give you the  vml.id  of rdm luns, Now use following cmd to map  vml.id  to  naa.id #ls -luth /dev/disks/ |grep  vml.id     in output of t...

Windows Server: How to Repair the Boot Files in Windows Server 2008 or 2008 R2 if the Server Won’t Boot

There are a number of possible causes for the failure of a server to boot into Windows. This article deals with a problem in the boot files and demonstrates how to repair them. Solution IMPORTANT: Drive Letters Change in WinRE When booting to the Windows Recovery Environment (WinRE), the drive letters are assigned on a first-come, first-serve basis. For example, the C: drive in Windows will often have a different letter in WinRE. The DiskPart utility can be used to keep track of the drives and what is stored on them. Restoring Boot Files   Note:  If there is no System Reserved partition. It is okay to select the drive containing the Windows folder . First Partition: 100 MB System Reserved (No drive letter) Second Partition: 60 GB (C:) OS Third Partition:1.5 TB (D:) Data DVD Drive: E:   Note:  The DVD drive’s letter changes from E: to F: in WinRE. Boot to the Windows Server DVD. Open the command prompt. Server 2008 R2 If no driver is needed, p...