Manual Einrichtung Proxmox/en

Aus EUserv Wiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
-
{{Languages|Manual Einrichtung Proxmox}}
+
{{Languages|Manual_Einrichtung_Proxmox}}
[[Kategorie:Virtualization]]
[[Kategorie:Virtualization]]
-
'''''Setting up Proxmox on your server'''''
+
'''''Manual Setting up Proxmox'''''
__TOC__
__TOC__
<div style= "font-size: 1.571em;">
<div style= "font-size: 1.571em;">
-
''' Setting up Proxmox on your server '''
+
''' Manual Setting up Proxmox '''
</div>
</div>
-
== Web Interface==
+
= Webinterface =
 +
Enter the IP address of your server followed by ''':8006''' to reach the web interface. Here you can login with your 'username' and 'password'.
 +
<br>
<center>
<center>
-
[[Datei:proxmox1.png|thumb|520px|Proxmox-Anmeldungs-Screen]]
+
[[Datei:proxmox_webinterface_en.png]]
</center>
</center>
-
To reach the web interface of Proxmox, point your browser to the IP address of your server. If this does not work, it may be necessary, a <b> :8006 </b> to be appended to the address. Here you can sign in with your 'Username' and 'Password'.
+
<br>
-
== Creating a Virtual Machine (KVM) ==
+
= Creating a VM =
-
With Proxmox you have the possibility to create virtual machines. Proceed as 'VM Manager' to 'Virtuelle Maschinen'. Now click on the tab 'Erstellen'. You can make a preliminary configuration of your unit:
+
With Proxmox you have the possibility to create virtual machines. Click "Create VM" in the upper right corner. Here you can do a pre-configuration of your virtual machine.
 +
<br>
<center>
<center>
-
[[Datei:proxmox3.png|thumb|520px|Virtuelle Maschine erstellen]]
+
[[Datei:proxmox_vm_1_en.png]]
</center>
</center>
<br>
<br>
-
{|width="100%" style="border-color:rgb(230,230,230); background-color:white;" cellpadding="5" cellspacing="0" border="2px solid"
+
Assign a name to your VM. Additionally you can specify a ressource pool here. Click '''Next''' when you are done.
-
|-
+
-
|width="25%" style="background-color:rgb(230,230,230)"|'''Configuration''' ||width="25%" style="background-color:rgb(230,230,230)"|'''Setting'''
+
-
|-
+
-
|Typ:||Here you specify the type of VE. Standard is fully virtualized (KVM)
+
-
|-
+
-
|ISO Storage:||Here you can specify the path where your local ISO files. - default:local (dir)
+
-
|-
+
-
|Installationsmedium:||Here you can select an ISO image, which you want to include. This must be previously uploaded: [[Manual Einrichtung Proxmox#Upload von Images|Upload von Images]]
+
-
|-
+
-
|Disk Storage:||default:local(dir)
+
-
|-
+
-
|Festplattenplatz (GB):||Enter here in the GB on the size of your VE.
+
-
|-
+
-
|Name:||Enter a name for your virtual machine.
+
-
|-
+
-
|Speicher (MB):||Enter the amount of memory in MB for your VE.
+
-
|-
+
-
|VMID:||The identification number of your VE:
+
-
|-
+
-
|Clusterknoten:||The IP address of your host system.
+
-
|-
+
-
|Beim Booten starten: ||Here you can select whether the VE will also start booting your Severs.
+
-
|-
+
-
|Image Format:||The image format. (default: raw)
+
-
|-
+
-
|Festpattentyp:||Enter the type of your hard disk. (default: IDE)
+
-
|-
+
-
|Gasttyp:||Please fill in your guest.
+
-
|-
+
-
|CPU Sockets:||Enter the number of your CPU socket, which will use the VE.
+
-
|-
+
-
|}
+
-
 
+
<br>
<br>
-
 
+
<center>
-
{|width="100%" style="border-color:rgb(230,230,230); background-color:white;" cellpadding="5" cellspacing="0" border="2px solid"
+
[[Datei:proxmox_vm_2_en.png]]
-
|-
+
</center>
-
|width="25%" style="background-color:rgb(230,230,230)"|'''Network''' ||width="25%" style="background-color:rgb(230,230,230)"|'''Setting'''
+
<br>
-
|-
+
Select an operating system for your virtual machine.
-
|Bridge:  ||Enter the bridge. (default:vmbr0)
+
-
|-
+
-
|Netzwerkkarte:||Enter the network card to be emulated.
+
-
|-
+
-
|MAC Address:||Here you can see the MAC address of your used VE.
+
-
|}
+
<br>
<br>
<center>
<center>
-
[[Datei:proxmox9.png|thumb|520px]]
+
[[Datei:proxmox_vm_3_en.png]]
</center>
</center>
-
 
+
<br>
-
To create your virtual machine, click 'Create'.
+
Here you can select an uploaded image. Uploading an image is explained under the section [[Manual Einrichtung Proxmox/en#Uploading an image|Uploading an image]].
-
 
+
<br>
<center>
<center>
-
[[Datei:proxmox10.png|thumb|520px]]
+
[[Datei:proxmox_vm_4_en.png]]
</center>
</center>
-
 
+
<br>
-
Now the VE was created.
+
Set a drive for your virtual machine.
-
 
+
<br>
<center>
<center>
-
[[Datei:proxmox11.png|thumb|520px|Liste mit Ihren erstellten VM]]
+
[[Datei:proxmox_vm_5_en.png]]
</center>
</center>
 +
<br>
 +
Here you can specify which CPU is supposed to be used for your VM.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_6_en.png]]
 +
</center>
 +
<br>
 +
Next, you can set your VM's memory.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_7_en.png]]
 +
</center>
 +
<br>
 +
Finally, you can specify the network settings for your virtual machine.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_8_en.png]]
 +
