Install Proxmox VE on Debian Squeeze on 32-Bit Processor

From Proxmox VE
Jump to navigation Jump to search

This article deals with installing Proxmox VE 2.1 on 32-bit Debian Squeeze.

Introduction

I started originally with Proxmox VE 1.4, installing it on my 32-bit host using these instructions: Install Proxmox VE on Debian Lenny on 32-Bit Processor. Big thanks to the author for the helpful hints in that article. I expanded upon his approach by re-building all the packages, including the custom patched kernel.

The pre-built packages here are based on the sources available on September 20th, 2012 (equivalent to v2.1 with some v2.2 updates).

Installation

If you'd like to just get on with it and install the packages, our company, Locatrix Communications, has provided a download repository with the pre-made packages. We make no guarantees what-so-ever about these packages. They are unofficial and completely unsupported.

Step 1: Setup a fresh Debian Squeeze 32-bit system

Here's the CD image we used:

wget http://cdimage.debian.org/cdimage/archive/6.0.8/i386/iso-cd/debian-6.0.8-i386-netinst.iso

When partitioning, use LVM and you're going to want to leave 4GB of space free for snapshot backups (reference: http://forum.proxmox.com/threads/2059-backup-issues). The Proxmox bare-metal installer does this automatically when installing the default setup. Snapshot backups should only use 1GB of that space regardless of the VM size.

Here's how to setup your partitioning:

  • Guided - Use entire disk and set up LVM
  • Select default disk (e.g. "SCSI3 (0,0,0...")
  • All files in one partition
  • Choose "Yes" to write the changes to disks and configure LVM
  • On the "Partition disks" review screen
  • Arrow up and choose "Configure the Logical Volume Manager"
  • Choose "Yes" to write the changes to disks and configure LVM
  • Delete logical volume
  • Choose "root"
  • Create logical volume
  • Choose default volume group, e.g. "debian"
  • Enter "root" as the logical volume name
  • Now choose a size that is around 4GB smaller than the default to allow for that 4GB to be used for snapshot backups (e.g. if the default is "47934MB", I just entered "43934MB")
  • Finish
  • Arrow down and select the line that says "#1 XX GB" (with XX being the size you chose above), it's the line underneath "LVM VG debian, LV root...".
  • Choose "Use as: do not use"
  • Choose "Ext3 journaling file system"
  • Choose "Mount point: none"
  • Choose "/ - the root file system"
  • Choose "Done setting up the partition"
  • Choose "Finish partitioning and write changes to disk"
  • Choose "Yes" to write the changes to disks

Proceed through the rest of the installation.

Step 2: Prepare the installed system

Add the Locatrix package repository

vi /etc/apt/sources.list
# Add a new line: 
deb http://download.locatrix.com/proxmox32/ ./

Download the updated package information

aptitude update

Setup the network

apt-get install postfix bridge-utils
vi /etc/network/interfaces
# Add the below in place of your existing eth0 configuration
# This assumes you have a single network interface on a local LAN on 192.168.0.x
# The bridge interface below should take-over the IP you were previously using on eth0
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
        address  192.168.0.90
        netmask  255.255.255.0
        gateway  192.168.0.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

Setup NAT forwarding

# Save
vi /etc/sysctl.conf
# Uncomment the line
net.ipv4.ip_forward=1
# Save/test
sysctl -p

Setup hosts file for pve-manager

vi /etc/hosts
# Set to your machine's actual vmbr0 interface IP from above instead of 127.0.1.1
192.168.0.90 somemachine.mynet.net somemachine pvelocalhost

Install NTP

apt-get install ntp

Step 3: Install the packages

First install the kernel

apt-get install pve-firmware
apt-get install pve-kernel-2.6.32-14-pve
reboot

uname -a should report "2.6.32-14-pve"

Do not proceed with rebooting first!

