วันจันทร์ที่ 1 สิงหาคม พ.ศ. 2554

ProxMox: The high-performance virtualization server for the rest of us

What sounds like a cross between a Ferengi mating practice and an  OREO cookie clone, but is actually the latest and greatest in Open Source turnkey virtualization servers? It’s the ProxMox Virtual Environment,  a new open source project that has been flying under the hypervisor radar, but may pose a serious challenge to the established leaders such as VMWare ESX, Citrix XenServer and Microsoft’s fledgling Windows Server 2008 Hyper-V, if it manages to get past its weird name and establishes critical mass.
proxmox6.jpgProxMox isn’t anything new, at least in terms of the technology it packages together — the Kernel Virtual Machine (KVM)  hypervisor and OpenVZ virtual containers. KVM, which is integrated into the upstream Linux kernel, and supports live migration and clustering features, is packaged with a number of Linux distributions, including Ubuntu 8.04, Fedora 9 and the freshly released OpenSUSE 11. Red Hat has recently announced the first beta of oVirt, an open virtualization platform which will feature the technology, and Qumranet, the Israeli company which founded the project, has SolidICE, a commercial desktop virtualization platform under development that uses it.  OpenVZ, the free implementation of Parallels Virtuozzo containers, has been open source and available for use with other Linux distributions for quite some time.
Click on the “Read the rest of this entry” link below for more.

However, until now, nobody has gone and tried to tie the two technologies together, at least in terms of “Pop a CD into a blank server, load it up in less time than it takes to make and eat a ramen noodle cup, and start building VM’s with an easy web interface, and by the way it costs you absolutely nothing” sort of way. At least not until the beta release of ProxMox VE, an Open Source project from Vienna, Austria-based ProxMox Server Solutions GmbH and the Internet Foundation Austria (IPA).
In a nutshell, ProxMox VE is a bare-metal install CD that contains a highly-tweaked version of Debian Etch that is optimized for use as a virtualization server, using a modified Linux kernel which includes all the support needed for KVM and OpenVZ. The system runs completely headless and in a light configuration — the entire install CD is only 250MB. To take advantage of ProxMox VE, you’ll want a 64-bit CPU that supports the Intel VT or AMD-V instruction sets, such as recent Core Duo, Xeon, AMD64 Athlon X2 or Opteron chips. You’ll also want at least 2GB of RAM to run a few virtual machines/virtual environments comfortably.
How easy was this thing to install? I burned the CD ISO file, I popped it in the server, booted it up, answered a few questions in the installer GUI wizard, and in ten minutes I was done. Really. I then logged onto the web interface using the default root account (password “admin”) and started loading VMs.
VMs can be installed in two different ways on ProxMox VE — fully virtualized using KVM, or containerized. Fully virtualized systems can be any number of OSes that run on the Intel architecture , such as various versions of Windows, Linux, or even different versions of UNIX. Containerized VMs on ProxMox VE are limited to Linux only, and require the downloading of OpenVZ/Virtuozzo “templates” — essentially gzipped tar files that contain a pre-installed “image” of a working barebones Linux system. Unlike full virtualization, in which the kernel and all the support files and the filesystems are completely isolated, containers run on a shared kernel environment — the ProxMox server’s Linux kernel — and only use a small fraction of the system resources that a fully virtualized system demands. Because the file systems aren’t dedicated, there isn’t any issue with I/O contention and the storage isn’t pre-allocated. You only use what you need to use. And because the templates are cached into the system, actual virtual machine creation occurs in less than a minute.
Unlike other Web-based virtualization UIs, such as VMWare Server’s 2.0 Virtual Infrastructure Web Access, ProxMox doesn’t use resource intensive back-ends like Tomcat (which VMWare Server 2.0 uses) which can bog down the system and can really slow the response time. The On ProxMox, the administrative GUI is just a bunch of Apache pages implemented in AJAX code with Prototype JS and SOAP::Lite in Perl. While it doesn’t look as pretty as Red Hat’s oVirt or VMWare Server 2.0, it looks clean and does the job. All of the stats are right there where you need them, and all the key functions are all within a few clicks away.
Virtual Machine setup requires uploading the ISO file or the Virtuozzo template for the desired OS thru the web interface, clicking on “Virtual Machines” –> Create and then filling out a few dialogs. It should be noted at the time of this writing, there were a number of bugs with Firefrox 3.0 with the ISO/template upload feature and I found I got much more predictable results when using Internet Explorer 7 to do this. As I understand you can also SSH into the ProxMox server itself and SCP the files over to /var/lib/vz/template/iso if you are administrating the system from a Linux-based or Mac-based machine. Additionally, fully virtualized VMs can also be installed directly from the host machine’s DVD or CD-ROM drive. This is a recommended practice if your install media is in the several gigabytes, such as Vista or OpenSUSE.
In our tests, I installed fully virtualized versions of Windows XP SP3, Windows Server 2008, Mandriva 2008 and RHEL 5.2, as well as containerized versions of CentOS 5 (a RHEL 5 clone) and Debian Etch. Overall, I thought the performance of both types of virtualized environment were excellent, and it was patently obvious that the on-chip virtualization acceleration in KVM was far superior to that of either Xen-based paravirtualized/fully virtualized solutions or VMWare ESX and VMWare Server. Unlike either of those solutions, because KVM uses a full virtualization technique and really exploits the on-chip virtualization features, “paravirtualization tools” such as the ones used on VMWare and Sun xVM VirtualBox aren’t required to exact full performance out of the VM.
proxmox9a.jpgActual consoling into the VMs occurs using an embedded Java applet from within the Web UI which launches a VNC console window on the client machine. You can also choose to directly VNC into the VM using a different client if you so choose, but we found the built-in Java console to be pretty snappy, both on Internet Explorer 7 and on Firefox 3, on Windows and Linux clients.
ProxMox is still very much beta code, and it has its share of glitches and quirks. But I find it to be a much more usable environment in terms of raw performance and flexibility when compared with VMWare’s ESX or Server 2.0, or any of the Xen-based products. And given the fact the product is free, you can’t beat the price.
Have you had any experiences with ProxMox? Talk back and let me know. 