</center>
 +
<br>
 +
In the confirmation window click '''Finish''' to create your virtual machine.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_9_en.png]]
 +
</center>
 +
<br>
 +
== Starting the virtual machine ==
 +
Click '''Start''' in the upper right corner to start the VM. Additionally you have the possibility to shutdown, stop or restart your VM. This can be done with a click on '''Shutdown''', '''Stop''' or '''Reset'''. If you want to delete your VM click '''Delete'''.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_10_en.png]]
 +
</center>
 +
<br>
 +
Proxmox also provides the option to connect to your VM via a VNC console. Click '''Console''' in the upper right corner.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_11_en.png]]
 +
</center>
 +
<br>
 +
Click '''Start''' in the next window to connect to your VM via console.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_vm_13_en.png]]
 +
</center>
 +
<br>
-
Click on the tab 'Liste'. Here you can see which virtual machines you have created.
+
== Uploading an image ==
-
 
+
To use an ISO image for the virtual machine, you have to upload it. Please  proceed as follows:<br>
 +
<br>
 +
Select '''storage''' from the server view.
 +
<br>
<center>
<center>
-
[[Datei:proxmox12.png|thumb|520px|Starten Sie Ihre VM]]
+
[[Datei:proxmox_image_upload_1_en.png]]
</center>
</center>
 +
<br>
 +
In the tab '''Content''', click the '''Upload''' button. 
 +
<br>
 +
<center>
 +
[[Datei:proxmox_image_upload_2_en.png]]
 +
</center>
 +
<br>
 +
Select a locally stored ISO image and click '''Upload'''.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_image_upload_3_en.png]]
 +
</center>
 +
<br>
 +
After having successfully uploaded the image, it is displayed in the main window.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_image_upload_4_en.png]]
 +
</center>
 +
<br>
-
After you select one of the listed VM, you can start it now. Just click on the 'Start' button.
+
= Creating an OpenVZ container =
 +
With Proxmox you have the possibility to create an OpenVZ container. To do this click on '''storage''' in the 'Server View'.
 +
<br>
<center>
<center>
-
[[Datei:proxmox13.png|thumb|520px]]
+
[[Datei:proxmox_openvz1_en.png]]
</center>
</center>
 +
<br>
 +
Click the '''Content''' tab.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz2_en.png]]
 +
</center>
 +
<br>
 +
Select the tab '''Templates''' to download a template.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz3_en.png]]
 +
</center>
 +
<br>
 +
Select a template (in this case centos-6-standard) and click '''Download'''.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz4_en.png]]
 +
</center>
 +
<br>
 +
After the download has finished, the following output appears:
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz5_en.png]]
 +
</center>
 +
<br>
 +
Click the '''Create CT''' button to create an OpenVZ container.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz6_en.png]]
 +
</center>
 +
<br>
 +
In the following window individual settings for the OpenVZ container can be set up. Enter a name for the CT and assign a password.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz7_en.png]]
 +
