Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 228309

Re: i want to deploy 50+ red hat vm's from a template how can i automate it

$
0
0

Lucd Can you give me a powercli script to deploy Linux VMs using Excel file. When I am trying to deploy VMs using the below PowerCLI script its giving below error

 

 

Here is my PowerCLI script:

 

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 | Set-VM -OSCustomizationSpec

 

$_.Customization

}


Viewing all articles
Browse latest Browse all 228309

Trending Articles



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