- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
clone Vm with snapshot
I need to clone VM but I have to keep all snapshots in vCenter 6.0 (ESXi 6.0) environment, so I thought to create new datastore where I'll copy all content from source datastore.
But when I add to inventory new virtual machine I can get issues ? Duplicated VM ?
What do you suggest me please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ricky,
It's not bad to check the following links. I think they will guide you to choose the best action in your situation:
VMware – Clone a VM with snapshots (and consolidate it) – driftar's Blog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked article you indicated but It says about snapshot consolidation infac It uses vmktools to clone and consolidate disks.
I'm interesting to keep all snapshots in the new virtual machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey ricky73,
May I ask you why do you need to keep the Snapshots?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because my vm is working and It has specific snapshot which is specific state for upgrade; I can power off It for few minutes.
Now I need to make several test, which will occur much time, on new virtual machine with same snapshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can I copy all vmdk files to another datatstore and I can make 'add to inventory" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No Ricky, is not possible as the metadata of that chain is store in vCenter and when you clone the VM it will have a new MoRef ID which is not attached to the current Snapshots.
If you clone, consolidation will happen, however if your VM is currently working you can leave the original VM powered-off and work with the clone, if something fails you can power it on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all you should know you can run "add to inventory" operation just for .vmx (VM configuration file) not other types like vmdk.
BTW I think you complicate it, because it's easier to create a clone and do whatever you need, then remove that clone or create another one for another test.
Snapshot is not simple as you may think. This operation include some interaction and modification about .vmdk, .vmsn and .vmsd files. If you like to know read my post here:
Virtual Machine Snapshot Details Investigation - Part 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Infact I would copy both vmdk (cp command) and vmx files by ESXi shell directly oh host, I don't understand what happens if I add to inventory the new machine: I see or not snapshot ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> Can I copy all vmdk files to another datatstore and I can make 'add to inventory" ?
Yes - before you add the copied vmx-file to the inventory make sure it has a new unique name and also delete all vmx-file entries that have uuid in the name.
If the original VM is spread over more than one directory you may also need to adjust paths in the vmdk descriptorfiles.
________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought unique name was assigned at "power on" stage by vCenter when It detects that the copied vm has the same uuid of the source one.
In vmx file there is uuid.bios, vc.uuid, uuid.location, It's necessary to change only uuid.bios and uuid.location ? I have to the new uuid ?
While in disk descriptor vmdk file, I have to change only parentFileNameHint="/vmfs/volumes/DATASTORE/vm-name/vm-name.vmdk" where I'll change DATASTORE with the new one, ok ?