</center>
 +
<br>
 +
Select the downloaded template that you want to use for the new CT.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz8_en.png]]
 +
</center>
 +
<br>
 +
Set the ressources of your container. These include memory, disk size, swap and number of the CPUs.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz9_en.png]]
 +
</center>
 +
<br>
 +
On the tab '''Network''' choose between '''Routed mode''' or '''Bridged mode'''. Confirm your choice with '''Next'''.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz10_en.png]]
 +
</center>
 +
<br>
 +
Here your DNS settings can be configured.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz11_en.png]]
 +
</center>
 +
<br>
 +
Finally you will be presented with a confirmation window that gives you a summary of all the settings you have made.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz12_en.png]]
 +
</center>
 +
<br>
 +
Finished! You have created an OpenVZ container, displayed in the 'Server View'.
 +
<br>
 +
<center>
 +
[[Datei:proxmox_openvz13_en.png]]
 +
</center>
 +
<br>
 +
To start the OpenVZ container click on '''Start'''. If you want to shutdown your CT click on '''Shutdown'''. To stop your container click on '''Stop'''.
 +
== Configuration OpenVZ routed ==
-
The status of the VM changes from '''stopped''' to'''running'''. On the basis of resource utilization, you can see that the VM is running now. Click <div style="color:red;font-weight:bold;"> Open VNC console </div> in order to use their VM eventually.
+
If you want to use Proxmox OpenVZ VMs with routed networking, some additional configuration is needed.
-
You can also follow this 'Zurücksetzen', 'Herunterfahren' or 'Stoppen'. By clicking on the appropriate button, the actions are executed.
+
Activate IP-forwarding :
-
== Uploading Images ==
+
  <nowiki>
 +
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
 +
echo 'net.ipv6.conf.all.proxy_ndp=1' >> /etc/sysctl.conf </nowiki>
-
If you have a previously downloaded ISO image, it is possible that you can upload this under Proxmox. This image can then include in your virtual machine. Please proceed as follows:
+
Configure OpenVZ for the use of multiple subnets on the same network interface:
-
<center>
+
/etc/vz/vz.conf
-
[[Datei:proxmox14.png|thumb|520px]]
+
-
</center>
+
 +
# Controls which interfaces to send ARP requests and modify APR tables on.
 +
NEIGHBOUR_DEVS=all
-
Click under the menu navigation 'VM Manager' to 'ISO Images'. Next click on the 'Durchsuchen' button and select your downloaded image on your local hard drive. Finally, click on <div style="color:red;font-weight:bold;">Upload</div> under 'Storage 'local': ISO Images' you will see a list of your uploaded images.
+
= Configuration of IPv6 =
 +
== Preparations ==
-
<center>
+
To use IPv6 for your virtual machines or OpenVZ containers you must set up the free contained IPv6 /64 net via the support. Send an accordingly request to [mailto:support@euserv.de EUserv Support].
-
[[Datei:proxmox15.png|thumb|520px]]
+
-
</center>
+
 +