Credit : http://zd.net/mY3dJ2

วันพุธที่ 27 กรกฎาคม พ.ศ. 2554

List of general commands and usage OpenVZ

Its easy use OpenVZ to create a new container of VPS. Bellow we listing all of OpenVZ general commands and usage. You must have OpenVZ installed on your server host node.

Creating a new VPS

// Create new VPS 101 with the template centos-5.2-default
vzctl create 101 –ostemplate centos-5.2-default
// Add IP a.b.c.d to the VPS 101
vzctl set 101 –ipadd a.b.c.d –save
// Remove IP a.b.c.d from VPS 101
vzctl set 101 –ipdel a.b.c.d –save
// Add the nemaserver a.b.c.d to VPS 101
vzctl set 101 –nameserver a.b.c.d –save
// Set password 123456 for the 101 VPS
vzctl set 101 –userpasswd root:123456
// Set the VPS to start on server reboot
vzctl set 101 –onboot yes –save
// Allocate diskspace to the VPS 101 10G:11G means Softquota:Hardquota
vzctl set 101 –diskspace 10G:11G –save
// Add IP a.b.c.d to the VPS 101 and set the nameservers a.b.c.d to VPS 101
vzctl set 101 –ipadd a.b.c.d –nameserver a.b.c.d –save

Controling a VPS

// Start the VPS 101
vzctl start 101
// Stop 101 VPS
vzctl stop 101
// Restart 101 VPS
vzctl restart 101
// Enter into 101 VPS
vzctl enter 101
// Display the list of active VPS.s
vzlist
// Display the list of all VPS.s
vzlist -a
// Destroy the VPS (good idea to stop it first)
vzctl destroy 101
// Show resources usage on VPS
vzcalc -v 101
// Execute commands against the VPS (in this case .df -m.)
vzctl exec 101 df -m
// Run yum update on VPS
vzyum 101 -y update
// Install package using yum on VPS
vzyum 101 -y install package
// Install package using rpm on VPS
vzrpm 101 -ivh package

Other details good to know

