You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Ian Young <ia...@duffrecords.com> on 2014/02/20 01:09:08 UTC

Re: Change of guest IP address

> >     On 19-Dec-2013, at 3:58 PM, Andrei Mikhailovsky<an...@...>  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"<ja...@...>  To:
> "<us...@...> 
> "<us...@...>  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


RE: Change of guest IP address

Posted by Geoff Higginbottom <ge...@shapeblue.com>.
Ian,

Had a quick look at your script and I like your approach however I guess this only works for Basic Zones as guest IP addresses are not unique in Isolated Networks.  You would need to enhance it with Network IDs to work with Isolated networks.

Regards

Geoff Higginbottom

D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581

geoff.higginbottom@shapeblue.com

-----Original Message-----
From: Ian Young [mailto:ian@duffrecords.com]
Sent: 20 February 2014 00:09
To: users@cloudstack.apache.org
Subject: Re: Change of guest IP address

> >     On 19-Dec-2013, at 3:58 PM, Andrei Mikhailovsky<an...@...>  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"<ja...@...>  To:
> "<us...@...>
> "<us...@...>  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

Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.