VMware

This Question is Answered

2 "helpful" answers available (6 pts)
3 Replies Last post: May 4, 2009 1:20 PM by lamw  

ESXi 3.5 U4 - Linked Clone....is this still possible? posted: May 4, 2009 12:49 PM

Click to view JRP_C++_Java's profile Novice 16 posts since
Jun 27, 2007
Dear All,

I have been using ESXi 3.5 (free license) for sometime and utilise the 'linked clone' script available here: http://communities.vmware.com/docs/DOC-9202 I understand from many posts on these forums that VMware have now patched/fixed the ability for RCLI write access and so the aforementioned script no longer functions. Whilst this is an understandable move from VMware to protect its products, it does cause me some issues as I really value the ability to create a linked clone and therefore very quickly deploy a new VM.


From my own research I have a workaround, (its not great but works), basically the following script available here http://engineering.ucsb.edu/~duonglt/vmware/ (note not my work) performs a linked clone in a few steps (note brief and simplified overview):


1) Copy the master VM's .vmx and .vmxf configuration files into the new location.
2) Edit the new .vmx config file to point back to the master VM's virtual hard drive.


3) Register the new VM (basically adding it to the ESXi inventory).


4) Create a snapshot (using the new .vmx config file), therefore creating a new virtual hard disk to store the changes (or differences).


I personally think the author of the script deserves a lot of credit as the technique is very neat.


In ESXi 3.5 U4 the features within the RCLI used to perform steps 3 and 4 are no longer available as they require write access. My solution is to run steps 1 and 2 from the script (as before) followed by using the VIX API to register the VM and create a snapshot. This works, however does require running two seperate programs. When I first looked into using the VIX API I noticed a function called 'VixVM_Clone' which is capable of creating full clones and linked clones, but guess what - yup thats right this is not supported in ESX or ESXi. Note the VIX API support matrix here: http://www.vmware.com/support/developer/vix-api/vix16_reference/supportMatrix.html

I hope the above workround will help others and please if someone has a better solution, perhaps they would be kind enough to post it......

Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
Yes, both Linked Clones script will still work. The scripts do not utilize the VI API but the Service Console on classic ESX and the unsupported Busybox console for ESXi, hence it will not be affected by the fix introduced with ESXi 3.5u4. This also holds true for ESX and ESXi 4.0, a small minor fix will need to go out since the version check with vmware -v has slightly changed with it's output, but the fundamentals of the script is exactly the same and will still work.

Glad you're enjoying the script :)

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
http://twitter.com/lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

Click to view lamw's profile Champion 2,803 posts since
Nov 27, 2007
Nope, those commands are located on the Service Console if you're talking about classic ESX and use the script API's which are different from the VI API/SDK which have the lockdown in place. With ESXi, the Service Console is not available, so to provide some tools the vCLI/RCLI were created and within that toolset there is an equivalent of vmware-cmd called vmware-cmd.pl which acts similar to that of the classic version of vmware-cmd but uses the VI API to make the calls.

=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
http://twitter.com/lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

If you find this information useful, please award points for "correct" or "helpful".

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities