Saturday, November 20, 2010

HOWTO : Virtualization platform by Proxmox VE

Proxmox Virtual Environment (Proxmox VE) works with virtualization featured CPU (such as Intel VT and AMD-V CPU) and non-virtualization featured CPU. Virtualization featured CPU is working on full virtualization by KVM technology. Non-virtualization featured CPU is working on container virtualization by OpenVZ.

This tutorial is mainly on setting up the Proxmox VE with Virtualization featured CPU only.

Proxmox VE does not work on fake RAID or software RAID (RAID on motherboard may consider as fake or software RAID). Make sure you are using Hardware RAID when necessary.

Why virtualization?
The answer is here.

Remarks : Proxmox VE is working fine on Intel Xeon E5420 Quad Core X 2, 16GB ECC DDR2 RAM and 1TB X 6 Hard Drive on Adaptec RAID 6 with 2 Hot Spare (1.8TB for usage).



Step 1 :

Download the latest Proxmox VE at here. The current version is 1.6-5261-4 (with 2.6.32-4 kernel) at the time of this writing. The ISO image is 64-bit version. The ISO image has a hard drive space limitation to 2TB.

If you want to have larger than 2TB hard drive size, you should follow the procedure at here.

Step 2 :

You should have 3 network interfaces at least where eth0 (vmbr0) is for the Proxmox VE, eth1 (vmbr1) is for connecting to the internet and eth2 (vmbr2) is for the virtual machines. Where the vmbrX is the virtual network interface for the virtual machines that binded to the physical network interfaces.

Step 3 :

Install Proxmox VE and follow the instructions on the screen (a mouse is required). For example, the IP address is 192.68.100.2 and the hostname is proxmox.samiux.com. The primary DNS and gateway are 192.168.100.1.

Step 4 :

After the installation, the system will be rebooted. If you do not have a router connected to the Proxmox box, connect the Proxmox VE to a laptop which is set to the IP address 192.168.100.5 manually. You may require a switch to do so. (I used to install software based router/UTM, so this procedure is necessary, please see Step 9 for details).

On the browser, type http://192.168.100.2 and then you are directed to the Proxmox VE control panel. Username is "root" and password is the password that you created during the installation.

Step 5 :

Go to "Configuration" -- "System". Bind the phyiscal network interfaces to virtual interfaces. vmbr0 is binded to eth0 (IP : 192.168.100.2, subnet mask : 255.255.255.0, Gateway : 192.168.100.1). vmbr1 is binded to eth1 and vmbr2 is binded to eth2. You are required to reboot your system after the network interfaces binding.

Step 6 :

Go to "VM Manger" -- "ISO Images". Upload the Ubuntu 10.10 Server ISO file (for example) to the Proxmox. Assumed that we are using KVM for the virtualization.

Step 7 :

Go to "VM Manager" -- "Virtual Machines". Create a virtual machine by selecting "Create" tab.

Type : Fully virtualized (KVM)
Disk space (GB) : enter your desired size, e.g. 80
Name : any name, e.g. Ubuntu_server
Memory (MB) : at least 512MB

Start at boot : enabled
Disk type : IDE or SCSI (I perfer to SCSI)
Guest type : Linux 2.6
CPU Sockets : 1 (sockets but not cores)

Bridge : vmbr2
Network Card : e1000

Then, press "Create" button.

Step 8 :

The "VMD 101" is created. Select it and you will direct to the details of "KVM 101". Change the value of CPU Sockets and Cores/Socket when necessary.

Go to "Hardware" tab and add the Ubuntu server ISO image to the "CD-ROM drives".

Press "Start" button. Then click on the red coloured "Open VNC console". Java is required for this operation.

Then, install the Ubuntu 10.10 server accordingly.

Step 9 (Optional) :

You can also create a software based router and/or Unified Threat Management (UTM), such as Untangle. You need to blind vmbr1 to eth0 (internet connection) and vmbr2 to eth1 (for connecting to other virtual machines). Where eth0 and eth1 are the interface name of Untangle.

If you are going to install Untangle inside Proxmox VE, you should install Untangle first and then the Ubuntu server and etc.

Step 10 :

Go the the Proxmox box. Login and execute the following commands in order to update the Proxmox as well as the kernel. The most updated kernel is 2.6.35-1 at the time of this writing.

aptitude update
aptitude upgrade
aptitude install proxmox-ve-2.6.35


cd /boot
rm *-2.6.32-4*
update-grub


After that, reboot the Proxmox box.

That's all! See you.