The templates are located under /vz/template/cache
When creating a new VPS you have to use the full template name eg. if the archived template name is “centos-4-i386-default-4.7-20082227.tar.gz” the template name you will have to use is “centos-4-i386-default-4.7-20082227″
The configuration files for every VPS is located under /etc/vz/conf/VPSID.conf
This file can be modified to suit your needs for every VPS but a VPS restart will be needed. Based on /etc/vz/conf/VPSID.conf basic config files for VPS can be created and saved somewhere on the server and can be used when creating new VPS’s to automatic allocate this settings on new VPS’s.
To create a VPS using a saved config file use this command:
vzctl create 101 –ostemplate centos-5-i386-default –config vps.basic
If you need more templates you can download them from: http://wiki.openvz.org/Download/template/precreated
More details about OpenVZ can be found at: http://wiki.openvz.org !

OpenVZ Web Panel

ได้ของเล่นไหม่อีกแล้วครับ OpenVZ Web Panel ถามว่ามันคืออะไร มันคือ Web Control Panel ที่ใช้ควบคุม OpenVZ นั่นเอง จะได้ไม่ต้องไปยุ่งยากในการ Command line ในการจัดการ
ใช้ตัวนี้แล้วช่วยได้ขึ้นเยอะเลยครับ ตัวอย่างหน้าตาก็แบบนี้



วิธีการติดตั้งบน CentOS 5.X
# yum install gcc make ruby ruby-devel sqlite sqlite-devel ruby-rdoc
# wget http://github.com/albertsj1/Misc-Scripts/raw/master/install_gems.sh
# chmod +x ./install_gems.sh
# ./install_gems.sh
# gem install sqlite3-ruby –version ‘= 1.2.4′
# wget -O – http://ovz-web-panel.googlecode.com/svn/installer/ai.sh | sudo sh
พอติดตั้งเสร็จก็เข้าใช้งานผ่านทาง Browser ครับที่ URL นี้
http://{IP Address}:3000
Username และ Password คือ admin ครับ

OpenVZ Virtualization vs Xen Paravirtualization (VPS)

OpenVZ เป็นระบบปฏิบัติการแพลตฟอร์ม virtualization ระดับ kernel Linux เป็นเทคโนโลยีเสมือน (OS Virtualization) แพลตฟอร์มลินุกซ์เชิงพาณิชย์ (Virtuozzo) ซึ่งเป็นผลิตภัณฑ์ของบริษัทผู้ผลิต SWsoft หากติดตั้งบน Linux ก็จะได้ทุก Distribution ของ Linux

Xen เป็นแพลตฟอร์ม paravirtualization ซึ่งคล้ายกับการจำลองฮาร์ดแวร์. Paravirtualization ทำงานโดยการสร้างส่วนติดต่อระหว่างระบบปฏิบัติการสิ่งแวดล้อมเสมือนจริงและ ฮาร์ดแวร์ที่ queues และตอบสนองการร้องขอระบบปฏิบัติการจากระบบปฏิบัติการแก้ไขเพื่อโต้ตอบกับ interface paravirtualization.


ข้อแตกต่าง

OpenVZ
- การใช้ทรัพยากรน้อยลง
- หน่วยความจำจำกัด (พื้นที่ไม่สามารถสลับไ้ด้)
- จำกัดการแก้ไข netfilter (iptables)
- TOP 7 เป็นระบบปฏิบัติการที่เป็นที่นิยม (Hosting) สนับสนุน cPanel WHM / DirectAdmin และ HostInABox


Xen
- ใช้ทรัพยากรมาก
- จำกัดพื้นที่หน่วยความจำ
- เข้าถึงการจัดการเรื่องไฟล์เวอร์ (Full iptables)
- TOP 5 เป็นระบบปฏิบัติการที่เป็นที่นิยม (Hosting) สนับสนุน WHM / cPanel และ DirectAdmin

คำแนะนำ

แนะนำ OpenVZ VPS สำหรับความเร็วและความมั่นคง (Web Hosting)

แนะ นำ Xen VPS สำหรับความยืดหยุ่น เมื่อสถานการณ์ที่ต้องใช้หน่วยความจำมากๆ เกิดขึ้น จึงเหมาะสำหรับโฮสต์ที่ใช้ในการพัฒนา Java (ERP) เป็นต้น Xen VPS จึงเหมาะกับ Tomcat, JBoss, GlassFish, Geronimo.



***OpenVZ ใช้ทรัพยากรน้อยกว่า Xen

Ref.
http://vpslink.com/openvz-vps/
http://vpslink.com/xen-vps/
http://vpslink.com/compare/openvz-vs-xen-vps-hosting/