Показаны сообщения с ярлыком proxmox. Показать все сообщения
Показаны сообщения с ярлыком proxmox. Показать все сообщения

пятница, 15 июля 2011 г.

Benchmark your PVE

There is a nice tool name prveperf, which, to say it simple, is a Proxmox benchmark.

It's output tell us:

CPU BOGOMIPS: bogomips sum of all CPUs

REGEX/SECOND: regular expressions per second (perl performance test), should be above 300000

HD SIZE: harddisk (root partition) size

BUFFERED READS: simple HD read test. Modern HDs should reach at least 40 MB/sec, modern SATA can do over 100 MB/sec.

AVERAGE SEEK TIME: tests average seek time. Fast SCSI HDs reach values < 8 milliseconds. Common IDE/SATA disks get values from 15 to 20 ms. FSYNCS/SECOND: value should be greater than 200 (you should enable 'write back' cache mode on you RAID controller - needs a battery backed cache (BBWC)).

DNS EXT: average time to resolve an external DNS name

DNS INT: average time to resolve a local DNS name (basically it resolves your local domain name)

Add disk as LVM group to Proxmox

Just a brief remind:

1. Add disk (/dev/sdb) to the host server

2. Do dd if=/dev/zero of={PhysicalVolume} bs=512 count=1
where PhysicalVolume will be /dev/sdb (we'll use whole disk, no partitions) - this will wipe whole disk, just in case.

3. Do pvcreate {PhysicalVolume} - this will give us physical volume named after disk itself (/dev/sdb)

4. Check if PV group created right: pvscan

5. Do vgcreate {VG-name} {PV-group-name}, VG-name should be speak-for-itself name of VG.

6. That's it! Now add the LVM group to the Proxmox VE storage list via web interface, and go to use it!

Clone VM disk

One of flaws of Proxmox is that it does not have ability to clone virtual hard disks. If you store VN disks as files then you simply create another machine, then go to CLI (ssh to cluster node) and cp VM disk (which is file on host machine disk) to file that store new machine disk. But it may be confused to clone disks that are stored on LVM groups.

Here is the solution: use dd instead of cp, and do it in such a way:

dd if=/dev/{sourceLVMGroupName}/vm-{$VMID_SOURCE}-disk-{#} of=/dev/{destLVMGroupName}/vm-{$VMID_NEW}-disk-{#}

For example, if I have such a setup:

# pvscan
PV /dev/sdb VG VG_vmstore lvm2 [931.51 GB / 899.51 GB free]


I simply do

dd if=/dev/VG_vmstore/vm-101-disk-1 of=/dev/VG_vmstore/vm-102-disk-1

What is Proxmox?

For those who yet not familiar with, Proxmox VE is a great web front/system for underlaying virtualisation environment (KVM/qemu and OpenZV both supported). One of its nicest features is that it can work in a cluster mode. Add iSCSI storage to that and You end up with a nice cloud like solution for running virtual machines (VMs).

What is also great, not only Proxmox provides us with decent web GUI, but it also capable to use various storages and do online backup of VMs. It also can do live migration of VMs between cluster nodes which is superb when we talk about serious scenarios.