VMworld 2015/Deploy VMs by Forking
Jump to navigation
Jump to search
Deploy Hundreds of VMs Instatly via Forking
Alan Renouf (VMwarE) and Li Zheng (VMware)
http://blogs.vmware.com/PowerCLI/
Ready VMs
- Fast provisioning
- Instant Boot
- Low Memory
- Low CPU
All available with instant clone
Instant Clone
VMware Instant Clone is now at your fingertips with the updated PowerCLI Extensions fling! - VMware PowerCLI Blog - VMware Blogs - https://blogs.vmware.com/PowerCLI/2015/08/vmware-instant-clone-now-fingertips-new-powercli-extensions-fling.html
How does it work?
- splits work into preparation (expensive) and fork (cheap) paths
Preparation:
- boot parent, launch applications, load libraries into memory
- freeze parent state
- break large pages
- pre-create and register any number of child VMs
Fork phase:
- child inherits parent VMs memory state (COW Copy on Write), device state (checkpoint), disk state (delta disk)
Once powered on, forked child becomes a full linked clone (instant clone can share memory state, where linked clone only shares disk state)
Workflow
New-VM -Name Photon01 -ResourcePool "clusterr1" $parent = Get-VM -Name Photon01 New-Snapshot -VM $parent -Name BeforeChildren Enable-InstantCloneVM -VM $parent -GuestUser "root" -GuestPassword 'vmware' -PreQuiesceScript "c:\instantclone\pre.sh" -PostCloneScript "c:\instantclone\customize.sh" $parent = Get-InstantCloneVM Photon01 $configSettings = @{ 'ipaddress' = '...'; 'netmask' = '255....'; 'gateway' = '...'; } $child = new-InstantCloneVM ` -ParentVM $parent ` -name "clone01" ` -ConfigParams $conifgSettings ` -pPersistent $child | Start-VM