I want to change the ip of guest vm i-2-5-VM from 192.168.30.101 to 192.168.30.123
# cat /var/run/cloud/i-2-5-VM.log
i-2-5-VM,5,192.168.30.101,36,1bb8f16bea8fcff2fa927946160a9d0e,27
I can edit this file and change the ip to 192.168.30.123,but the ip will come back to 192.168.30.101
after the vm restarting.
------------------ Original ------------------
From: ""<jayapalreddy.uradi@citrix.com>;
Date: Thu, Jun 27, 2013 06:09 PM
To: "<users@cloudstack.apache.org>"<users@cloudstack.apache.org>;
Subject: Re: How can I allocate a specific IP when I create an instance.
Try edit the vm ip in /var/run/cloud/<vm-name>.log file in host and restart the vm.
This should update the security group rules in host.
Thanks,
Jayapal
On 27-Jun-2013, at 3:00 PM, WXR <474745079@qq.com>
wrote:
> I just modify the "nics" table and change the "ipv4_address" value.And then I restart
the vrouter vm.
> After the vrouter restarting,the instance vm can get the new ip but the ip can not be
accessed.
>
>
>
>
> ------------------ Original ------------------
> From: "Dave Dunaway"<dave.dunaway@gmail.com>;
> Date: Thu, Jun 27, 2013 05:25 PM
> To: "users"<users@cloudstack.apache.org>;
>
> Subject: Re: How can I allocate a specific IP when I create an instance.
>
>
>
> Show us what you changed... without that we can't help you. And make sure
> to indicate what version of CloudPlatform you use as apparently some older
> versions may not work with the ip address change in the DB as Geoff
> indicated.
>
>
> On Thu, Jun 27, 2013 at 12:42 AM, WXR <474745079@qq.com> wrote:
>
>> If I modify the ip of the vm in nic table and restart the vrouter system
>> vm,
>> the instance vm can get the new ip which I specify.
>> But this ip can't be used normally.Them vm can not access the gateway ip
>> even if I'v stopped the iptables of its host node machine.
>>
>>
>> ------------------ Original ------------------
>> From: "Dave Dunaway"<dave.dunaway@gmail.com>;
>> Date: Wed, Jun 26, 2013 11:51 PM
>> To: "users"<users@cloudstack.apache.org>;
>>
>> Subject: Re: How can I allocate a specific IP when I create an instance.
>>
>>
>>
>> There should be a way to have the ability to reserve an IP and still have
>> DHCP assign the IP by mac reservation. There's no technical reason this
>> wouldn't work and likely a feature a lot of people would love to see. The
>> only hold back is the UI not allowing you to do so.
>>
>> Ultimately, you can go to the DB and change the VM's IP in the nics table
>> to what you want (reboot the VM and the IP change will occur). Which is not
>> the preferred way to do so, but ultimately that functionality from the UI
>> would be ideal.
>>
>> Even going as far as intergrating IPAM functionality into the product would
>> be ideal.
>>
>>
>> On Wed, Jun 26, 2013 at 11:44 AM, Geoff Higginbottom <
>> geoff.higginbottom@shapeblue.com> wrote:
>>
>>> Simple answer - you can't.
>>>
>>> In an advanced zone, you can specify the IP address when you create a new
>>> VM using the API, however in a basic zone, because the IP will depend on
>>> which POD your VM ends up in, and as a user you cannot influence this,
>>> there is no way to specific the IP, even if you are a root admin.
>>>
>>> The reason it still fails when you manually change the IP is that the
>>> security groups feature is expecting the VM to have the IP CloudStack
>>> allocated it via DHCP.
>>>
>>> Regards
>>>
>>> Geoff Higginbottom
>>> CTO / Cloud Architect
>>>
>>>
>>> D: +44(0)20 3603 0542<tel:+442036030542> | S: +44(0)20 3603 0540<tel:
>>> +442036030540> | M: +44(0)7968161581<tel:+447968161581>
>>>
>>> geoff.higginbottom@shapeblue.com<mailto:geoff.higginbottom@shapeblue.com
>>>
>>> | www.shapeblue.com
>>>
>>> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
>>>
>>>
>>>
>>> On 26 Jun 2013, at 05:02, "WXR" <474745079@qq.com<http://qq.com>>
wrote:
>>>
>>> cloudstack version: 4.1
>>> network type: basic network
>>>
>>> When I create a new instance,the vm will get a random IP from the DHCP
>>> server on vrouter.
>>>
>>> If I want to:
>>> 1.allocate a specific ip to the vm.
>>> 2.allocate multiple ips to the vm.
>>> 3.change the vm ip from one to another.
>>>
>>> How can I achieve it? I try to bind the ip to the vm nic manually but the
>>> ip can not be accessed.
>>> 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
>>> operated under license from Shape Blue Ltd. ShapeBlue is a registered
>>> trademark.
>>> |