Hello,
While cleaning up my data store I accidentally removed a VMX file for a running machine.
The machine is still running (I can remote to it etc), but working with the VM in VIC continually prompts with an error that the file is missing. Although I can go into "Edit Settings" and it shows everything correctly, until I click OK and it errors again.
Is there anyway to build a new VMX file from the running config?
Thanks, any help would be appreciated.
Hi there, the main this is that the vmdk (and -flat.vmdk) files still exist. You'll basically need to know the amount of memory, number of NICs, number of virtual CPUs and also the SCSI controller that the VM is using (LSI logic or Buslogic). What OS is the VM running?
Then do the following after you power the current VM down. ESX may have a problem closing the process related to the VM, so if you shut down the VM from within the VM, open a session to ESX and run esxtop to see if the process for the VM actually terminates. That way you'll ensure that nothing is still locking the vmdk for the VM.
1) Create a new VM with the specs you want and a small HD.
2) Edit the VM and remove the HD.
3) Copy the VMDK over from the source to new folder with vmkfstools -i /source_path/source.vmdk /dest_path/destination.vmdk
4) Edit the VM, add a HD and use an existing VMDK file - select the new VMDK that was created.
5) Power on the VM
You may need to reset your IP addresses in the VM after that.
Hi,
Create a new VM with identical configuration and use the exisiting disks.
regards
santhosh
How do I do that, do I just create a new VM, have it create an identical size disk, then copy the other one over it?
Hi there, the main this is that the vmdk (and -flat.vmdk) files still exist. You'll basically need to know the amount of memory, number of NICs, number of virtual CPUs and also the SCSI controller that the VM is using (LSI logic or Buslogic). What OS is the VM running?
Then do the following after you power the current VM down. ESX may have a problem closing the process related to the VM, so if you shut down the VM from within the VM, open a session to ESX and run esxtop to see if the process for the VM actually terminates. That way you'll ensure that nothing is still locking the vmdk for the VM.
1) Create a new VM with the specs you want and a small HD.
2) Edit the VM and remove the HD.
3) Copy the VMDK over from the source to new folder with vmkfstools -i /source_path/source.vmdk /dest_path/destination.vmdk
4) Edit the VM, add a HD and use an existing VMDK file - select the new VMDK that was created.
5) Power on the VM
You may need to reset your IP addresses in the VM after that.
You don't want to overwrite the existing VMDK files and regardless of the method you use, first run vmkfstools -i to make a copy of the virtual disk. That way if anything goes wrong you'll have a backup.
When you add a virtual disk to a VM you have the option to use an existing disk or to create a new one. Choose the existing disk option and then browse to your vmdk file.
This worked well, thanks!
Will this work if there are snapshots?
Will this work if there are snapshots?
No - it is better to extract the vmx-file from a recent vmware.log.
If you lost both the vmware.logs and the vmx-file then post the vmdk-descriptorfiles ( use WinSCP to download them )
then we can create a vmx for you.
Ulli