VMware {code} Community
Ani1984
Contributor
Contributor

Simple shell script to create linkedClones on stand alone ESXi host.

Hey Guys,

Last few days I have been working on creating linkedClones in bulk for some of the testing purpose. Since I did not had my vCenter up and running so I spend few minutes to write a simple script to create a linkClones on standalone ESX host.

My script create full clone of given VM, then creates snapshot on it and starts creating linkedClones from the delta vmdk files (it just create new directory for linkedClone VM's and copies those delta files to new location and then point it to base disk, nothing magic here ).

Now this script is working perfectly fine for me, and I can power on all the VM's which is pointing to base disk. Later I tried creating linkedClones using vCenter API's as well which seems to be doing the similar thing.

So I just want to check with you guys if my script is Ok or thats not the way to do it (this may be unsupported way of creating linkedClones but I just want a way to create linkedClones on standalone esxi host as I may not have vCenter server available everytime) ?

Tags (2)
Reply
0 Kudos
1 Reply
dinad
Enthusiast
Enthusiast

Hi there :slightly_smiling_face:

I Love the concept of this script :slightly_smiling_face: ...sadly I can't seem to get it to work :disappointed_face:

Would you mind elaborating on its usage a little as I would love to try it and can hopefully then give you some feedback.

At the esxi command line on esxi version 6U1a I tried this to start it after making the script executable with chmod +x

esx_linked_clones.sh $0 25 /vmfs/volumes/ssd_datastore/esxi03 ssd_datastore vm1-Clones true

The above didn't work so I tried this :

esx_linked_clones.sh $1 /vmfs/volumes/ssd_datastore/esxi03 ssd_datastore vm1-Clones true


which then just seems to hang.


Please advise as I really would love to get this working and then can give you feedback :slightly_smiling_face:


D

Reply
0 Kudos