Featured Post

Cloud Options For Accelerating Workspace One Adoption In Traditional Horizon Environments

Cloud options for VMware Identity Manager and Workspace One UEM (AirWatch) make it easy to quickly extend the benefits of Workspace One to o...

Thursday, January 7, 2016

VMware vmFork Script

You can take vmFork for a test spin utilizing the latest PowerCLI Extension fling. Below is a script I put together for demonstrating Instant Clone within your own lab. It's based on these two VMware blog posts:

https://blogs.vmware.com/PowerCLI/2015/08/vmware-instant-clone-now-fingertips-new-powercli-extensions-fling.html

http://blogs.vmware.com/PowerCLI/2015/08/using-vmware-instant-clone-via-powercli-extensions-fling.html

If you're interested in more details, I'd definitely start with these two posts above. Otherwise, if you want to get up and running very quickly with an instant clone demo, follow these steps below. Not only will running this script create instant clones, but it will also give each clone a unique IP address. Further, when your done it can tear down the demo for you by deleting your clones and shutting down the parent VM. Here are the steps:


1. Create a Windows 2012R2 VM.

2. Install latest release of PowerCLI available here.

3. Download the latest PowerCLI extensions from here.

4. If necessary, flag your zip file as unblocked before continuing. (You may experience security issues later that are harder to correct.)

5. Unzip the PowerCLI Extensions to preferably c:\program files (x86)\VMware\VMware Infrastructure\vSphere PowerCLI\Modules or an appropriate path.


6. Create a file named post-clone.bat and add the following lines codes displayed:


7. Create a powershell script by any name you like and add the lines of code showed at the bottom of this page. Ensure it's in the same directory as post-clone.bat

8. At the top of the file there's a section where you populate the script with information about your environment and how you want to child VMs created.


9. Run PowerCLI as an administrator.

10. Set your execution policy "Set-ExecutionPolicy RemoteSigned"

11. Execute your script and make it rain VMs!!!!!!!


Here's what it looks like in vCenter:


You can clean up this environment by pressing any key at the PowerShell prompt. It will go on to delete all your child VMs and shutdown the parent VM.

The Script Itself:

4 comments:

  1. I am really impressed with the way of writing of this blog. The author has shared the info in a crisp and short way.
    Cloud Migration services

    Aws Cloud Migration services

    Azure Cloud Migration services

    ReplyDelete
  2. We are a part of the success story for many of our customer's successful cloud Migrations.
    Vmware Cloud Migration services

    Database Migration services

    ReplyDelete
  3. Thank you for the informative post about Security challenges in AWS , Found it useful . cloud migration services have now become secured and with no-risk
    Lia Infraservices

    ReplyDelete
  4. I am really impressed with the way of writing of this blog. The author has shared the info in a crisp and short way.
    Cloud Migration services


    Best Cloud Migration Tool

    ReplyDelete