VMware Cloud Community
J-D
Enthusiast
Enthusiast

renamed a vmdk while the VM was running

Hi,

truly a monday morning...I have a VM with different vmdk's over 3 LUN's. All vmdk's have the same name. Because of the snapshot cleanup issue I wanted to change the names so they are all different. See

I had 2 VM's in this situation and had done a shutdown of one of them. Unfortunately I used the vmkfstools -E command on a vmdk belonging to the still running VM. This command executed without problems Smiley Sad

Immediately after I realised I had renamed the wrong vmdk, I renamed it again to its original name.

I checked the console of this VM, still saw all its partitions (it has 4 partitions, each in one vmdk). I did a rescan in the disk management console and all partitions remained.

I then performed a shutdown and got a "Visual C++ error". Then the shutdown took about 10 minutes (system is shutting down...). This could be because of Exchange 2007 running on it..

After it was powered down, I powered it on again. I got one "failed to start service" but can't find it in the eventlog and all automaticaly startup services were started. I asked clients to connect to the Exchange and it seems okay...

I just got pretty lucky? Or something is still gonna be f*cked up?

0 Kudos
5 Replies
vheff
Enthusiast
Enthusiast

Hi,

Scary moment for a Monday morning then! Smiley Wink I think you'll be fine, VMWare is fairly forgiving as long as the filename is back to what it was. The errors you were seeing in Windows are probably unrelated. I assume that you can still see all your partitions after a reboot?

zhanggang
Contributor
Contributor

Is the running VM in a snapshot mode. Otherwise ESX server should not allow you to change the vmdk name.

0 Kudos
J-D
Enthusiast
Enthusiast

There were no snapshots when I started. I had previously powered down the VM and let the commit process do its work.

I would have prefered if the vmkfstools -E command would have checked if the VM was running...

This particular Exchange 2007 VM seems to be okay. The backup agent inside the VM did the backup fine. All Exchange tasks and the Symantec for Exchange plug-in are still working. pfew

Although this was caused by me, I think it's awful that VMware does not allow renaming through the GUI...in fact why do we have to rename? Isn't it obvious that sometimes we want certain vmdk's on other LUN's? Backup is really the ugly part of VMware...we have several issues with snapshots not getting committed after backup etc...

0 Kudos
J-D
Enthusiast
Enthusiast

our snapshot issues were caused by HP VMM

renaming the vmdk luckily didnt do much as there was no IO

0 Kudos
admin
Immortal
Immortal

Renaming the vmdk file that is currently being used by a running VM does not do any damage to that vmdk file because that VM (vmkernel) has already opened the file.

It does not use the file name to read/write to the file after its opened because it already has the file descriptor and knows the actual blocks on the vmfs partition where the data is stored.

This is why no damage was done to the running VM.

If you had powered off the VM and tried to turn it on again without renaming the vmdk back to its original, the VM would not have been able to find the file and therefore would fail to open it. This would not cause any damage to the vmdk file either.

0 Kudos