OVH Community, your new community space.

Question about guest os


Myatu
31-03-2010, 22:07
Quote Originally Posted by makno
...
/sbin/ifconfig vmbr0 inet6 add 2001:41d0:1:33c::1/56
This should work out of the box with Proxmox. You cannot use any of the netboot kernels with Proxmox.

The file "/etc/vz/vz.conf" should have:
Code:
IPV6="yes"
i need to type
Code:
ip -6 neigh add proxy  dev eth0
but is this on the host or on the vm? and the ip should be the one of the host or of the vm?
That you type on the host, and you replace with the IPv6 address assigned to the VM.

makno
31-03-2010, 19:33
thanks a lot myatu, will give it a try.

The first problem i'n encountering now is how to get ipv6 on the host. For what i understand proxmox is debian based so it should be the same as in ubuntu (where i had no problems to assign an ipv6) but none of the usual
/sbin/ifconfig eth0 inet6 add 2001:41d0:1:33c::1/56
or
/sbin/ifconfig vmbr0 inet6 add 2001:41d0:1:33c::1/56

seems to work. If i try to reboot the server in netboot with kernel 2.6.32.2 ipv6 than the machine doen't come up.

Than the other thing i don't really understand is:
in ubu-910br1 i still need to edit /etc/network/interfaces.tail and only add
Code:
auto eth0
    iface eth0 inet6 static
    address 2001:41d0:2:1234:dead:beef:1
    netmask 56
    gateway 2001:41d0:2:12ff:ff:ff:ff:ff
avoiding the parts relevant to ipv4.
now after doing the same on the host machine (obviously with different ipv6)
i need to type
Code:
ip -6 neigh add proxy  dev eth0
but is this on the host or on the vm? and the ip should be the one of the host or of the vm?

Myatu
30-03-2010, 20:59
Right. vmbr0 gives you a route directly to the Internet / OVH network. Visualize it as this:

OpenVZ/KVM <-> { vmbr0 } <-> OVH

If you're using a "veth" device, then you must make sure the MAC address matches that provided to you by OVH (through the Manager's "Virtual MAC for VPS" option).

vmbr1 gives you an direct route to the host, and so an IN-direct route to the Internet / OVH, visualized like this:

OpenVZ/KVM <-> { vmbr1 } <-> host (dedicated server)

This will allow you to use whatever MAC address, but traffic is limited between the VM's and the host itself.

If you want VMs attached to vmbr1 to have access to the Internet as well, then you need to setup a route from the host (which has internet access) to the VM.

Now, on to the issues at hand...

The VM "ubu910-bri0" does not have an IP address assigned, except for 127.0.0.1. You need to give it a public IP address, so that traffic can routed to and from this VM.

You do this by editing the file /etc/network/interfaces.tail -- note that the common file /etc/network/interfaces should not be used, as the comments at the top of that file indicates:
Code:
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and /etc/network/interfaces.tail instead
An example of the contents is for /etc/network/interfaces.tail is:
Code:
auto eth0
iface eth0 inet static
     address FA.IL.OV.ER
     netmask 255.255.255.255
     post-up route add XX.XX.XX.254 dev eth0
     post-up route add default gw XX.XX.XX.254
The "FA.IL.OV.ER" should be obvious, simply replace that with the actual IP address. The XX.XX.XX.254 should be replaced with the gateway IP address used by your host, however you can also use the host's main/static IP instead (though not recommended in my opinion).

If you want to give VM "ubu910-bri0" an IPv6 address as well, you do this by adding an additional stanza:
Code:
iface eth0 inet6 static
    address 2001:41d0:2:1234:dead:beef:cafe
    netmask 56
    gateway 2001:41d0:2:12ff:ff:ff:ff:ff
