Andrei,

The QuickCloudNoService Network Offering provides no DHCP, or any other 
services (clues in the name) so it's not really a bug as the add / remove NIC 
features require DHCP to be enabled on the Network.

I have tested this procedure using the default 
'DefaultIsolatedNetworkOfferingWithSourceNatService' network offering and it 
works like a charm

Regards

Geoff Higginbottom

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

geoff.higginbot...@shapeblue.com

-----Original Message-----
From: Andrei Mikhailovsky [mailto:and...@arhont.com]
Sent: 19 December 2013 14:36
To: users@cloudstack.apache.org
Subject: Re: Change of guest IP address

Geoff,

Thanks for your reply. This is the first route i tried to take, but it didn't 
work for me. When I tried to remove the NIC from the guest i had an error 
message complaining that the network offering does not have dhcp service or 
something like that. I did not take a note of the actual message. This was 
after i've changed the default NIC to a temporary nic. The NIC that I have is 
from a service offering called QuickCloudNoService. I guess it's a bug...

I will try the db route and see if it works.

Thanks for your help guys

Andrei



----- Original Message -----
From: "Geoff Higginbottom" <geoff.higginbot...@shapeblue.com>
To: users@cloudstack.apache.org
Sent: Thursday, 19 December, 2013 12:19:40 PM
Subject: RE: Change of guest IP address

Andrei,

You could use the addNicToVirtualMachine API command (assuming you are running 
4.1 or 4.2)

1. Assign the VM a new 'temp' NIC on an alternate network 2. Set this new NIC 
to default 3. Remove original NIC 4. Assign a NIC on the original Network, but 
also set the required IP (hence using API and not UI) 5. Set this new NIC to 
default 6. Remove the temp NIC

API commands required are

addNicToVirtualMachine 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/addNicToVirtualMachine.html

updateDefaultNicForVirtualMachine 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/updateDefaultNicForVirtualMachine.html

removeNicFromVirtualMachine 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/removeNicFromVirtualMachine.html

Whilst there are 6 steps, a simple CloudMonkey Script could complete this 
process in around 30 secs

Regards

Geoff Higginbottom

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

geoff.higginbot...@shapeblue.com

-----Original Message-----
From: Jayapal Reddy Uradi [mailto:jayapalreddy.ur...@citrix.com]
Sent: 19 December 2013 11:27
To: <users@cloudstack.apache.org>
Subject: Re: Change of guest IP address

Hi,

There is no other way to change the ip.
If you want specific IP for the VM, you can get secondary ip  in vm NICs page 
and configure it on the VM.

Thanks,
Jayapal


On 19-Dec-2013, at 3:58 PM, Andrei Mikhailovsky <and...@arhont.com> 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.ur...@citrix.com>
> To: "<users@cloudstack.apache.org>" <users@cloudstack.apache.org>
> 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
>
> On 19-Dec-2013, at 2:27 PM, Andrei Mikhailovsky <and...@arhont.com>
> wrote:
>
>> Hello guys,
>>
>> Could some one tell me how to change the IP address of a guest vm? It has 
>> been assigned by default by dhcp router and I would like to change it. I 
>> know how to create a new vm with a specified IP address using cloudmonkey, 
>> but I couldn't find a way of changing the IP for the existing vm.
>>
>> Cheers
>>
>> Andrei
>

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.
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.

Reply via email to