• Skip to site navigation
  • Skip to blog entries
  • Skip to archive page
  • Skip to right sidebar

Creating LinkedClones with the Virtualization EcoShell

NTPRO.NL - Eric Sloof

  • NTPRO.NL
  • Online Training
  • VMworld
  • Videos
  • Tools
  • iTunes
  • About

Saturday, 9 January 2010

Creating LinkedClones with the Virtualization EcoShell

When you’re running a Virtual Machine in a production environment and want to perform some tests on it but don’t have enough time or space on your Datastores to create a full hot clone, there’s an alternative.

vSphere 4.0 supports linked virtual machines, which are two or more virtual machines that share storage. Linked virtual machines support efficient sharing of duplicated data. In its simplest form, shared storage is achieved through the use of delta disk backings. A delta disk backing is a virtual disk file that sits on top of a standard virtual disk backing file. Each time the guest operating system on a virtual machine writes to disk, the data is written to the delta disk.

Each time the guest operating system on a virtual machine reads from disk, the virtual machine first targets the disk block in the delta disk. If the data is not on the delta disk, the virtual machine looks for them on the base disk.

Linked virtual machines can be created from a snapshot or from the current running point. After you create a virtual machine, they share the base disk backing and each virtual machine has its own delta disk backing. You can have up to eight virtual machines in a linked virtual machine group. The virtual machines in the group cannot be part of a VMware HA cluster.

Hal Rottenberg is the author of the New-LinkedClone.ps1 PowerShell script, it’s adapted from a technique published originally by Keshav Attrey. Also see William Lam's Perl script and Leo's manual version for ESX 3.5 but I believe, back in 2007 I was one of the first to discover this technique.

I’ve made some little modifications in Hal’s script and added it as a Script Action to the Virtualization EcoShell by clicking “Add new item” in the actions menu on the right side of the EcoShell console. This enables you to specify a script performing the Action. When you click an Action, objects currently selected in the grid are piped into the script. The LinkedClones Script Action is part of the newest version (1.08) of the NTPRO.NL PowerPack, you can get a copy here. The screen shot shows you how it works.

Update: Alan Renouf has emailed me a link to an interesting knowledge base article regarding Virtual machines from a single disk chain may only run on 8 hosts (VMFS).

