Deploying multiple VMs via PowerCLI

Find the latest version here.

Here’s a PowerCLI script I have been playing with for a while that helps with deploying multiple VMs.

Highlights include deploying both Windows and Linux VMs via Customization Specification enabling the setting of hostname, IP address, etc. The script uses help from LucD to deploy using -RunAsync which speeds things up tremendously.

It’s a bit lengthy, with a rudimentary level of logging and error catching but has served me well.

DeployVM Console

DeployVM Console

Advertisements

6 thoughts on “Deploying multiple VMs via PowerCLI

    1. smasterson Post author

      Hello, If you could provide any errors thrown I may be able to track down what you issues may be seeing. Feel free to email me directly if you wish (smasterson (at) gmail)

      Reply
      1. Secret admirer

        Hi, Can you please provide me your email address? So i can seek your help.

        Thank you very much sir.

  1. Secret admirer

    Hi SMasterson,

    Could you please help me in resolving my issue. I can’t see the location of logs for failreconfig and faildeploy. I would like the cleanup the logs everytime i run the script to refresh for a new one. In the logs, it always add the new value like below.

    Processing Complete

    The following VMs were successfully created:
    Test1

    The following VMs failed to reconfigure properly:
    Test1
    Test2

    The following VMs failed to deploy:
    Test1
    Test2
    Test1
    Test2

    Reply
    1. smasterson Post author

      Hello

      First – please be sure you are using the latest version, found here.

      A new log should be created each time the script is run (there is only one log per run).

      If your issues are not present in the log, you can check the vSphere tasks or powershell console for additional info.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s