Solved Trying to configure fixed IP on WinServer 2012R2

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

yanivz gravatar image

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

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

My powershell script looks like this

ps1

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

Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses 8.8.8.8

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

Comments

1

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

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