net_id option for create an instance with openstack API

Asked by Daniel Nunez E.

Im trying boot an instance with python more o less this manner http://docs.openstack.org/api/openstack-compute/programmer/content/booting-a-new-server.html

The principal problem is when I run the script create well an instance but in the instance log show me this.

cloud-init start running: Wed, 20 Mar 2013 22:29:10 +0000. up 8.57 seconds
2013-03-20 22:29:14,411 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [2/120s]: url error [[Errno 113] No route to host]
2013-03-20 22:29:17,411 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [5/120s]: url error [[Errno 113] No route to host]

But when I create an instance from horizon dashboard it works very well, and creating an instance with nova API works very well too.
(Ex. nova boot --image precise --flavor m1.small --key_name net-key --nic net-id=f9035744-72a9-42cf-bd46-73d54c0cea06 vm1)

The unique difference that I can see is the net_id. But I dont know where and how put de net_id option in my python script.

Other clue I saw is in /var/log/nova/nova.conf. When an instance starts properly shows a request to nova.api.ec2, but it doesn't show when the instance fails.

Please can suggest me how can I do it?

Regards

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jason (zzs) said :
#1

does the following work?
'networks': [ {'uuid': 'some-uuid', },]
or
'networks': [ {'uuid': 'some-uuid', 'fixed_ip': 'x.x.x.x'},]

Can you help with this problem?

Provide an answer of your own, or ask Daniel Nunez E. for more information if necessary.

To post a message you must log in.