Mar 20, 2018 Based on the errors you are seeing, it would appear that the DSC configuration on the VMs is failing. I can confirm that my workaround on the Helpers.psm1 file worked successfully and I am running 1802 on an Azure VM. Passing custom data to your Azure VMs, a metadata service workaround?! To be aware of itself and the information associated with the VM during deployment. At the time of writing this blog post, there are no such service.
Deploying multiple Linux VMs using PowerCli
.DESCRIPTIONVMs are deployed asynchronously based on a pre-configured csv file (DeployVM.csv)Designed to run from Powershell ISE
.PARAMETER csvfilePath to DeployVM.csv file with new VM info
![Vmware Vmware](/uploads/1/2/6/2/126293246/363011577.jpg)
.PARAMETER vCentervCenter Server FQDN or IP
.PARAMETER autoWill allow script to run with no review or confirmation
.PARAMETER createcsvGenerates a blank csv file - DeployVM.csv
.EXAMPLE.DeployVM.ps1Runs DeployVM
.EXAMPLE.DeployVM.ps1 -vcenter my.vcenter.addressRuns DeployVM specifying vCenter address
.EXAMPLE.DeployVM.ps1 -csvfile 'E:ScriptsDeployDeployVM.csv' -vcenter my.vcenter.address -autoRuns DeployVM specifying path to csv file, vCenter address and no confirmation
.EXAMPLE.DeployVM.ps1 -createcsvCreates a new/blank DeployVM.csv file in same directory as script
.NOTESAuthor: Shawn MastersonCreated: May 2014Version: 1.2
Author: JJ VidanezCreated: Nov 2014Version: 1.3Add creation onthefly for customization Spec for linux systemsAbility to create machines names and guest hostname using different namesAdded a value to find out the kind of disk because powercli bug for SDRS reported at https://communities.vmware.com/message/2442684#2442684Remove the dependency for an already created OScustomization Spec
Author: JJ VidanezCreated: Jul 2015Version: 1.4Adding domain credential request for Windows systems
Author : Simon Davies - Everything-Virtual.comCreated : May 2016Version: 1.5Adding AD Computer Account Creation in specified OU's for VM's at start of deployment - Yes even Linux as that was a requirementIt's possible to restrict this to just Windows VM's by removing the comment at line #261
Author: JJ Vidanez & Robert RowanCreated: Jun 2016Version: 1.6Fixed issue to deploy just one VMAdding banner for each credential to show the domain where credentials are setIf OU parameter is defined at the OU create the object on AD where the machine is register Linux and Windows
REQUIREMENTSPowerShell v3 or greatervCenter (tested on 5.1/5.5)PowerCLI 5.5 R2 or laterCSV File - VM info with the following headersNameVM, Name, Boot, OSType, Template, CustSpec, Folder, ResourcePool, CPU, RAM, Disk2, Disk3, Disk4, SDRS, Datastore, DiskStorageFormat, NetType, Network, DHCP, IPAddress, SubnetMask, Gateway, pDNS, sDNS, Notes, Domain, OUMust be named DeployVM.csvCan be created with -createcsv switchCSV Field DefinitionsNameVM - Name of VMName - Name of guest OS VMBoot - Determines whether or not to boot the VM - Must be 'true' or 'false'OSType - Must be 'Windows' or 'Linux'Template - Name of existing template to cloneFolder - Folder in which to place VM in vCenter (optional)ResourcePool - VM placement - can be a reasource pool, host or a clusterCPU - Number of vCPURAM - Amount of RAM in GBDisk2 - Size of additional disk to add (GB)(optional)Disk3 - Size of additional disk to add (GB)(optional)Disk4 - Size of additional disk to add (GB)(optional)SDRS - Mark to use a SDRS or not - Must be 'true' or 'false'Datastore - Datastore placement - Can be a datastore or datastore clusterDiskStorageFormat - Disk storage format - Must be 'Thin', 'Thick' or 'EagerZeroedThick' - Only funcional when SDRS = trueNetType - vSwitch type - Must be 'vSS' or 'vDS'Network - Network/Port Group to connect NICDHCP - Use DHCP - Must be 'true' or 'false'IPAddress - IP Address for NICSubnetMask - Subnet Mask for NICGateway - Gateway for NICpDNS - Primary DNS must be populatedsDNS - Secondary NIC must be populatedNotes - Description applied to the vCenter Notes field on VMDomain - DNS Domain must be populatedOU - OU to create new computer accounts, must be the distinguished name eg 'OU=TestOU1,OU=Servers,DC=my-homelab,DC=local'
CREDITSHandling New-VM Async - LucD - @LucD22http://www.lucd.info/2010/02/21/about-async-tasks-the-get-task-cmdlet-and-a-hash-table/http://blog.smasterson.com/2014/05/21/deploying-multiple-vms-via-powercli-updated-v1-2/http://blogs.vmware.com/PowerCLI/2014/05/working-customization-specifications-powercli-part-1.htmlhttp://blogs.vmware.com/PowerCLI/2014/06/working-customization-specifications-powercli-part-2.htmlhttp://blogs.vmware.com/PowerCLI/2014/06/working-customization-specifications-powercli-part-3.html
USE AT YOUR OWN RISK!
.LINKhttp://blog.smasterson.com/2014/05/21/deploying-multiple-vms-via-powercli-updated-v1-2/http://www.vidanez.com/2014/11/02/crear-multiples-linux-vms-de-un-fichero-csv-usando-powercli-deploying-multiple-linux-vms-using-powercli/