VMware Cloud Community
JRP_C___Java
Contributor
Contributor
Jump to solution

ESXi 3.5 U4 - Linked Clone....is this still possible?

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......

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

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 Smiley Happy

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

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

View solution in original post

0 Kudos
3 Replies
lamw
Community Manager
Community Manager
Jump to solution

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 Smiley Happy

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

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

0 Kudos
JRP_C___Java
Contributor
Contributor
Jump to solution

Hi Iamw,

Thanks for the quick response and for the script!

The script makes use of 'vmware-cmd -s register' and 'vmware-cmd createsnapshot', arn't these part of the RCLI which was locked down? (just trying to understand).

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

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:

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

0 Kudos