Ask Your Question

assign static IP address to VM

asked 2015-12-01 13:57:13 -0500

johntest gravatar image

I am trying to do something like this

nova boot --flavor m1.large \
--block-device source=image,id=736f014f-8907-4e1e-9e02-cd4b04c4adb2,dest=volume,size=40,shutdown=preserve,bootindex=0 \
--nic net-id="b1ef8720-6333-4ddc-810d-cf04b654ca2b",v4-fixed-ip="" \
--nic net-id="91f91de6-4aa8-447c-b129-eb4201d99637",v4-fixed-ip="" \
--security-groups sec-group1,sec-group2 --key-name gh-keypair1 --user-data deploy.xml  \

But I am getting this error

Error: Failed to launch instance "server1.test.local": Please try again later [Error: No valid host was found. Exceeded max scheduling attempts 3 for instance 43a2c6a1-b04e-4791-bb03-0a5b892dcb44. Last exception: [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/", line 2054, in _do].

When I remove the fixed-ips then the deployment goes through fine

nova boot --flavor m1.large \
--block-device source=image,id=736f014f-8907-4e1e-9e02-cd4b04c4adb2,dest=volume,size=40,shutdown=preserve,bootindex=0 \
--nic net-id="b1ef8720-6333-4ddc-810d-cf04b654ca2b" \
--nic net-id="91f91de6-4aa8-447c-b129-eb4201d99637" \
--security-groups sec-group1,sec-group2 --key-name gh-keypair1 --user-data deploy.xml  \

The network does have DHCP on. Is this what's causing the problem or this is something else?

edit retag flag offensive close merge delete


you should look at the logs under /var/log/nova and /var/log/neutron (if you are using neutron). It seems to be a network problem so your best bet is neutron logs! Update OP with these logs (especially nova-scheduler.log, nova-compute.log and neutron logs).

capsali gravatar imagecapsali ( 2015-12-02 03:34:36 -0500 )edit

So it is a strange issue that when I use --block-device, I get this problem but if I create a volume and attach it then I am fine :/ I am guessing this is some sort of timeout.

johntest gravatar imagejohntest ( 2015-12-03 12:07:40 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2017-02-22 14:47:03 -0500

If you are Trying to assign static IP address then this openstack cli command worked well for me:

openstack server create --flavor m1.tiny --image Cirros-0.3.4 --nic net-id="3aa113b3-0312-4ce7-b371-07acaba910f1",v4-fixed-ip="" --security-group default --key-name trystack test2

The Nova boot worked as well but with a deprecation warning:

nova boot --flavor m1.tiny --image Cirros-0.3.4 --nic net-id="3aa113b3-0312-4ce7-b371-07acaba910f1",v4-fixed-ip="" --security-group default --key-name trystack test3

But it seems like your problem is rather a host issue. Check nova service logs and your resources as well.

edit flag offensive delete link more

answered 2015-12-02 08:11:57 -0500

There was a bug in juno and prior to juno, is this the case ?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-12-01 13:57:13 -0500

Seen: 3,279 times

Last updated: Feb 22