The IPv6 net will be routed via the main IPv6 address of your server. If you don't have created the main IPv6 address, please follow these steps:
-
If you now create a new virtual machine, choose the configuration option 'Installationsmedium:' from the uploaded image.
+
[[Kundencenter_Server_IPv6_Adressen/en#Creating the IPv6 addresses| Creating the IPv6 addresses]]
-
<center>
+
== Configuration of the host system ==
-
[[Datei:proxmox16.png|thumb|520px]]
+
-
</center>
+
 +
You need the main IPv6 address and the associated IPv6 gateway for configuration of the host system. In the customer service center both data can be found by clicking on '''IPv6 addresses'''.
-
After you create your VM, you can start them. Finally, click on <div style="color:red;font-weight:bold;">Open VNC console</div> and start your console with the starting operating system.
+
Assign the main IPv6 address of your server to the active network interface ('vmbr0' in the default installation) and create the default gateway:
-
== Assign IP's with KVM ==
+
<pre>ip -6 addr add <IPv6 main address> dev vmbr0
 +
route -A inet6 add default gw <IPv6 gateway></pre>
-
If you created your VM's and using an ISO image installed operating systems, we have the next step to assign IP addresses to the guests.
+
Next, test the IPv6 connectivity:
-
https://www.euserv.com/wiki/index.php/Kundencenter_Server_IP_Adressen/en
+
<pre>ping6 ipv6.google.com</pre>
-
Therefore we assume a Bridged Networking Setup (s.o.) Proceed as follows:
+
If you get a positive result, make the changes in '''/etc/network/interfaces''' persistent (add the following lines):
-
Point your browser to the Proxmox web interface. Enter your server IP in the browser address bar or if it is not working "<Server-IP>:8006".
+
<pre>iface vmbr0 inet6 static
 +
      address   <IPv6 main address>
 +
      netmask  64
 +
      gateway  <IPv6 gateway></pre>
-
Now log in with your access and click on the left menu "Virtual Machines". Now select the VM from which you want to assign an IP, then you go to the bottom left <div style="color:red;font-weight:bold;">Open VNC console</div>
+
Next, IPv6 forwarding must be activated and the changes applied to the kernel:
-
Now enter the command in the host system
+
<pre>echo 'net.ipv6.conf.all.proxy_ndp=1' >> /etc/sysctl.conf
 +
echo 'net.ipv6.conf.all.forwarding=1' >> /etc/sysctl.conf
 +
sysctl -p</pre>
-
  ifconfig eth0
+
Make sure that in '''/etc/bz/vz.conf''' the following is included (i.e. not commented):
-
The output should look something like this:
+
<pre>IPV6="yes"</pre>
-
<center>
+
-
[[File: proxmox_ip1.png | thumb | 520px]]
+
-
</center>
+
-
The network interface is not providing any IP assigned. For testing purposes, we will now make the adjustments manually. Enter the command
+
-
  ifconfig eth0 <IP> bcast <Bcast-Adresse> mask <Netzmaske>
+
== Configuration of the guest system (OpenVZ) ==
-
with the data that we have previously identified in the host system. For <IP> set of course the IP address that you want for the guest:
+
Now you can assign the IPv6 addresses from the /64 subnet to your virtual machines. The webinterface of Proxmox can only handle IPv4 addresses, so the configuration must be made via the terminal in the host system. The first three addresses are (supposing the /64 net is '''2001:db8:beef:1001::/64'''):
-
<center>
+
-
[[File: proxmox_ip2.png | thumb | 520px]]
+
-
</center>
+
-
<pre>ifconfig eth0</pre> at the moment it should be spending approximately the following:
+
-
<center>
+
<pre> 2001:db8:beef:1001::1
-
[[File: proxmox_ip3.png | thumb | 520px]]
+
2001:db8:beef:1001::2
-
</center>
+
2001:db8:beef:1001::3
-
Finally, we are still running with the default gateway
+
          .
 +
          .
 +
          .</pre>
-
  route add default gw <GATEWAY>
+
Repeat the following step vor all VMs that you want to assign an IP:
-
Where <Gateway> is replaced with the address identified above.
+
<pre>vzctl set <container_id> --ipadd <IPv6-Adresse> --save</pre>
-
If we do such as a
+
Subsequently start the VM. The connectivity should now be established:
-
  ping google.de
+
<pre>vzctl start <container_id>
 +
(this step can also be done via the webinterface)</pre>
 +
 
 +
== Configuration of the guest system (KVM/routed) ==
 +
 
 +
Hint: The '''bridged''' network configuration is needed for the assignment of IPv6 addresses from the /64 subnet.
-
in running we should get a positive result:
 
<center>
<center>
-
[[File: proxmox_ip4.png | thumb | 520px]]
+
[[File: proxmox_ip5.png | thumb | 520px]]
</center>
</center>
-
The configuration was successful, you can now set or that the settings will be applied after each restart the virtual machine. You can open an editor for Debian in the file/etc/network/interfaces and write in the following content:
+
First assign an IPv6 address from the /64 subnet to the network interface in the VM (replace the example address with the actual address you are planning to assign):
-
<pre>auto eth0
+
<pre>ip -6 addr add 2001:db8:beef:1001::1/64 dev eth0</pre>
-
iface eth0 inet static
+
Set the default gateway (the IPv6 main address of your server):
-
    address <zu_vergebene_IP>
+
-
    netmask <Netzmaske>
+
-
    gateway <Gateway>
+
-
</pre>
+
-
For CentOS we need to adjust the file/etc/sysconfig/network-scripts/ifcfg-eth0:
+
<pre>route -A inet6 add default gw <IPv6 main address>/64</pre>
-
<pre>DEVICE=eth0
+
Finally, you have to create the corresponding route on the host to the virtual machines:
-
IPADDR=<zu_vergebene_IP>
+
-
NETMASK=<Netzmaske>
+
-
BROADCAST=<Bcast>
+
-
GATEWAY=<Gateway_HostSystem>
+
-
ONBOOT=yes
+
-
BOOTPROTO=none
+
-
</pre>
+
-
Adjust the values ​​of your settings accordingly. After a restart the VM should now be provided with the appropriate IP address and have full connectivity.
+
-
== Configuration OpenVZ routed ==
 
-
If you want to use Proxmox OpenVZ VMs with routed networking, some additional configuration is needed.
+
<pre>ip -6 route add 2001:db8:beef:1001::1 dev vmbr0
 +
ip -6 route add 2001:db8:beef:1001::2 dev vmbr0
 +
ip -6 route add 2001:db8:beef:1001::3 dev vmbr0
 +
          .
 +
          .
 +
          .</pre>
-
Activate IP-forwarding :
+
Test the connectivity with a ping6 or SSH access to your VM.
-
 
+
-
<nowiki>
+
-
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
+
-
echo 'net.ipv6.conf.all.proxy_ndp=1' >> /etc/sysctl.conf </nowiki>
+
-
 
+
-
Configure OpenVZ for the use of op-addresses from different subnets:
+
-
 
+
-
/etc/vz/vz.conf
+
-
 
+
-
# Controls which interfaces to send ARP requests and modify APR tables on.
+
-
NEIGHBOUR_DEVS=all
+

Version vom 18:39, 3. Jul. 2013

Manual Setting up Proxmox

Inhaltsverzeichnis

Manual Setting up Proxmox

Webinterface

Enter the IP address of your server followed by :8006 to reach the web interface. Here you can login with your 'username' and 'password'.

Datei:proxmox_webinterface_en.png


Creating a VM

With Proxmox you have the possibility to create virtual machines. Click "Create VM" in the upper right corner. Here you can do a pre-configuration of your virtual machine.

Datei:proxmox_vm_1_en.png


Assign a name to your VM. Additionally you can specify a ressource pool here. Click Next when you are done.

Datei:proxmox_vm_2_en.png


Select an operating system for your virtual machine.

Datei:proxmox_vm_3_en.png


Here you can select an uploaded image. Uploading an image is explained under the section Uploading an image.

Datei:proxmox_vm_4_en.png


Set a drive for your virtual machine.

Datei:proxmox_vm_5_en.png


Here you can specify which CPU is supposed to be used for your VM.

Datei:proxmox_vm_6_en.png


Next, you can set your VM's memory.

Datei:proxmox_vm_7_en.png


Finally, you can specify the network settings for your virtual machine.

Datei:proxmox_vm_8_en.png


In the confirmation window click Finish to create your virtual machine.

Datei:proxmox_vm_9_en.png


Starting the virtual machine

Click Start in the upper right corner to start the VM. Additionally you have the possibility to shutdown, stop or restart your VM. This can be done with a click on Shutdown, Stop or Reset. If you want to delete your VM click Delete.

Datei:proxmox_vm_10_en.png


Proxmox also provides the option to connect to your VM via a VNC console. Click Console in the upper right corner.

Datei:proxmox_vm_11_en.png


Click Start in the next window to connect to your VM via console.

Datei:proxmox_vm_13_en.png


Uploading an image

To use an ISO image for the virtual machine, you have to upload it. Please proceed as follows:

Select storage from the server view.

Datei:proxmox_image_upload_1_en.png


In the tab Content, click the Upload button.

Datei:proxmox_image_upload_2_en.png


Select a locally stored ISO image and click Upload.

Datei:proxmox_image_upload_3_en.png


After having successfully uploaded the image, it is displayed in the main window.

Datei:proxmox_image_upload_4_en.png


Creating an OpenVZ container

With Proxmox you have the possibility to create an OpenVZ container. To do this click on storage in the 'Server View'.

Datei:proxmox_openvz1_en.png


Click the Content tab.

Datei:proxmox_openvz2_en.png


Select the tab Templates to download a template.

Datei:proxmox_openvz3_en.png


Select a template (in this case centos-6-standard) and click Download.

Datei:proxmox_openvz4_en.png


After the download has finished, the following output appears:

Datei:proxmox_openvz5_en.png


Click the Create CT button to create an OpenVZ container.

Datei:proxmox_openvz6_en.png


In the following window individual settings for the OpenVZ container can be set up. Enter a name for the CT and assign a password.

Datei:proxmox_openvz7_en.png


Select the downloaded template that you want to use for the new CT.

Datei:proxmox_openvz8_en.png


Set the ressources of your container. These include memory, disk size, swap and number of the CPUs.

Datei:proxmox_openvz9_en.png


On the tab Network choose between Routed mode or Bridged mode. Confirm your choice with Next.

Datei:proxmox_openvz10_en.png


Here your DNS settings can be configured.

Datei:proxmox_openvz11_en.png


Finally you will be presented with a confirmation window that gives you a summary of all the settings you have made.

Datei:proxmox_openvz12_en.png


Finished! You have created an OpenVZ container, displayed in the 'Server View'.

Datei:proxmox_openvz13_en.png


To start the OpenVZ container click on Start. If you want to shutdown your CT click on Shutdown. To stop your container click on Stop.

Configuration OpenVZ routed

If you want to use Proxmox OpenVZ VMs with routed networking, some additional configuration is needed.

Activate IP-forwarding :

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
echo 'net.ipv6.conf.all.proxy_ndp=1' >> /etc/sysctl.conf 

Configure OpenVZ for the use of multiple subnets on the same network interface:

/etc/vz/vz.conf

# Controls which interfaces to send ARP requests and modify APR tables on.
NEIGHBOUR_DEVS=all

Configuration of IPv6

Preparations

To use IPv6 for your virtual machines or OpenVZ containers you must set up the free contained IPv6 /64 net via the support. Send an accordingly request to EUserv Support.

The IPv6 net will be routed via the main IPv6 address of your server. If you don't have created the main IPv6 address, please follow these steps:

Creating the IPv6 addresses

Configuration of the host system

You need the main IPv6 address and the associated IPv6 gateway for configuration of the host system. In the customer service center both data can be found by clicking on IPv6 addresses.

Assign the main IPv6 address of your server to the active network interface ('vmbr0' in the default installation) and create the default gateway:

ip -6 addr add <IPv6 main address> dev vmbr0
route -A inet6 add default gw <IPv6 gateway>

Next, test the IPv6 connectivity:

ping6 ipv6.google.com

If you get a positive result, make the changes in /etc/network/interfaces persistent (add the following lines):

iface vmbr0 inet6 static
       address   <IPv6 main address> 
       netmask   64
       gateway   <IPv6 gateway>

Next, IPv6 forwarding must be activated and the changes applied to the kernel:

echo 'net.ipv6.conf.all.proxy_ndp=1' >> /etc/sysctl.conf 
echo 'net.ipv6.conf.all.forwarding=1' >> /etc/sysctl.conf
sysctl -p

Make sure that in /etc/bz/vz.conf the following is included (i.e. not commented):

IPV6="yes"

Configuration of the guest system (OpenVZ)

Now you can assign the IPv6 addresses from the /64 subnet to your virtual machines. The webinterface of Proxmox can only handle IPv4 addresses, so the configuration must be made via the terminal in the host system. The first three addresses are (supposing the /64 net is 2001:db8:beef:1001::/64):

 2001:db8:beef:1001::1
 2001:db8:beef:1001::2
 2001:db8:beef:1001::3
           .
           .
           .

Repeat the following step vor all VMs that you want to assign an IP:

vzctl set <container_id> --ipadd <IPv6-Adresse> --save

Subsequently start the VM. The connectivity should now be established:

vzctl start <container_id>
(this step can also be done via the webinterface)

Configuration of the guest system (KVM/routed)

Hint: The bridged network configuration is needed for the assignment of IPv6 addresses from the /64 subnet.

First assign an IPv6 address from the /64 subnet to the network interface in the VM (replace the example address with the actual address you are planning to assign):

ip -6 addr add 2001:db8:beef:1001::1/64 dev eth0

Set the default gateway (the IPv6 main address of your server):

route -A inet6 add default gw <IPv6 main address>/64

Finally, you have to create the corresponding route on the host to the virtual machines:


ip -6 route add 2001:db8:beef:1001::1 dev vmbr0
ip -6 route add 2001:db8:beef:1001::2 dev vmbr0
ip -6 route add 2001:db8:beef:1001::3 dev vmbr0
           .
           .
           .

Test the connectivity with a ping6 or SSH access to your VM.