I'll preface this with the obvious: I am dumb.
I am currently working from home on some scheduled maintenance on a production server running on a vm — a bitnami redmine/svn stack to be specific.
I was taking a backup of the SVN repository when the size of my virtual disk maxed out (our repository is too big, that's the maintenance). I checked in VSphere and my VM was powered off with a message similar to `There is no space for vmname-00001.vmdk. Try clearing some files on the data store and try again.
Now, I don't know enough about VMs but I assumed that this meant my VM was using vmname-000001.vmdk
. I browsed into the datastore and was about to delete the related -0000n.vmdk
files when I decided "I don't know enough about VMs, I probably shouldn't do that."… And that's when TeamViewer hiccuped and the files got deleted anyway. Yay me.
So now my VM wont start because it is missing those other -00000n.vmdk
files. The error I get is The System cannot find the file specified
.
Can I somehow get the VM running using only that last remaining -000001.vmdk
file? The timestamp on the -000001.vmdk
file was from yesterday and the other -00000n.vmdk
files were timestamped last year if it's relevant.
Best Answer
As was said in the comment ; you can edit the VMX file of your VM and point it to the base disk.
BUT from what you said regarding your snapshots, they were old. So the data in the VM, once this is done, will probably be far too old to be of any use. You can however restore whatever you backed up on top of it. At least you will avoid rebuilding your production server from scratch.
To get your VM up and running again :
Download the VMX file (name should be
vmname.vmx
) with the Datastore BrowserMake a copy of it, just in case, before modifying it.
Find the line containing
vmname-00001.vmdk
.For instance
scsi0:0.fileName = "vmname-00001.vmdk"
Change it to
scsi0:0.fileName = "vmname.vmdk"
(vmname.vmdk
being the name of the base disk)If your VM has several disks, you should have other lines starting with
scsiX:Y.filename=
. Note thatX
andY
will be unique for each line, as well as the base disk name. Repeat step 4 for each of them, replacing the value accordingly.Save the VMX file and upload it to the ESX server again.
Now your VM should boot.
Note : make sure that you really have no vmname-00XX.vmdk file before proceeding. Following this procedure will make these files useless.