I've had to include a bit of hacking with LVM until I sort out the problem. It seems using the lvm2 package excludes a necessary init script to bootstrap lvm.

apt-get install clvm
apt-get install vzctl

wget http://download.locatrix.com/proxmox32/lvmfix.sh
wget http://download.locatrix.com/proxmox32/hooks-lvm2
wget http://download.locatrix.com/proxmox32/local-top-lvm2
sh ./lvmfix.sh

Ensure you setup the /etc/hosts file correctly as above, or pve-manager will fail to install.

Install the rest of the packages:

apt-get install proxmox-ve-2.6.32
apt-get install ssh ksm-control-daemon
a2ensite pve-redirect.conf
/etc/init.d/apache2 reload

Not required, but I recommend giving your machine another reboot at this stage to make sure everything comes up OK. Better to find out now.

reboot

Visit your new Proxmox install: https://<mymachine>:8006

  • Login using your Linux password, e.g. "root" and "<whatever-you-set-in-the-installer>"

If you want to get started right away adding some VMs, I recommend you do this:

  • Login as above
  • Click on Datacenter->mymachine->local (mymachine)->Content
  • Click Templates in that section
  • Click a template and download it, e.g. "Ubuntu 10.04"
  • After the template has been downloaded, you can now launch a VM of that type using "Create CT" in the upper-right-hand-corner

Upgrade

UPDATE: September 2012 - Updated the repository to a later version of the source code and improved some parts of the build process.

You should be able to automatically upgrade from the previous release to the latest with these commands

apt-get update
apt-get upgrade
apt-get install proxmox-ve-2.6.32 pve-qemu-kvm qemu-server

Notes

One difference from the Install_Proxmox_VE_on_Debian_Lenny_on_32-Bit_Processor instructions is that I included all the qemu and KVM packages, because I understand they may be useful for some people. You can also still run VMs under QEMU in this setup even if you don't have hardware support for KVM. This isn't recommended, however, and what you really want is to just use OpenVZ for everything.

  • On start-up you see messages like "unable to load kvm module"
    • This means your processor doesn't support KVM, so just ignore it and use OpenVZ for all of your VMs
  • If you try to start a VM and see "No accelerator found!"
    • This means your hardware doesn't support KVM.
    • You can disable KVM under Options->KVM hardware acceleration, but in general this is a bad idea since it means the system will fall-back to QEMU-only, which will give you poor performance. Instead you should create your VMs with "Create CT" to use OpenVZ.
  • If you see "start failed" after doing the above, you may have selected an unsupported CPU type.
    • Login to your host machine and run: /usr/bin/kvm -cpu ?
    • This will give you a list of valid options, like "Opteron_G3", note items in brackets are not available, like "[pentium3]"

Bugs

Reports from the wild suggest that the packages seem to work fine in stand-alone servers, but clustering may have issues. If you have information to share, send it through to Andrew Eross on the PVE users mailing list

Build the packages yourself

If you'd like to re-build all of the packages yourself, we are happy to share the PHP build script that automatically downloads all the sources, modifies the package files, builds, and then creates a repository for the packages. This is the same script used to create the Locatrix repository above from scratch.

Notes:

  • Start with a clean Debian Squeeze 32-bit system. You need to be aware the build process can harm your system and so you really do this inside of a new VM that you don't mind deleting afterwards.
  • Run the build either as root or from an account that can use sudo. Various parts of the build process require packages to be installed as we proceed.

Run the build:

# install sudo because the build script assumes you have it
su root -c 'apt-get install sudo'
vi /etc/group
# add your current user account to the 'sudo' group if you're not running as root
# save
sudo apt-get install php5-cli
cd ~
wget http://download.locatrix.com/proxmox32/build
# output some information about the build program
php ./build
# now run the full build
php ./build -f
# hint: if you seem to get stuck on "Preconfiguring packages..." for a while .. 
#       just press enter once.. some GUI screen in the background gets stuck every time for me

|