Solved Trying to configure fixed IP on WinServer 2012R2

asked 2018-03-19 22:02:26 +0300

yanivz gravatar image

updated 2018-03-20 22:53:09 +0300

I'm using Openstack Newton and try to launch a WinServer 2012R2 instance using the --user-data option.

My powershell script looks like this


Get-NetAdapter | NEW-NetIPAddress -IPAddress -Defaultgateway -Prefixlength 24

Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses

I'm launching the instance using

openstack server create --volume 98a20b1d-5269-4997-9c66-0b8f119df588 --flavor WinServerFlavor8G --user-data unix --block-device source=volume,id=98a20b1d-5269-4997-9c66-0b8f119df588,dest=volume,size=1,shutdown=preserve,bootindex=0 --nic port-id=bef9ae33-0fc4-4088-acad-f3c856477002 VMtest

Instance launch successfully but configured with DHCP (I'm launching it on fixed IP tenant network). Any thoughts about why the interface is not configured with the fixed IP I specified?

edit retag flag offensive close merge delete



I solved it. I was missing --config-drive true in the openstack server create. I also missed configuring "metadata_services=" in cloudbase-init.conf inside the guest.

yanivz gravatar imageyanivz ( 2018-03-20 22:35:29 +0300 )edit