Re: [vserver] adding guest interface: isn't it hotplug?

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 26 Nov 2009 - 20:54:17 GMT
Message-ID: <20091126205417.GE5983@MAIL.13thfloor.at>

On Thu, Nov 26, 2009 at 09:37:40PM +0100, Marc Chantreux wrote:
> hello,

> i follow this tutorial:

> http://linux-vserver.org/Networking_vserver_guests

> there is nothing written about the guest so i hope it's
> hotplug and i don't need to reboot.

no reboot is required for guest networking, neither
host nor guest side

> unfortunatly: i see no new interface in foo.

which is expected, as Linux-VServer uses IP isolation
instead of virtual network stacks (which you can get
by utilizing the network namespaces), so the guest
will always see a subset (according to the assigned
IPs) of the host devices and IPs

> do i have to reboot foo?

nope

> on the host machine, i can see:
>
> > ip link show dummy0
> 4: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
> link/ether da:af:48:aa:25:95 brd ff:ff:ff:ff:ff:ff
> > sysctl net/ipv4/ip_forward
> net.ipv4.ip_forward = 1
> > iptables-save | grep SNAT
> -A POSTROUTING -s 10.0.0.0/8 -d ! 10.0.0.0/8 -j SNAT --to-source 212.85.154.29
> > grep -R . /etc/vservers/descartes/interfaces/1
> /etc/vservers/foo/interfaces/1/ip:10.0.0.2
> /etc/vservers/foo/interfaces/1/prefix:8
> /etc/vservers/foo/interfaces/1/dev:dummy0
> /etc/vservers/foo/interfaces/1/name:virt0

with this config, if you start the guest, util-vserver
will (according to your config) create an alias
'dummy0:virt0' with the ip 10.0.0.2/8 and assign that
address to your guest

HTH,
Herbert

> regards
>
> --
> Marc Chantreux
> BibLibre, expert en logiciels libres pour l'info-doc
> http://biblibre.com
Received on Thu Nov 26 20:54:27 2009

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 26 Nov 2009 - 20:54:28 GMT by hypermail 2.1.8