We have a 225 GB VMDK that we've taken off 1 machine and have added to a new machine. I'm able to use Veeam and modify the folder name and the vmdk name and add it to the new server. What I'm not able to do is modify the flat file name. Once I modify that name I can no longer add the drive using Virtual Center. I was wondering if I needed to rescan the datastores for the hosts to see the new flat file or will I have to delete it and create a new one?
You need to edit the .vmdk file to point to the new name of the -flat.vmdk file.
--Matt
Thanks for the reply. I should be able to do this from the console using vi? Will try to do it today and see if I can get it sorted out. I think I've done it once before a few months ago.
Yes, a direct edit using vi or whatever text editor you're familiar wtih will allow you to do this. On the other hand, moving files from one datastore to another will rename the vm files as well.
-KjB
a simple rename of the VM in vCenter, then shutdown and do a cold migration, as KjB pointed out, will take care of the rename for you.
So I can add the vmdk with the wrong name to the new server, shut the server down and do a cold migration to another data store and it will automatically rename the vmdk to reflect the server name? I'll see if I have another datastore with 225 gb of free storage to attempt this.
yes, first do a rename of the vCenter VM, then shudown and choose migrate. That will take care of the rename.
Ok. I would have to migrate the storage to a new datastore though correct?
correct.
I would move it with vmkfstools
SSH into the host
vmkfstools -i /vmfs/volumes/Datstore01/firstvm/firstvm.vmdk /vmfs/volumes/Datastore02/secondvm/secondvm.vmdk
This is no move of the file, it makes a copy of the vmdk to the new location with a name you specify. No need to edit the vmdk file with vi as vmkfstools takes care of that.
If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points
_David thanks for the info. The issue is we're hard pressed for storage at this point, don't think we have a datastore with 225 GB of storage available I'll probably be creating a few more 400 GB Luns this week, but need to get a server up today so would need to just reuse that vmdk.
Basically what we have is Server A used to use 2 vmdk, 20 GB OS and a 225 GB Storage drive. I've removed the 225 GB drive from Server A and will be attaching it to Server B, at which point the data will be wiped and the another application installed. I was looking for a way to rename the 225 gb vmdk that will have Server A's name even though it's attached to Server B. If I just rename the flat file and try to browse to it in VI the file isn't found. I have to name it back to ServerA-flat.vmdk and then I'm able to attach it.
You should also be able to rename the disk directly, vmkfstools -E srcDisk destDisk, if you don't use the other methods. A simple rename and a vi edit will do the trick as well.
-KjB