Ask Your Question
1

how to boot an instance with always the same ip and hostname

asked 2013-07-16 11:38:15 -0500

arindamchoudhury gravatar image

Hi,

How can I boot a specific image so that it always will get the same hostname and ip.

Thanks,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-05 06:32:38 -0500

nova cli provides optional --nic attribute with following parameters which you can use to allocate same IP during boot.

--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid> Create a NIC on the server. Specify option multiple times to create multiple NICs. net-id: attach NIC to network with this UUID (required if no port-id), v4 -fixed-ip: IPv4 fixed address for NIC (optional), port-id: attach NIC to port with this UUID (required if no net-id)

For associating hostname, you can use the init-script or use --file option as follows

--file <dst-path=src-path> Store arbitrary files from <src-path> locally to <dst- path=""> on the new server. You may store up to 5 files.

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

2 followers

Stats

Asked: 2013-07-16 11:38:15 -0500

Seen: 288 times

Last updated: Feb 05 '14