In this article I document how I installed Proxmox VE on one Hetzners dedicated servers. Proxmox Virtualisation Environment is a complete open source server virtualization management solution. It is based on KVM virtualization & container-based virtualization and manages virtual machines, storage, virtualized networks, and HA Clustering.
I purchased one of Hetzner's servers from their server auction page which included an i7 920 CPU, 24GB DDR3 RAM, Adaptec HW RAID with 2x750GB & 2x3TB hard drives with each pair configured as RAID1.
Debian install
As a first step, I install Debian Squeeze, 64 bit minimal. Before, I ordered my EX4 server at Hetzner, it was few hours and I had the IP address and root password. So, login to Heztner Robot, activate the rescue system, write down the temporary root password, and reboot. Then login again via SSH as root, with the temporary password and start the installimage
script. Select Debian 6.0 64 bit minimal in Linux, in the config file change the hostname and configure the partitions to your personal preference. On the 750GB device I'm using 500 MB for the /boot and the rest is divided into 3 volume groups. As logical volumes, I setup 8GB for swap, 100GB for /root, 100GB for /home and the rest for /var. Save the config file, and wait for the partition to finish writing.
At this point make sure to change the temporary root password with passwd
to something more private.
Initial Host setup
To get rid of some warnings, reconfigure system locales with dpkg-reconfigure locales
. Select the local language, as a second language, next to the English, but set English for the system language. Als timezone should be checked with dpkg-reconfigure tzdata
.
Than add the first user with sudo rights and reconfigure the SSH configs to get basic security in place. Be careful with these steps as the potential is there to lock yourself out, and have to go back to the beginning.
Install sudo which will allow non-root users to execute root commands:apt-get install sudo
adduser yourusername
adduser yourusername sudo
Now we are going to setup some new directories for Proxmox storage and backup. Become root via sudo, and:
mkdir -p /data/
vgdisplay
lvcreate -l <free PE extent> vg0 -n data
mkfs.ext4 /dev/vg0/data -L data
/dev/vg0/data /data ext4 defaults 0 0
mount -a
df -h
mkdir -p /data/iso/template/iso
mkdir -p /data/backup
Proxmox VE 3.x Installation
sudo su
###########################################################################
# PVE packages provided by proxmox.com
deb http://download.proxmox.com/debian squeeze pve
wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
aptitude update
aptitude full-upgrade
aptitude install pve-kernel-2.6.32-12-pve
uname -a
Linux wepoca 2.6.32-12-pve #1 SMP Tue May 15 06:02:20 CEST 2012 x86_64 GNU/Linux
aptitude install proxmox-ve-2.6.32
1.
The following packages have unmet dependencies:
pve-firmware: Conflicts: firmware-linux-nonfree but 0.28+squeeze1 is installed.
Conflicts: firmware-realtek but 0.28+squeeze1 is installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) firmware-linux-nonfree
2) firmware-realtek
Accept this solution? [Y/n/q/?]
a. 0.0.0.0 (default)
b. internal authentication (Citadel will use its own internal user accounts database)
a2ensite pve-redirect.conf
/etc/init.d/apache2 restart
aptitude install ntp ssh lvm2 postfix ksm-control-daemon vzprocps mtr-tiny mc
The following NEW packages will be installed:
ksm-control-daemon postfix{b} ssh vzprocps
0 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1526 kB of archives. After unpacking 3883 kB will be used.
The following packages have unmet dependencies:
postfix: Conflicts: mail-transport-agent which is a virtual package.
citadel-mta: Conflicts: mail-transport-agent which is a virtual package.
The following actions will resolve these dependencies:
Remove the following packages:
1) citadel-mta
Accept this solution? [Y/n/q/?]
pveversion -v
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-12-pve
proxmox-ve-2.6.32: 2.1-68
pve-kernel-2.6.32-12-pve: 2.6.32-68
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-16
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1
Create user for Proxmox web interface
pveum groupadd admin -comment "System Administrators"
pveum aclmod / -group admin -role Administrator
pveum useradd yourusername@pam -comment 'Wepoca'
Optionally change password or leave the same as the linux user:pveum passwd yourusername@pam
Finally, add user to the admin group:pveum usermod yourusername@pam -group admin
Then log in as yourusername@pam
to the Proxmox web interface using the IP of your EX4 host from Hetzner https://<your-IP>:8006/
As a first config over the web, you can set the keyboard locale at Datacenter --> Options --> keyboard, according to your preference.
Set also the storage for Proxmox over Datacenter --> Storage, as defined above, for ISO and for backup files. Do not forget to add the Proxmox user (yourusername in this excersice) in Datacenter --> Users.
In the next tutorial I'll follow-up with how to setup the network and how to install and configure a firewall called Shorewall which is a kind of a front-end to iptables/netfilter.