Hi,
What is a way to specify static IP settings to VMs during deployment?
I think this is very smart to set a static IP4-Address during deployment (http://blogs.technet.com/b/scvmm/archive/2013/03/06/vmm-2012-tip-how-to-assign-an-ip-address-using-powershell-during-deployment.aspx):
# Setup Vm Template from lab library $Template= Get-SCVMTemplate | Where-Object {$_.Name -like "W2K12R2_STD_G2_Small"} # Build Vm Configuration $VMConfig = New-SCVMConfiguration -VMTemplate $Template -Name VMConfig01 #Update-SCVMConfiguration -VMConfiguration $VMConfig $VNAConfig = Get-SCVirtualNetworkAdapterConfiguration -VMConfiguration $VMConfig Set-SCVirtualNetworkAdapterConfiguration -VirtualNetworkAdapterConfiguration $VNAConfig -IPv4Address "10.0.0.4" #submits new VM job to VMM New-SCVirtualMachine -Name teststefan02 -VMConfiguration $VMConfig
But I need to specify also static gateways or DNS Servers. Can this be done like above?
(Reading this it seems to be not so easy: https://social.technet.microsoft.com/Forums/windowsserver/en-US/3b989d14-e74d-447b-adf1-09eea5686df1/virtualmachinemanager-set-ipv4address-and-dns-settings?forum=winserverpowershell)
The challenge is that I can't access the VMs after deployment to do any "netsh interface ip set*".
Is providing an answer file with the IP info an good option? How is the structure of the answer file to provide just the IP settings?
Regards,
Stefan
Visit go2azure.eu and my blog at www.sc-orchestrator.eu !