Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

Error while provisioning Linux VM using PowerCLI Script

$
0
0

I am using the below script to provision Linux VMs by taking inputs from Excel sheet, till yesterday it works fine today it started giving errors.

 

PowerCLIScript.

 

Import-Csv "C:\Users\sg0217865\Desktop\NewVMs.csv" -UseCulture | %{

 

    Get-OSCustomizationSpec $_.Customization | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIP -IpAddress $_.ip -SubnetMask $_.subnet -DefaultGateway $_.gw

 

    $vm=New-VM -Name $_.Name -Template $_.Template -Host $_.Host -Datastore $_.Datastore -Confirm:$false -RunAsync -OSCustomizationSpec $_.Customization

}

 

Here goes screenshot of error, error is due to Template Value, I have given same value for manytimes it works fine earlier.


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>