Proxmox Virtualiazation
2. Installation
3. Promox Usage
4. VPSs Storage
4.1 Create a Raid storage for VPSs and backup
1. What is Proxmox?
Proxmox is an Open Source Server Virtualization Platform, based on KVM and OpenVZ.
2. Installation
Go to proxmox web site and download the the latest version at: http://www.proxmox.com/downloads
and install,
In this example my harddis size to install Promox is just only 55GB. and I will configure Raid 5 to store the Virtual Private Servers (VPSs) and VPSs Backup in the following steps.
Follow the installations step and fill in by your own information:
Enter to Boot: _
I agree
Next
Next
Next
Wait,
Next
Reboot, to finish the installation.
We can log in with user "root" with the password that we put during the installation.
Or we can access via web browser with user "root" with the password that we put during the installation.
3. Promox Usage
Proxmox system file and path:
Proxmox has 3 main default configuration paths:
/etc/pve/
It is the important path for global Proxmox configuration such as VMs list, Storage information, Users, etc.
/etc/vz/
It is mainly for the Proxmox repository where we can define the download repository, logs path, log level etc.
/var/lib/vz
It is the default storage where we can store the IOS, images, dumps and as well as the VPSs. We are currently point all these images and VMs to /storage partition.
4. VPSs Storage
4.1 Create a Raid storage for VPSs and backup
In this example, I am going to configure RAID5 with 50GB with 3 Disks.
Install required softwares:
apt-get update
apt-get install vim
apt-get install mdadm
Now I am going to setup RAID5 on /dev/sdb /dev/sdc /dev/sdd
root@proxmox01:~# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x98a71f64.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):
Using default value 104857599
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@proxmox01:~#
and then do the same for other disks (/dev/sdc and /dev/sdd)
RAID-5:
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
root@proxmox01:~#mkfs.ext4 /dev/md0
root@proxmox01:~# mkdir /storage
root@proxmox01:~# mount /dev/md0 /storage/
Now we should see /storage with the size (50GB * 3) - 50GB = 100GB
Add to fstab file
vi /etc/fstab
Create tother 3 folders under /storage
mkdir /storage/proxmox_sys
mkdir /storage/proxmox_data
mkdir /storage/proxmox_backup
Changing default Proxmox configuration and storage path
cd /etc/vz/
vi vz.conf
Change following
LOCKDIR=/storage/proxmox_sys/lib/vz/lock
DUMPDIR=/storage/proxmox_sys/lib/vz/dump
LOGFILE=/storage/proxmox_sys/log/vzctl.log
TEMPLATE=/storage/proxmox_sys/lib/vz/template
VE_ROOT=/storage/proxmox_sys/lib/vz/root/$VEID
VE_PRIVATE=/storage/proxmox_sys/lib/vz/private/$VEID
Go to -> Data Center -> Storage -> Add -> Directory -> Select (ISO,Images,Containers and Templates) and named the Directory as proxmox_data
Go to -> Data Center -> Storage -> Add -> Directory -> Select (Backups) and named the Directory as proxmox_backup
and all the other required folders will be create automatically in these folders.
Copy the image iso for the distribution that you want to install and put in the correct location.
Example, we want to install a Ubuntu server, so we just copy the image iso of Ubuntu server put in: /storage/proxmox_data/template/iso
So when we create the VPSs we can select the default location or we want to use the path /storage which is the RAID-5 we create.
Here We go, Enjoy.
Error:
Go to -> Option -> KVM hardware virtualization -> Untick -> OK
That all for now about this Virtualize environments that I want to mention...!
I am going to test more with the Cluster and Move a VPSs without downtime. ;) for the next post.
No comments:
Post a Comment