Ask Your Question
2

static ip in neutron virtual subnet

asked 2013-12-03 02:00:15 -0600

Marco Marino gravatar image

Hi. I'm using neutron in havana release with a dedicated network node and a subset of agents (metadata, dhcp, l3 and openvswitch). All works well, from horizon I create a virtual subnet (50.0.1.0/24) with a dhcp server (50.0.1.2) and an allocation pool (from 50.0.1.100 to 50.0.1.200). So when I launch an instance, automatically it has a dinamyc ip, but how can I set a static ip in this subnet for a vm? If I change /etc/network/interfaces (in an ubuntu vm) with a static ip (50.0.1.5), I lost connectivity with the vm and I cannot find any error log. Is there some canonical way (eg: metadata) to set a static ip for the vm ? Can I do this from horizon? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-12-03 06:42:47 -0600

RomilGupta gravatar image

Hi ,

This can be done through CLI using nova-boot command :

nova boot --image <image-id> --flavor <id> --nic net-id=<net-id> v4-fixed-ip=<id address> <vm-name>

or else you can create your own port and pass the port-id in nova-boot command

nova boot --image <image-id> --flavor <id> --nic port-id=<port-uuid> <vm-name>

For more details do nova help boot

I don't think you could do it from dashboard.

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

Stats

Asked: 2013-12-03 02:00:15 -0600

Seen: 2,342 times

Last updated: Dec 03 '13