This assumes that OVH has assigned you the range 2001:41d0:2:1234/64 (as shown in the manager.

Normally the gateway portion isn't needed, since IPv6 will take care of all this automatically. But if you're running into issues -- and knowing OVH's hackish IPv6 setup, you will -- then the gateway is as determined as following:

Expand the IPv6 address range assigned to you into its full notation (left-pad the hexadecimal digits with 0 up to its length of 4). So for example, "2001:41d0:2:12" becomes "2001:41d0:0002:0012"; another example, "2001:41d0:2:123" becomes "2001:41d0:0002:0123", etc.

You then remove the last two hexadecimal digits and add on "ff:ff:ff:ff:ff". So in "2001:41d0:0002:0123" becomes "2001:41d0:0002:01ff:ff:ff:ff:ff". See http://help.ovh.co.uk/Ipv4Ipv6 for more details.

Since "ubu910-bri0" is attached to vmbr0, as noted earlier you should make sure it has a valid MAC address.

Now on to "ubu910-bri1". This VM does not have an IP address either, but since it doesn't have any way to reach the Internet without a route (see explanation earlier), it shouldn't matter.

If it needs to be accessible by IPv4 from the Internet, then you need to setup a route on the host to this VM (lookup "route add linux" at Google - many, many examples on how to do this).

Unfortunately due to OVH's hackish use of an IPv6 /56 netmask, we need to do a bit of hacking to get IPv6 working over your vmbr1 bridge. For that, the host needs to act as a "Neighbor Discovery" proxy (aka "Proxy NDP").

So first you need to enable proxy NDP on the host, by adding the following line in /etc/network/interfaces:

Code:
iface vmbr0 inet static
    # ... existing lines for vmbr0 ...
    post-up echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp
(ps: I'm using "all" for simplicity).

You can also do this manually by typing echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp - by adding it to the intefaces file, it'll be done automatically upon a boot.

Now, after your have assigned an IPv6 address to "ubu910-bri1" using the same methods as for "ubu910-bri0" described earlier, on the host you "advertise" the VM as following:

Code:
ip -6 neigh add proxy  dev eth0
Now you'll have a route between the Internet (provided by the host) to your VM. Obviously you can automate this as well, by using the OpenVZ hooks (see Proxmox's forum).

Just as a note: If OVH used IPv6 with a proper /64 netmask, then all we needed to do was setup a "radvd" daemon and we'd be done (even the IPv6 addresses would be assigned automatically within the VMs). But radvd will only work with /64, so the next hop on a /56 netmask would be invalid (and so the VMs would have an invalid gateway address). If this has changed in recent times, then I'd love to hear about it!

makno
30-03-2010, 19:44
to be clear i need the following:
2 VM with failover ip (allready up and running with virtual macs)
3 openvz with ipv6 and no need for failover ip

makno
30-03-2010, 19:18
myatu neither ipv4 or ipv6 works,

right i've created another vm with the following settings:

Bridged Ethernet Devices
eth0: vmbr1

the outputs are as follow:
root@ubu910-bri1:/# cat /etc/network/interfaces
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and /etc/network/interfaces.tail instead,
# their contents will be inserted at the beginning and at the end
# of this file, respectively.


auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
broadcast 127.255.255.255
up ip route replace 127.0.0.0/8 dev lo

root@ubu910-bri1:/# ip route
127.0.0.0/8 dev lo scope link
root@ubu910-bri1:/# ifconfig -a
eth0 Link encap:Ethernet HWaddr da:bd:93:31:84:6d
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
BROADCAST POINTOPOINT NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

and a second one with network:
Bridged Ethernet Devices
Eth0: vmbr0

root@ubu910-bri0:/# cat /etc/network/interfaces
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and /etc/network/interfaces.tail instead,
# their contents will be inserted at the beginning and at the end
# of this file, respectively.


auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
broadcast 127.255.255.255
up ip route replace 127.0.0.0/8 dev lo

root@ubu910-bri0:/# ip route
127.0.0.0/8 dev lo scope link
root@ubu910-bri0:/# ifconfig -a
eth0 Link encap:Ethernet HWaddr 6e:c4:36:79:f7:c9
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
BROADCAST POINTOPOINT NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

derchris
30-03-2010, 18:56
Post the following from the VM:

/etc/network/interfaces
ip route
ifconfig -a

For some reason I had to add post-up routes, otherwise the VM was not able to communicate.

Myatu
30-03-2010, 18:54
Is this the IPv4 OpenVZ container you're trying to get to work? Or IPv6?

makno
30-03-2010, 18:42
nothing, i've spent 8 hours reading and asking around but still can't get the network to work on the openvz machines, ovh page on proxmox is to say the least incomplete and and proxmox wiki/faq are not helping either

makno
29-03-2010, 17:27
will give that a try, all i'm worried about is getting the server blocked because of the mac
uhm can't seem to get things working:
create vm ->
Type: Container (OpenVZ)
Template: ubuntu-8.04-standard_8.04-3_i386.tar.gz
Memory (MB): 512 Disk space (GB): 8
Swap (MB): 512
Password: xxx
Confirm Password: xxx
Network Type: Bridged Ethernet (veth)

Bridge: vmbr0

i leave all the other network settings as they are, create and launch the vps.
when in console type ifconfig and:
root@ubu:/# ifconfig lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

where am i going wrong?

Myatu
28-03-2010, 21:53
Yes that will work. If it's directly bridged with eth0, then there's no need to do anything extra.

makno
28-03-2010, 17:54
in the end i managed to install ubuntu on a vm and assign one of the failover ips with no issues at all.
Now the second part is what i think will be a problem: will i be able to run another OpenVZ without the use of an ipv4 and simply give it ipv6 connectivity?
i don't want to waste another failover ip for this simply because all i need is an ipv6 box. Any idea?

makno
25-03-2010, 22:29
i'm messing around with proxmox but can't really get my head arpound how to install ubuntu on it.
I create the vm but can't get it to boot from an iso so not sure how to proceed. Might aswell just try vmware that i know how it works


Edit: now it loaded the ubuntu iso... installing it but not sure yet how the network should be setup

derchris
25-03-2010, 21:42
What Virtualization Software your were planning to us?
Some of them need an IPv6 enabled Kernel, in order for the Guest to use them as well.

YouWhat
25-03-2010, 21:14
as far as I am aware, the ubuntu kernels come pre-built with IPv6 already enabled, so using it shouldn't be a problem as such.

The virtual-mac I am not sure about.

makno
25-03-2010, 19:33
I just ordered the new server with intent to run some vps.

Now one of these vps is going to be ubuntu which i will need with a 1000Hz kernel and ipv6 enabled. Given the host will probably not have a ipv6 enabled kernel will the guest still be able to use ipv6? Also will i need to create a virtualmac to bind to the ipv6 on top of the one created for the failoverip to be assigned to the machine?
Maybe noone has wondered into this so far but possibly someone has an answer