Today I downloaded a pre-built template from OpenVZ.org based upon CentOS. After downloading the archive, I verified the signature, then created a container.
hamilton:/var/lib/vz/template/cache# gpg --verify centos-5-x86.tar.gz.asc gpg: Signature made Fri 12 Nov 2010 06:54:37 AM EST using DSA key ID A7A1D4B6 gpg: Can't check signature: public key not found hamilton:/var/lib/vz/template/cache# gpg --search A7A1D4B6 gpg: keyring `/root/.gnupg/secring.gpg' created gpg: searching for "A7A1D4B6" from hkp server keys.gnupg.net (1) OpenVZ Project <email@example.com> 1024 bit DSA key A7A1D4B6, created: 2005-09-14 Keys 1-1 of 1 for "A7A1D4B6". Enter number(s), N)ext, or Q)uit > 1 gpg: requesting key A7A1D4B6 from hkp server keys.gnupg.net gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key A7A1D4B6: public key "OpenVZ Project <firstname.lastname@example.org>" imported gpg: Total number processed: 1 gpg: imported: 1 hamilton:/var/lib/vz/template/cache# gpg --verify centos-5-x86.tar.gz.asc gpg: Signature made Fri 12 Nov 2010 06:54:37 AM EST using DSA key ID A7A1D4B6 gpg: Good signature from "OpenVZ Project <email@example.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: DEAB A031 F0A1 8848 9D71 01D2 92A6 0DA6 A7A1 D4B6
Yes, gpg is a bit alarmist!
I set the hostname, ip address, and nameservers via vzctl:
vzctl set 1234 --hostname centos-dev --save vzctl set 1234 --nameserver 192.168.1.1 --save vzctl set 1234 --ipadd 192.168.1.177 --save
Then I started it up, waited a few moments, then entered it:
vzctl start 1234 vzctl enter 1234
Nothing too fancy about all that, eh? What really impressed me is the meager memory usage: only about 24MB, including an active Apache2 process. Sweet! And that was the x86_64 version. I bet the plain x86 version is even more lightweight - I’m trying that version out now!
Still, yum has got nothing on apt! :-)