Dobrica Pavlinušić's random unstructured stuff
Proxmox: Revision 11

This page will document my expirience with Proxmox which you might think as web-based version of vz-tools.

Qucik tips

Console using vncviewer

proxmox1:~# grep vnc /etc/inetd.conf
5901 stream tcp nowait root /usr/sbin/qm qm vncproxy 101 password-for-this-vnc-connection



This is somewhat interesting story, because I ended up migrating PVE installation on internal laptop disk to enable dual boot. First, I installed PVE on external USB drive (which wiped out mbr on internal disk, sic!) and than archived all files from it to move it to internal disk.

Installed system had following partitions:

/dev/mapper/pve-root on /mnt/pve type ext3 (rw)
/dev/sdb1 on /mnt/pve/boot type ext3 (rw)
/dev/mapper/pve-data on /mnt/pve/var/lib/vz type ext3 (rw)

So I re-created volume grup pve and logical volumes.

I have following partitions on my laptop:

root@tab:~# fdisk -l /dev/hda

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3b7f0ef5

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1305    10482381   83  Linux
/dev/hda2            1306        1436     1052257+  83  Linux
/dev/hda3            1437        1567     1052257+  82  Linux swap / Solaris
/dev/hda4            1568       12161    85096305    5  Extended
/dev/hda5            1568        4178    20972826   8e  Linux LVM
/dev/hda6            4179        6789    20972826   83  Linux
/dev/hda7            6790        9400    20972826   83  Linux
/dev/hda8            9401       12161    22177701   83  Linux

and I wanted to use /dev/hda2 as boot and /dev/hda5 for lvm

lvm

root@tab:~# pvcreate /dev/hda5
  Physical volume "/dev/hda5" successfully created
root@tab:~# vgcreate pve /dev/hda5 
  Volume group "pve" successfully created
root@tab:~# lvcreate -L 1G -n root pve
  Logical volume "root" created
root@tab:~# lvcreate -L 10G -n data pve
  Logical volume "data" created

create file systems

root@tab:~# mke2fs -j -m 0 /dev/hda2
root@tab:~# mke2fs -j -m 0 /dev/pve/root
root@tab:~# mke2fs -j -m 0 /dev/pve/data

mount fs

root@tab:~# mkdir /mnt/pve/
root@tab:~# mount /dev/pve/root /mnt/pve/
root@tab:~# mkdir /mnt/pve/boot
root@tab:~# mount /dev/hda2 /mnt/pve/boot/
root@tab:~# mkdir -p /mnt/pve/var/lib/vz
root@tab:~# mount /dev/pve/data /mnt/pve/var/lib/vz/

root@tab:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/pve-root   1032088     34104    997984   4% /mnt/pve
/dev/hda2              1035692     34108   1001584   4% /mnt/pve/boot
/dev/mapper/pve-data  10321208    154232  10166976   2% /mnt/pve/var/lib/vz

unpack installation

root@tab:~# cd /mnt/pve/
root@tab:/mnt/pve# tar xvfj /mnt/usb/proxmox-ve_1.1-3664.tar.bz2

root@tab:/mnt/pve# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/pve-root   1032088    521128    510960  51% /mnt/pve
/dev/hda2              1035692     50868    984824   5% /mnt/pve/boot
/dev/mapper/pve-data  10321208    154268  10166940   2% /mnt/pve/var/lib/vz

grub

add Proxmox target into /boot/grub/menu.lst after END DEBIAN AUTOMAGIC KERNELS LIST

root@tab:~# tail -10 /boot/grub/menu.lst
title           Debian GNU/Linux, kernel memtest86+
root            (hd0,0)
kernel          /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

title           Proxmox Virtual Environment, kernel 2.6.24-2-pve
root            (hd0,1)
kernel          /vmlinuz-2.6.24-2-pve root=/dev/mapper/pve-root ro 
initrd          /initrd.img-2.6.24-2-pve

preference df

proxmox:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/pve/root          2064208    556244   1507964  27% /
/dev/sda2              2063536     52640   1906072   3% /boot
/dev/mapper/pve-data  20642428    407420  20235008   2% /var/lib/vz