[xen-tools-discuss] IP auto-increment
.:: Alfred Sawaya ::.
huji at huji.fr
Mon Sep 21 19:55:48 CEST 2009
Steve Kemp a écrit :
> On Mon Sep 21, 2009 at 19:47:35 +0200, .:: Alfred Sawaya ::. wrote:
>
>
>> I'm new to the xen-tools communitie, I just wonder where I could find an
>> exhaustive documentation about xen-tools.conf. I would like to
>> auto-increment ips when creating xen guests. I've tried the method as
>> describe here :
>> http://www.debian-administration.org/article/A_brief_introduction_to_xen-tools
>>
>> But it doesn't work.
>>
>
> "It doesn't work" isn't a helpful description of your problem.
>
> Can you tell us:
>
> * What did you try?
> * How did it fail?
> * Did you receive any errors?
>
Sorry, I've tried the method as describe on the website I've quoted,
which is :
in the xen-tools.conf, I added this line :
ip = 192.168.1
and I've created a text file like this :
echo 53 > /etc/xen-tools/ips
And my first guest should have 192.168.1.53 as ip. Then the text file
ips should be 54 and the next guest should receive 192.168.1.54 as ip.
I don't want to have a pool of ip, I would like to assign static IP
automatically directly in the config file of the guest. If the guest
reboot, it should still have the same IP as before.
> Take a look at the output of "xen-create-image --manual" and you'll
> see this:
>
> --
>
> One other useful shortcut is the use of an automatic IP address.
> You can specify '--ip=auto' and the system will choose and use
> an IP address from those listed in /etc/xen-tools/ips.txt.
>
> For example if you wished to have Xen guests automatically
> take an address from the range 192.168.1.100-192.168.1.200 you
> would first prepare the system by running this:
>
> rm /etc/xen-tools/ips.txt
> for i in $(seq 100 200) ; do echo 192.168.1.$i >> /etc/xen-tools/ips.txt ; done
>
> Now you can create a guest with the command:
>
> xen-create-image --ip=auto --hostname=blah [--dist=...]
>
> The first time this ran the machine would receive an IP address
> from the pool which we've created. This IP would be marked as used,
> and would no longer be available. If all the IP addresses are taken
> then the system will fail.
> --
>
>
Didn't see the --manual option, got to read it right now thanks
> Does that help?
>
> Steve
> --
>
>
>
--
--
|
.:: Alfred Sawaya ::.
|
--
More information about the xen-tools-discuss
mailing list