cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Young <...@duffrecords.com>
Subject Re: Change of guest IP address
Date Thu, 20 Feb 2014 00:09:08 GMT
> >     On 19-Dec-2013, at 3:58 PM, Andrei Mikhailovsky<andrei@...>  wrote:
> >
> >     Do you know if there is an easier way? Like via the api calls or the 
cloudmonkey command? Or is it currently
> the only way?
> >
> >     ----- Original Message -----
> >     From: "Jayapal Reddy Uradi"<jayapalreddy.uradi@...>  To:
> "<users@...> 
> "<users@...>  Sent: Thursday, 19 December, 2013
> 9:25:05 AM
> >     Subject: Re: Change of guest IP address
> >
> >     Hi,
> >
> >     If your VM is in isolated network please do the following
> >
> >     1. edit the nics table ip4_address column for your instance_id to 
new ip.
> >     2. login to the router corresponds to the network and replace old ip 
with new ip in below files.
> >
> >     a.  /var/lib/misc/dnsmasq.leases
> >       b.  /etc/dhcphosts.txt
> >     3. restart the dnsmasq in router (service dnsmasq restart) 4. Reboot
> >     the VM or restart the network service in Vm so that VM gets the new 
ip from the dhcp.
> >
> >     Thanks,
> >     Jayapal

I put Jayapal's solution into a script for convenience:

http://pastebin.com/7yJtjNQX

Just edit the first group of variables according to your needs and run it 
like this:

set-vm-ip.sh old-address new-address


Mime
View raw message