Noob Q I am sure, but I cannot seem to find an answer to this anywhere and the noob section doesn't seem to get many (if any) answers, so I hope it is OK to post here ...
When I do the following ...
1 - Make a target directory (eg)
mkdir /vmfs/volumes/datastore1/<targetVMdirectoryName>
2 - Copy the .vmx, .nvram and .vmsd files from a master to a clone directory
cp /vmfs/volumes/datastore1/<originalVM>/<originalVM>.vmx /vmfs/volumes/datastore1/<targetVMdirectoryName>/<CloneVMName>.vmx
cp /vmfs/volumes/datastore1/<originalVM>/<originalVM>.nvram /vmfs/volumes/datastore1/<targetVMdirectoryName>/<CloneVMName>.nvram
cp /vmfs/volumes/datastore1/<originalVM>/<originalVM>.vmsd /vmfs/volumes/datastore1/<targetVMdirectoryName>/<CloneVMName>.vmsd
3 - Copy the .vmdk file
vmkfstools -i /vmfs/volumes/datastore1/<originalVM>/<originalVM>_0.vmdk /vmfs/volumes/datastore1/<targetVMdirectoryName>/<CloneVMName>_0.vmdk -d thin
4 - Once the copies are made, go to the new VM, rename the machine to the new required name and point the HDD to the new clone .vmdk drive
5 - start the VM to test it works.
When I check the directory, in addition to the .vmx, .nvram, .vmsd and .vmdk files I created/cloned, I get two more files in the datastore1 folder for the new machine which baffle me ...
<originalVM>.nvram and <originalVM>.vmxf
I thought that the above created an independent clone. Why is there a reference created to the original source vmdk and why is the vmxf file the originalVM and not the CloneVMName?
Finally, if I then create a clone from the clone, the original source reference is retained, that is the same <originalVM>.nvram and <originalVM>.vmxf named files appear as for the original clone in the Clone2 directory but no such files are created referencing the intermediate clone.
Why are these two files propagated through the cloning process from the original source and can I delete them/how much space do they take up?
TIA
You probably forgot to adjust
nvram = "name.nvram"
displayName = "name"
extendedConfigFile = "name.vmxf"
in the vmx-file.
If those parameters do not exist they will be added automatically and new files will be created.
By the way - if you copy a VM manually I would only copy the vmx and the vmdks.
No need to copy the nvram and the vmsd (unless you have snapshots)
Hi,
Welcome to the community.
I am assuming you don't have vCenter, if you do, then you should really be using vCenter to clone VM.
Here are the files that make up a virtual machine, and they are only couple KB, the log files are couple MB
Thank you for taking the time to reply vfk. I have seen and read this before on the VMware wiki (and reviewed it again following your post) but it doesn't actually answer my question - or at least I do not recognise that it answers my question (and no, I do not have vCentre). Perhaps I can be a little more specific.
One month ago when I decided to have a play with VMware for the first time I took an old PC and installed ESXi 6.5 on it, then created a VM I called TestInstall.
That created the relevant files for the VM which I later cloned using the commands above to get the following files in the new directory datastore1/CloneTest/
CloneTest.nvram
CloneTest.vmx
CloneTest.vmsd
CloneTest_0.vmdk
When I started the CloneTest VM, having previously changed the Hard disk 1 setting to point to CloneTest_0.vmdk two new files appear in the datastore1/CloneTest/ directory
TestInstall.nvram
TestInstall.vmxf
Why TestInstall (ie the original VM from which the clone was taken)? Why do I have two nvram files and why is the .vmxf file referencing the TestInstall VM and not the CloneTest VM?
I would very much appreciate understanding this. Also, I don't understand how a Team has been formed when a simple clone is created. Obvioulsy I am missing more than one thing here, but I am really very green to all this (4 weeks experimenting and trying to understand it on and off is my total experience of VMware so far) so please bear that in mind when you reply. I really do appreciate your help as I have looked and looked but cannot find anything which makes sense to me on this.
Hi,
Those are dynmically created first VM power on. And they would be based of the VM name in vmx config file rather than display name.
Since you cloned the VM, you will have to edit vmx file to change references to old vm name and other references to source vm. Otherwise everythin in clone VM will still reference the source vm.
You probably forgot to adjust
nvram = "name.nvram"
displayName = "name"
extendedConfigFile = "name.vmxf"
in the vmx-file.
If those parameters do not exist they will be added automatically and new files will be created.
By the way - if you copy a VM manually I would only copy the vmx and the vmdks.
No need to copy the nvram and the vmsd (unless you have snapshots)
Thankyou continuum, aside from not knowing rather than 'forgot', you nailed it perfectly. This is exactly why I like to do things the 'hard way', you learn so much:-) Thanks to all who responded, you have all helpd a bit.