Posted by
Eric Sloof
in Products at 21:50 | 9 Comments | 1 Trackback
Bookmark and Share
Trackbacks
Trackback specific URI for this entry
Social comments and analytics for this post
This post was mentioned on Twitter by esloof: I've added one of @halr9000 brilliant scripts the my Visualization EcoShell PowerPack, lets create LinkedClones - http://bit.ly/4UEC7P
Weblog: uberVU - social comments
Tracked: Jan 09, 23:01
Comments
Display comments as (Linear | Threaded)
Please post some additional resources where one can learn more about linked clones...is this something one should not use in production??
#1 Tom on 2010-01-09 23:42 (Reply)
"First to discover" is quite a bold claim. We have been using this technique (which I didn't know someone had ever named) in production with a portable training lab environment since around the end of 2005. The initial configuration and scripting was done on ESX 2.5 and has continued to work flawlessly through 3.0, 3.5 and 4.0. We use non-persistent disks on the clones so the master image can be readily modified (software installed, snapshots rolled back, etc) and then the lab can be booted new from this image every time.
#2 John Laur (Homepage) on 2010-01-11 00:20 (Reply)
Did you publish it in 2005? That's why I state "I believe, back in 2007 I was one of the first"...
#2.1 Eric Sloof (Homepage) on 2010-01-11 07:52 (Reply)
I'm looking at implementing a similar setup in our packaging environment (which, for most purposes can be considered a training lab, as VMware is used to allow the machines to be frequently reset to a clean state - we also use NonPersistent drives). Are there any potential "gotchas" with such an approach? I've run some small scale tests, and the users see no difference in performance. I'm aware of a VMFS limitation that no more than 8 different ESX hosts can run VMs sharing the same base disk (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003319). I can't see why this isn't more widely adopted, as - at least for certain use-cases - it seems to be an easy way to reduce storage requirements.
#2.2 Ben Neise (Homepage) on 2010-01-11 12:11 (Reply)
We have run up to 30 vm's using the same base vmdk and have seen no issues, but we use only one ESX host to do it. Once you get up to that many vms hammering the same image file, IO performance does suffer noticeably due to the way reads have to work, particularly if you are doing lots of IO heavy operations on first boot of the clone like we are (we run sysprep). I would suggest placing your base vmdk file on a solid state disk configured as local storage to each ESX host that you want running clones. You could continue to use shared storage for the deltas. Obviously, this approach would compromise vmotion/HA and require a lot of scripting to automate, but it would be quite good for training/lab.
#2.2.1 John Laur (Homepage) on 2010-01-12 16:30 (Reply)
"You can have up to eight virtual machines in a linked virtual machine group." Where does this limitation come from? In Lab Manager you can have tens of VMs based on same vmdk.
#3 michael on 2010-01-11 15:31 (Reply)
I asked this question on Keshav Attrey's blog (http://www.vmdev.info/?p=40). The limitation is on the number of hosts sharing the VMDK, not the number of virtual machines. I imagine that LabManager limits running VMs to 8 or fewer hosts.
#3.1 Ben Neise (Homepage) on 2010-01-11 15:56 (Reply)
i found blog article on http://planetvm.net/blog/?p=777 that points to pdf from vmware: http://www.vmware.com/support/developer/vc-sdk/linked_vms_note.pdf looks like eric's blog is based on info from that pdf and they are indeed talking about eight virtual machines in a linked virtual machine group.
#3.1.1 michael on 2010-01-11 16:16 (Reply)
Additionally, i found the following statement in Lab Manager 4 User Guide: "Lab Manager does not support VMware Fault Tolerance (FT) or vSphere linked clones." So, apparently Lab Manager uses its own linked clones implementation and therefore has different limitations. If anyone knows where additional info on the subject can be found, please share us.
#3.1.1.1 michael on 2010-01-12 07:54 (Reply)
Add Comment
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
   
Submitted comments will be subject to moderation before being displayed.
 
 


Twitter RSS FeedLinkedIn

www.hetesambal.nl

Veeam Webinar with Doug Hazelman: 5 Steps to Successful Backup & Replication for Hyper-V! Watch it now >>

Recent Entries

Storage Design and Implementation in vSphere 5.0 - The Rough Cuts
Thursday, January 19 2012
Top 25 Free Tools for VMware vSphere presented by David Davis and Kendrick Coleman
Monday, January 16 2012
LG Android running VMware Horizon Mobile hands-on
Saturday, January 14 2012
Forbes Guthrie has released the vSphere 5 vReference Card
Thursday, January 12 2012
VMworld Session - VMware vMotion in VMware vSphere 5: Architecture, Performance & Best Practices
Wednesday, January 11 2012
Voice Over IP (VoIP) Performance Evaluation on VMware vSphere 5.0
Tuesday, January 10 2012
VMware vCloud Director 1.5 Performance and Best Practices
Monday, January 9 2012
VMware vCenter Site Recovery Manager 5.0 Performance and Best Practices
Sunday, January 8 2012
New Training - VMware vSphere 5 Design Workshop
Saturday, January 7 2012
New Training - VMware View 5 Install, Configure and Manage
Friday, January 6 2012

Archive

  • February 2012 (3)
  • January 2012 (23)
  • December 2011 (21)
  • November 2011 (24)
  • October 2011 (27)
  • September 2011 (26)
  • August 2011 (35)
  • July 2011 (26)
  • June 2011 (15)
  • May 2011 (20)
  • April 2011 (22)
  • March 2011 (22)
  • February 2011 (18)
  • January 2011 (13)
  • December 2010 (23)
  • November 2010 (18)
  • October 2010 (31)
  • September 2010 (22)
  • August 2010 (23)
  • July 2010 (19)
  • June 2010 (19)
  • May 2010 (19)
  • April 2010 (20)
  • March 2010 (23)
  • February 2010 (22)
  • January 2010 (30)
  • December 2009 (37)
  • November 2009 (29)
  • October 2009 (27)
  • September 2009 (36)
  • August 2009 (35)
  • July 2009 (35)
  • June 2009 (43)
  • May 2009 (35)
  • April 2009 (56)
  • March 2009 (51)
  • February 2009 (69)
  • January 2009 (69)
  • December 2008 (60)
  • November 2008 (56)
  • October 2008 (49)
  • September 2008 (63)
  • August 2008 (44)
  • July 2008 (54)
  • June 2008 (26)
  • May 2008 (34)
  • April 2008 (27)
  • March 2008 (38)
  • February 2008 (29)
  • January 2008 (35)
  • December 2007 (24)
  • November 2007 (23)
  • October 2007 (20)
  • September 2007 (54)
  • August 2007 (15)
  • July 2007 (22)
  • June 2007 (13)
  • May 2007 (8)
  • April 2007 (20)
  • March 2007 (10)
  • Recent...
  • Older...
Based on the s9y Bulletproof template framework
Powered by s9y – Template by Bulletproof development team.
  • NTPRO.NL
  • Online Training
  • VMworld
  • Videos
  • Tools
  • iTunes
  • About