Manual Einrichtung Proxmox/en
Aus EUserv Wiki
Root (Diskussion | Beiträge) |
Almi1 (Diskussion | Beiträge) (→Configuration of IPv6) |
||
(Der Versionsvergleich bezieht 13 dazwischenliegende Versionen mit ein.) | |||
Zeile 1: | Zeile 1: | ||
- | {{Languages| | + | {{Languages|Manual_Einrichtung_Proxmox}} |
- | [[Kategorie: | + | [[Kategorie:Virtualization]] |
- | '''''Setting up Proxmox | + | [[Kategorie:Service_%2B_Support/en]] |
+ | '''''Manual Setting up Proxmox''''' | ||
__TOC__ | __TOC__ | ||
<div style= "font-size: 1.571em;"> | <div style= "font-size: 1.571em;"> | ||
- | ''' Setting up Proxmox | + | ''' Manual Setting up Proxmox ''' |
</div> | </div> | ||
- | == | + | = 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: | + | [[Datei:proxmox_webinterface_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | = Creating a VM = | |
- | With Proxmox you have the possibility to create virtual machines. | + | 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: | + | [[Datei:proxmox_vm_1_en.png]] |
</center> | </center> | ||
<br> | <br> | ||
- | + | Assign a name to your VM. Additionally you can specify a ressource pool here. Click '''Next''' when you are done. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<br> | <br> | ||
- | + | <center> | |
- | + | [[Datei:proxmox_vm_2_en.png]] | |
- | + | </center> | |
- | + | <br> | |
- | + | Select an operating system for your virtual machine. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<br> | <br> | ||
<center> | <center> | ||
- | [[Datei: | + | [[Datei:proxmox_vm_3_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | 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: | + | [[Datei:proxmox_vm_4_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | Set a drive for your virtual machine. | |
- | + | <br> | |
<center> | <center> | ||
- | [[Datei: | + | [[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> | <center> | ||
- | [[Datei: | + | [[Datei:proxmox_vm_6_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | Next, you can set your VM's memory. | |
- | + | <br> | |
<center> | <center> | ||
- | [[Datei: | + | [[Datei:proxmox_vm_7_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | Finally, you can specify the network settings for your virtual machine. | |
- | + | <br> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<center> | <center> | ||
- | [[Datei: | + | [[Datei:proxmox_vm_8_en.png]] |
</center> | </center> | ||
- | + | <br> | |
- | + | In the confirmation window click '''Finish''' to create your virtual machine. | |
- | + | <br> | |
- | + | ||
- | + | ||
<center> | <center> | ||
- | [[Datei: | + | [[Datei:proxmox_vm_9_en.png]] |
</center> | </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> | ||
- | + | == 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: | + | [[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> | ||
- | + | == Assigning IPs with KVM == | |
- | + | After you have created your VMs you will now need to assign IP addresses to the guests. For this, please only use the additional IPs of your server, which can be displayed under "IP addresses" in the customer panel. We assume a bridged networking setup. The procedure is as follows: | |
- | + | Log in to your server with SSH and enter the following command: | |
- | + | ifconfig vmbr0 | grep -m 1 inet | |
- | + | Note down the addresses under "Bcast" and "Mask". Finally we need the gateway address. Enter the following command: | |
+ | route -n | ||
- | + | The gateway address can be found in the line that begins with "0.0.0.0". | |
- | + | ||
- | + | ||
- | + | ||
- | |||
- | + | We can now begin with the configuration of the guests. Open a browser and enter "https://<Your-Server-IP>:8006". | |
- | + | Log in with your server's access data and click "Virtual Machines" in the left menu. Select the VM you want to assign an IP to. Righ-click on the VM and select '''Console''' | |
- | + | In the guest system enter the command: | |
ifconfig eth0 | ifconfig eth0 | ||
- | The output should look | + | The output should look like this: |
<center> | <center> | ||
[[File: proxmox_ip1.png | thumb | 520px]] | [[File: proxmox_ip1.png | thumb | 520px]] | ||
</center> | </center> | ||
- | |||
- | ifconfig eth0 <IP> bcast <Bcast- | + | The network interface is unconfigured yet. For testing purposes we will add the address manually. Enter the command: |
+ | |||
+ | ifconfig eth0 <IP> bcast <Bcast-Adress> mask <Netmask> | ||
+ | |||
+ | Substitue <Bcast-Address> and <Netmask> with the values we got earlier: | ||
- | |||
<center> | <center> | ||
[[File: proxmox_ip2.png | thumb | 520px]] | [[File: proxmox_ip2.png | thumb | 520px]] | ||
</center> | </center> | ||
- | <pre>ifconfig eth0</pre> | + | <pre>ifconfig eth0</pre> |
+ | |||
+ | should give the following output: | ||
<center> | <center> | ||
[[File: proxmox_ip3.png | thumb | 520px]] | [[File: proxmox_ip3.png | thumb | 520px]] | ||
</center> | </center> | ||
- | Finally | + | |
+ | Finally we set the default GW with: | ||
route add default gw <GATEWAY> | route add default gw <GATEWAY> | ||
- | + | Substitute <GATEWAY> respectively. | |
- | If | + | |
+ | If you issue a | ||
ping google.de | ping google.de | ||
- | + | now, you should get a positive feedback: | |
+ | |||
<center> | <center> | ||
[[File: proxmox_ip4.png | thumb | 520px]] | [[File: proxmox_ip4.png | thumb | 520px]] | ||
</center> | </center> | ||
- | + | If the configuration was successful we will now make the setup persistent by writing it to the configuration files of the guest. For Debian, open the file '''/etc/network/interfaces''' in an editor and add the following content: | |
<pre>auto eth0 | <pre>auto eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
- | address < | + | address <IP> |
- | netmask < | + | netmask <Netmask> |
gateway <Gateway> | gateway <Gateway> | ||
</pre> | </pre> | ||
- | For CentOS we | + | For CentOS/RHEL we will have to adjust the file '''/etc/sysconfig/network-scripts/ifcfg-eth0''': |
<pre>DEVICE=eth0 | <pre>DEVICE=eth0 | ||
- | IPADDR=< | + | IPADDR=<IP> |
- | NETMASK=< | + | NETMASK=<Netmask> |
BROADCAST=<Bcast> | BROADCAST=<Bcast> | ||
- | GATEWAY=< | + | GATEWAY=<Gateway> |
ONBOOT=yes | ONBOOT=yes | ||
BOOTPROTO=none | BOOTPROTO=none | ||
</pre> | </pre> | ||
- | Adjust the values | + | |
+ | Adjust the values in brackets accordingly. After a reboot of the virtual machine it should have network connectivity. | ||
+ | |||
+ | == Example: Creating a Windows VM == | ||
+ | |||
+ | The steps mentioned above can also be applied to the creation of a Windows VM. Please ensure that you have uploaded a Windows ISO first: [[Manual Einrichtung Proxmox/en#Uploading_an_image|Uploading an Image]] | ||
+ | |||
+ | |||
+ | At first, Select '''Create VM''' and enter a name for the VM: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_1.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Select your correct Windows version in the operating system overview: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_2.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Under '''ISO-Image''' select your uploaded Windows image: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_3.png | thumb | 520px]] | ||
+ | |||
+ | Modify the settings for the virtual hard disk. Under '''BUS/Device''' select '''SATA''' and enter the size of the virtual hard disk under '''Disk size (GB)''': | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_4.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Under '''CPU''' enter the amount of virtual CPUs and cores: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_5.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Under '''Memory''' enter the amount of RAM you wish to assign to the VM: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_6.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Keep the default settings under '''Network''' ('''Bridged mode'''): | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_7.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Confirm the settings by clicking on '''Finish''': | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_8.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | In the overview panel right-click on the VM and select '''Start''' to start the VM: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_9.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Right-click on the VM again and select '''Console''' to redirect the graphical output of the VM: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_10.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | You will now see the installation screen: | ||
+ | |||
+ | |||
+ | [[File: proxmox_windows_11.png | thumb | 520px]] | ||
+ | |||
+ | |||
+ | Finally, perform the steps of the Windows installation as usual. Please note that after the installation has been finished, you need to configure the IP settings within the VM.. | ||
+ | |||
+ | = 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> | ||
+ | [[Datei:proxmox_openvz1_en.png]] | ||
+ | </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 == | ||
+ | |||
+ | If you want to use Proxmox OpenVZ VMs with routed networking, some additional configuration is needed. | ||
+ | |||
+ | Activate IP-forwarding : | ||
+ | |||
+ | <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 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 = | ||
+ | |||
+ | == Limitations == | ||
+ | |||
+ | Native support for IPv6 under Proxmox VE first appeared in version 4.0. This includes the possibility of configuring IPv6 for KVM and OpenVZ / LXC containers via the web frontend. | ||
+ | |||
+ | Manual assignment of IPv6 addresses in versions of Proxmox VE less than 4.0 might lead to unexpected (faulty) behaviour (i.e. the Proxmox daemon is not able to start). | ||
+ | |||
+ | == 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 [mailto:support@euserv.de 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: | ||
+ | |||
+ | [[Kundencenter_Server_IPv6_Adressen/en#Creating the IPv6 addresses| 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: | ||
+ | |||
+ | <pre>ip -6 addr add <IPv6 main address> dev vmbr0 | ||
+ | route -A inet6 add default gw <IPv6 gateway></pre> | ||
+ | |||
+ | Next, test the IPv6 connectivity: | ||
+ | |||
+ | <pre>ping6 ipv6.google.com</pre> | ||
+ | |||
+ | If you get a positive result, make the changes in '''/etc/network/interfaces''' persistent (add the following lines): | ||
+ | |||
+ | <pre>iface vmbr0 inet6 static | ||
+ | address <IPv6 main address> | ||
+ | netmask 64 | ||
+ | gateway <IPv6 gateway></pre> | ||
+ | |||
+ | Next, IPv6 forwarding must be activated and the changes applied to the kernel: | ||
+ | |||
+ | <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> | ||
+ | |||
+ | Make sure that in '''/etc/bz/vz.conf''' the following is included (i.e. not commented): | ||
+ | |||
+ | <pre>IPV6="yes"</pre> | ||
+ | |||
+ | == 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'''): | ||
+ | |||
+ | <pre> 2001:db8:beef:1001::1 | ||
+ | 2001:db8:beef:1001::2 | ||
+ | 2001:db8:beef:1001::3 | ||
+ | . | ||
+ | . | ||
+ | .</pre> | ||
+ | |||
+ | Repeat the following step vor all VMs that you want to assign an IP: | ||
+ | |||
+ | <pre>vzctl set <container_id> --ipadd <IPv6-Adresse> --save</pre> | ||
+ | |||
+ | Subsequently start the VM. The connectivity should now be established: | ||
+ | |||
+ | <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. | ||
+ | |||
+ | <center> | ||
+ | [[File: proxmox_ip5.png | thumb | 520px]] | ||
+ | </center> | ||
+ | |||
+ | 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>ip -6 addr add 2001:db8:beef:1001::1/64 dev eth0</pre> | ||
+ | |||
+ | Set the default gateway (the IPv6 main address of your server): | ||
+ | |||
+ | <pre>route -A inet6 add default gw <IPv6 main address>/64</pre> | ||
+ | |||
+ | Finally, you have to create the corresponding route on the host to the virtual machines: | ||
+ | |||
+ | |||
+ | <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> | ||
+ | |||
+ | Test the connectivity with a ping6 or SSH access to your VM. |
Aktuelle Version vom 15:23, 9. Nov. 2015
Languages: |
Deutsch • English |
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'.
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.
Assign a name to your VM. Additionally you can specify a ressource pool here. Click Next when you are done.
Select an operating system for your virtual machine.
Here you can select an uploaded image. Uploading an image is explained under the section Uploading an image.
Set a drive for your virtual machine.
Here you can specify which CPU is supposed to be used for your VM.
Next, you can set your VM's memory.
Finally, you can specify the network settings for your virtual machine.
In the confirmation window click Finish to create your virtual machine.
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.
Proxmox also provides the option to connect to your VM via a VNC console. Click Console in the upper right corner.
Click Start in the next window to connect to your VM via console.
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.
In the tab Content, click the Upload button.
Select a locally stored ISO image and click Upload.
After having successfully uploaded the image, it is displayed in the main window.
Assigning IPs with KVM
After you have created your VMs you will now need to assign IP addresses to the guests. For this, please only use the additional IPs of your server, which can be displayed under "IP addresses" in the customer panel. We assume a bridged networking setup. The procedure is as follows:
Log in to your server with SSH and enter the following command:
ifconfig vmbr0 | grep -m 1 inet
Note down the addresses under "Bcast" and "Mask". Finally we need the gateway address. Enter the following command:
route -n
The gateway address can be found in the line that begins with "0.0.0.0".
We can now begin with the configuration of the guests. Open a browser and enter "https://<Your-Server-IP>:8006".
Log in with your server's access data and click "Virtual Machines" in the left menu. Select the VM you want to assign an IP to. Righ-click on the VM and select Console
In the guest system enter the command:
ifconfig eth0
The output should look like this:
The network interface is unconfigured yet. For testing purposes we will add the address manually. Enter the command:
ifconfig eth0 <IP> bcast <Bcast-Adress> mask <Netmask>
Substitue <Bcast-Address> and <Netmask> with the values we got earlier:
ifconfig eth0
should give the following output:
Finally we set the default GW with:
route add default gw <GATEWAY>
Substitute <GATEWAY> respectively.
If you issue a
ping google.de
now, you should get a positive feedback:
If the configuration was successful we will now make the setup persistent by writing it to the configuration files of the guest. For Debian, open the file /etc/network/interfaces in an editor and add the following content:
auto eth0 iface eth0 inet static address <IP> netmask <Netmask> gateway <Gateway>
For CentOS/RHEL we will have to adjust the file /etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0 IPADDR=<IP> NETMASK=<Netmask> BROADCAST=<Bcast> GATEWAY=<Gateway> ONBOOT=yes BOOTPROTO=none
Adjust the values in brackets accordingly. After a reboot of the virtual machine it should have network connectivity.
Example: Creating a Windows VM
The steps mentioned above can also be applied to the creation of a Windows VM. Please ensure that you have uploaded a Windows ISO first: Uploading an Image
At first, Select Create VM and enter a name for the VM:
Select your correct Windows version in the operating system overview:
Under ISO-Image select your uploaded Windows image:
Modify the settings for the virtual hard disk. Under BUS/Device select SATA and enter the size of the virtual hard disk under Disk size (GB):
Under CPU enter the amount of virtual CPUs and cores:
Under Memory enter the amount of RAM you wish to assign to the VM:
Keep the default settings under Network (Bridged mode):
Confirm the settings by clicking on Finish:
In the overview panel right-click on the VM and select Start to start the VM:
Right-click on the VM again and select Console to redirect the graphical output of the VM:
You will now see the installation screen:
Finally, perform the steps of the Windows installation as usual. Please note that after the installation has been finished, you need to configure the IP settings within the VM..
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'.
Click the Content tab.
Select the tab Templates to download a template.
Select a template (in this case centos-6-standard) and click Download.
After the download has finished, the following output appears:
Click the Create CT button to create an OpenVZ container.
In the following window individual settings for the OpenVZ container can be set up. Enter a name for the CT and assign a password.
Select the downloaded template that you want to use for the new CT.
Set the ressources of your container. These include memory, disk size, swap and number of the CPUs.
On the tab Network choose between Routed mode or Bridged mode. Confirm your choice with Next.
Here your DNS settings can be configured.
Finally you will be presented with a confirmation window that gives you a summary of all the settings you have made.
Finished! You have created an OpenVZ container, displayed in the 'Server View'.
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
Limitations
Native support for IPv6 under Proxmox VE first appeared in version 4.0. This includes the possibility of configuring IPv6 for KVM and OpenVZ / LXC containers via the web frontend.
Manual assignment of IPv6 addresses in versions of Proxmox VE less than 4.0 might lead to unexpected (faulty) behaviour (i.e. the Proxmox daemon is not able to start).
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:
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.