Posts Tagged ‘xen’

Set up IPv6 in Xen domU with nat-mode

Sunday, January 11th, 2009

I have a Xen dom0 with nat-mode and IPv6 enabled. Set up IPv6 in Xen domU is like a classical IPv6 network: add IPv6 addresses on vif interfaces on dom0 and IPv6 addresses on domU (manually or with radvd on dom0). The only tip is how adding IPv6 addresses on vif interfaces which are dynamically created by Xen. Here is my dirty hack to do it on /etc/xen/scripts/vif-nat file:

        [ "$dhcp" != 'no' ] && dhcp_up
        +# Add IPv6 addresses
        +[ "$vif_ip" = '' ] && ifconfig "$vif" add 2001:6f8:143d:1::101:1234/64
        +[ "$vif_ip" = '' ] && ifconfig "$vif" add 2001:6f8:143d:2::101:1234/64

Where $vif_ip is the IP address from domU configuration : vif=[‘ip=].

I think the best solution is adding ipv6 option to domU configuration. I will consider to open a wishlist bug for that.

No /dev/net/tun in xen Linux domU

Wednesday, August 20th, 2008

No persistent /dev/net/tun in xen Linux domU… Hacky workaround is adding

mkdir /dev/net && mknod /dev/net/tun c 10 200

while booting (for example in rc.local or in your init.d script which need it).

For example tun device is useful for SSH VPN. Without it, you will have errors like:

channel 0: open failed: administratively prohibited: open failed