<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Admon Home &#187; Virtualization</title>
	<atom:link href="http://www.admon.org/virtualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.admon.org</link>
	<description>Linux System Administration</description>
	<lastBuildDate>Sat, 11 Feb 2012 03:23:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Check Virtualization type for a running Linux</title>
		<link>http://www.admon.org/check-virtualization-type-for-running-linux/</link>
		<comments>http://www.admon.org/check-virtualization-type-for-running-linux/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 14:53:55 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[uml]]></category>
		<category><![CDATA[vserver]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.admon.org/?p=1007</guid>
		<description><![CDATA[Are you running VPS as a hosting solution? And do you want to know what kind of virtualization is it running on? Is it OpenVZ, V-server, Xen or UML, and how can I confirm this? Since the hosting providers normally do not tell you these kind of detailed info, here we created a simple script: [...]]]></description>
			<content:encoded><![CDATA[<p>Are you running VPS as a hosting solution? And do you want to know what kind of virtualization is it running on? Is it <a href="http://wiki.openvz.org/Main_Page" title="OpenVZ" target="_blank">OpenVZ</a>, <a href="http://linux-vserver.org/" title="V-server" target="_blank">V-server</a>, <a href="http://xen.org/" title="Xen" target="_blank">Xen</a> or <a href="http://user-mode-linux.sourceforge.net/" title="UML" target="_blank">UML</a>, and how can I confirm this?<span id="more-1007"></span><br />
Since the hosting providers normally do not tell you these kind of detailed info, here we created a simple script:</p>
<pre>
#!/usr/bin/python
#
# Check what kind of virtual machine for a running Linux. It supports (openvz/vserver/xen/uml).
# Please copy &#038; save this script and run it as root.
#
# By Joseph Chen <http://www.admon.org/> 2011-12-10

import sys, os
import re

def main():
    if os.getuid() != 0:
        print "It must be run as root"
        sys.exit(0)

    # Check OpenVZ/Virtuozzo
    if os.path.exists("/proc/vz"):
        if not os.path.exists("/proc/bc"):
            print "openvz container"
        else:
            print "openvz node"

    # Check V-server
    if os.path.exists("/proc/self/status"):
	s = open("/proc/self/status", "r")
	txt = s.read()
	s.close()

        reobj = re.compile(r"^(s_context|VxID):[[:blank:]]*[0-9]/")
        if reobj.match (txt):
            if os.path.exists("/proc/virtual"):
                print "vserver_host"
            else:
                print "vserver"

    # Check Xen
    if os.path.exists("/proc/xen/capabilities"):

	f = open("/proc/xen/capabilities", "r")
	text = f.read()
	f.close()

        if (len(text) > 0):
            print "xen dom0"
        else:
            print "xen domU"

    # Check User Mode Linux (UML)
    f = open("/proc/cpuinfo", "r"); t = f.read(); f.close()
    if (t.find("UML") > 0):
        print "uml"

if __name__=="__main__":
    main()
</pre>
<p>Here is a running example on a Xen dom0 node:</p>
<pre>
root@pekdev230:~ # python check-vm.py
xen dom0
</pre>
<p>Note that, the check for vserver may not work since I didn&#8217;t get an environment for testing. Sorry about that, but if you any updates, please kindly let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/check-virtualization-type-for-running-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>S3cmd: Amazon S3 command-line interface</title>
		<link>http://www.admon.org/s3cmd-amazon-s3-command-line-interface/</link>
		<comments>http://www.admon.org/s3cmd-amazon-s3-command-line-interface/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 06:36:20 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[s3cmd]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=854</guid>
		<description><![CDATA[S3cmd is command line tool for uploading, downloading and managing data in Amazon S3. It&#8217;s written in Python, and ideal for scripts, automated backups triggered from cron, etc. S3cmd is an open source project and is free for both commercial and private use. You will only have to pay Amazon for using their storage. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/11/amazon_chart.gif"><img class="alignleft size-thumbnail wp-image-797" title="Amazon" src="http://planet.admon.org/wp-content/uploads/2010/11/amazon_chart-150x150.gif" alt="Amazon web services" width="150" height="150" /></a>S3cmd is command line tool for uploading, downloading and managing data in Amazon S3. It&#8217;s written in Python, and ideal for scripts, automated backups triggered from cron, etc. <a href="http://s3tools.org/s3cmd">S3cmd</a> is an open source project and is free for both commercial and private use. <span id="more-854"></span>You will only have to pay Amazon for using their storage.  The installation is quite simple. If you&#8217;re running debian, you just can install it simply via <em>apt-get</em>.  Before to use s3cmd, we need to config it. This can be done via this command,</p>
<pre>~/demo$ s3cmd --configure</pre>
<p>It asks for two keys &#8211; access key and secret key, and you can optionally enter a GPG encryption key that will be used for encrypting your files before sending them to Amazon. When the configuration finishes, you can run with <em>&#8211;help</em> to get a list of general operations.</p>
<p>For advanced tutorials, here&#8217;s a quick list.</p>
<pre>~/demo$ s3cmd put --acl-public --guess-mime-type storage.jpg s3://admon-test/storage.jpg
File 'storage.jpg' stored as s3://admon-test/storage.jpg (33045 bytes)</pre>
<p>The file is uploaded to Amazon S3 bucket can either be private, that is readable only by you, possessor of the access and secret keys, or public, readable by anyone. Each file uploaded as public is not only accessible using s3cmd but also has a HTTP address, URL, that can be used just like any other URL and accessed for instance by web browsers.</p>
<p>To upload a directory and keep its name on the remote side specify the source without the trailing slash:</p>
<pre>~/demo$ s3cmd put -r dir1 s3://admon-demo/some/path/
dir1/file1-1.txt -&gt; s3://admon-demo/some/path/dir1/file1-1.txt  [1 of 2]
dir1/file1-2.txt -&gt; s3://admon-demo/some/path/dir1/file1-2.txt  [2 of 2]</pre>
<p>On the other hand to upload just the contents, specify the directory it with a trailing slash:</p>
<pre>~/demo$ s3cmd put -r dir1/ s3://admon-demo/some/path/
dir1/file1-1.txt -&gt; s3://admon-demo/some/path/file1-1.txt  [1 of 2]
dir1/file1-2.txt -&gt; s3://s3tools-demo/some/path/file1-2.txt  [2 of 2]</pre>
<p>sync two directory. It works like what rsync do, generating a list of file names, checksums from both local and remote side, then making a decision which of them will be processed.</p>
<pre>~/demo$ s3cmd sync  ./  s3://admon-demo/some/path/
dir2/file2-1.log -&gt; s3://admon-demo/some/path/dir2/file2-1.log  [1 of 2]
dir2/file2-2.txt -&gt; s3://admon-demo/some/path/dir2/file2-2.txt  [2 of 2]
...</pre>
<p>Here&#8217;s a more advanced example,</p>
<pre>s3cmd sync --dry-run --exclude '*.txt' --include 'directory/*' . s3://admon-demo/demo/</pre>
<p><strong>How can I use s3cmd to setup ACLs for my S3 files?<br />
</strong></p>
<p>S3cmd partially <em>(as in version 0.9.9.91)</em> implements the <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?UsingAuthAccess.html">access control feature from S3</a>, you can only enable/disable whether an object is accessible by public. S3tools have plans to implement more features.</p>
<pre>~/demo$ s3cmd setacl --acl-public --recursive s3://admon-test/backup
	s3://admon-test/backup/file1.txt: ACL set to Public  [1 of 3]
	s3://admon-test/backup/dir2/file2.jpg: ACL set to Public  [2 of 3]
        ...</pre>
<p>If you need to set read/write based permission control for different types of Amazon S3 accounts, it&#8217;s suggested to use the graphic tools like <a href="http://www.s3fox.net/Features.aspx">s3Fox</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/s3cmd-amazon-s3-command-line-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Overview of Amazon AWS pricing</title>
		<link>http://www.admon.org/overview-of-amazon-aws-pricing/</link>
		<comments>http://www.admon.org/overview-of-amazon-aws-pricing/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 09:58:16 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=843</guid>
		<description><![CDATA[When using Amazon, your payment covers only what you use &#8212; that&#8217;s system resources and network resources based. There is no minimum fee. Also you can estimate your monthly bill using AWS Simple Monthly Calculator. On-Demand Instances The prices for On-Demand Instances are based on the Region in which your instance is running. A more detailed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-797" title="Amazon" src="http://planet.admon.org/wp-content/uploads/2010/11/amazon_chart-150x150.gif" alt="Amazon web services" width="150" height="150" />When using Amazon, your payment covers only what you use &#8212; that&#8217;s system resources and network resources based. There is no minimum fee. Also you can estimate your   monthly bill using <a href="http://aws.amazon.com/calculator">AWS   Simple Monthly Calculator</a>.<span id="more-843"></span></p>
<p><strong>On-Demand Instances</strong></p>
<p>The prices for On-Demand Instances are based on the Region in which your instance is running. A more detailed comparison can be found <a title="Amazon EC2 Pricing" href="http://aws.amazon.com/ec2/pricing/" target="_blank">here</a>. Here we just the configurations of these instances.</p>
<ul>
<li> <strong>Micro Instance</strong> 613 MB of memory, up to 2 ECUs (for short periodic bursts), EBS storage only, 32-bit or 64-bit platform</li>
<li> <strong>Small Instance (Default) </strong>1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of local instance storage, 32-bit platform</li>
<li> <strong>Large Instance</strong> 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of local instance storage, 64-bit platform</li>
<li> <strong>Extra Large Instance</strong> 15 GB of memory, 8 EC2 Compute Units (4 virtual cores with 2 EC2 Compute Units each), 1690 GB of local instance storage, 64-bit platform</li>
<li> <strong>High-Memory Extra Large Instance</strong> 17.1 GB memory, 6.5 ECU (2 virtual cores with 3.25 EC2 Compute Units each), 420 GB of local instance storage, 64-bit platform</li>
<li> <strong>High-Memory Double Extra Large Instance</strong> 34.2 GB of memory, 13 EC2 Compute Units (4 virtual cores with 3.25 EC2 Compute Units each), 850 GB of local instance storage, 64-bit platform</li>
<li> <strong>High-CPU Medium Instance</strong> 1.7 GB of memory, 5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each), 350 GB of local instance storage, 32-bit platform</li>
<li> <strong>High-CPU Extra Large Instance</strong> 7 GB of memory, 20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each), 1690 GB of local instance storage, 64-bit platform</li>
</ul>
<p>If you are planing to run a instance for quite a long time like 1 year or 3 years,  you can use the Reserved instance instead, and there&#8217;re some discount. Basically a 1-year Reserved instance is 35.3% cheaper than On-Demand instances, and a 3-year Reserved instance is 50.0% (exactly) cheaper than On-Demand instances.</p>
<p><strong>Amazon Storage Fees</strong></p>
<p>Amazon EBS Volumes</p>
<ul>
<li> $0.10 per GB-month of provisioned storage</li>
<li> $0.10 per 1 million I/O requests</li>
</ul>
<p>Amazon EBS Snapshots to Amazon S3</p>
<ul>
<li>$0.15 per GB-month of data stored</li>
<li> $0.01 per 1,000 PUT requests (when saving a snapshot)</li>
<li> $0.01 per 10,000 GET requests (when loading a snapshot)</li>
</ul>
<p><strong>Amazon Networking Transfer Fees</strong></p>
<ul>
<li> Data Transfer In(US &amp; EU Regions) $0.100 per GB</li>
<li> Data Transfer Out.  Different between regins, only the first 1GB is free of charge, <a title="Amazon Pricing" href="http://aws.amazon.com/ec2/pricing/" target="_blank">click for details</a>.</li>
<li> There is no Data Transfer charge between Amazon EC2 and other Amazon Web Services within the same region (i.e. between Amazon EC2 US West and Amazon S3 in US West).</li>
<li>All data transferred between instances in the same Availability Zone using private IP addresses &#8211; $0.00 per GB.</li>
<li>All data transferred between instances in different Availability Zones in the same region &#8211; $0.01 per GB in/out.</li>
<li> Non-attached Elastic IP address &#8211; $0.01 per complete hour. No cost for in-use ones.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/overview-of-amazon-aws-pricing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell script to monitor OpenVZ container running status</title>
		<link>http://www.admon.org/shell-script-to-monitor-openvz-container-running-status/</link>
		<comments>http://www.admon.org/shell-script-to-monitor-openvz-container-running-status/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 05:50:39 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[user_beancounters]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=784</guid>
		<description><![CDATA[If you&#8217;re using OpenVZ, you owe it to yourself to take a look at /proc/user_beancounters every now and again (the last column of this file makes a lot of sense, as it indicates protential problems), but when errors occurred in a container, mostly you lose your chance to run any command in that VE. In [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png"><img class="alignleft size-full wp-image-743" title="openvz" src="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png" alt="" width="135" height="135" /></a>If you&#8217;re using <a href="http://wiki.openvz.org/Main_Page" target="_blank">OpenVZ</a>, you owe it to yourself to take a look at <a title="details for /proc/user_beancounters" href="http://wiki.openvz.org/Proc/user_beancounters" target="_blank">/proc/user_beancounters</a> every now and again (the last column of this file makes a lot of sense, as it indicates protential problems), but when errors occurred in a container, mostly you lose your chance to run any command in that VE.<span id="more-784"></span></p>
<p>In an attempt to implement a script to monitor this kind of issues for OpenVZ <a href="http://en.wikipedia.org/wiki/Virtual_private_server">VPS</a>, I created this shell script. It runs on the parent side, and checks each container&#8217;s status file <strong>/proc/user_beancounters</strong>. If the sum of the <a title="openvz failcnt" href="http://wiki.openvz.org/UBC_failcnt_reset" target="_blank">failcnt</a> increased, it will print non-zero value which can be used to trigger an alert. Additionally, this script creates a summarized running status log for each container.</p>
<pre>#!/bin/bash
# By joseph chen , Sep 28 2010
# This script is used to monitor virtual server's /proc/user_beancounters on
# the physic node.
# It creats a log file, and sums of the last column for each virtual server's
# /proc/user_beancounters, then compare this value with the last one.
# If the value increased, it prints a non-zero value, and further diagnostic is suggested.

BCounter="/proc/user_beancounters"
VZCTL="/usr/sbin/vzctl"

[ ! -d "/working/path" ] &amp;&amp; mkdir /working/path
cd /working/path || exit

ovzlist=$(sudo /usr/sbin/vzlist -a |awk '/running/{print $1}')
for vz in $ovzlist
do
	## Create a track record for the running status
	echo ============= Time Now is: `date` ============== &gt;&gt; ${vz}.status
	sudo $VZCTL exec $vz cat $BCounter |awk '!/failcnt/{if(NF&gt;4)if($NF&gt;0) print}' 2&gt;/dev/null &gt;&gt; ${vz}.status

	## Compare the last two values which stored in hidden files.
	sudo $VZCTL exec $vz cat $BCounter |awk 'BEGIN{sum=0}!/failcnt/{if(NF&gt;4)if($NF&gt;0) sum+=$NF}END{print sum}' &gt;.${vz}.now

	# Initial the last value if not exist
	[ ! -f ".${vz}.last" ] &amp;&amp; echo 0 &gt; .${vz}.last

	# Overwrite the last value after comparison
	[ "$(cat .${vz}.last)" -ne "$(cat .${vz}.now)" ] &amp;&amp; {
		cat .${vz}.now &gt; .${vz}.last
		echo $vz &amp;&amp; exit
	}
done</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/shell-script-to-monitor-openvz-container-running-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using VETH instead of VENET in OpenVZ</title>
		<link>http://www.admon.org/using-veth-instead-of-venet-in-openvz/</link>
		<comments>http://www.admon.org/using-veth-instead-of-venet-in-openvz/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 13:42:52 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[venet]]></category>
		<category><![CDATA[veth]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=586</guid>
		<description><![CDATA[By default OpenVZ is using VENET as network device. It does packet switching based on IP header, which makes it look like a point-to-point connection between VPS and the physical host. An alternative device is Virtual Ethernet device (a.k.a. VETH). Veth is an Ethernet-like device, unlike venet network device, veth device has a MAC address, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png"><img class="size-full wp-image-743 alignleft" title="openvz" src="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png" alt="" width="135" height="135" /></a>By default <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> is using VENET as network device. It does packet switching based on IP header, which makes it look like a point-to-point connection between VPS and the physical host. An alternative device is <a href="http://wiki.openvz.org/Virtual_Ethernet_device">Virtual Ethernet device</a> (a.k.a. VETH).<br />
<span id="more-586"></span><br />
Veth is an Ethernet-like device, unlike <a href="http://wiki.openvz.org/Venet">venet</a> network device, veth device has a MAC address, therefore it can be used in configurations. When veth is bridged to ethX or other device, the administrator is able to sets up his networking himself, including IPs, gateways etc.</p>
<p>VENet consists of two Ethernet devices &#8212; the one in physical server and another one in virtualized guest. These devices are connected to each other, so if a packet goes into one device it will come out from the other device.</p>
<p>In this post, we&#8217;ll share some tips on how to enable venet. The content is mainly from OpenVZ&#8217;s <a href="http://wiki.openvz.org/Virtual_Ethernet_device#Adding_veth_to_a_CT">official guide</a>.</p>
<p>The commands that we used are listed below with explanations.</p>
<p>Firstly, assuming that we&#8217;re in the physical server, We need to add a new device named eth0</p>
<pre>vzctl set 150 --netif_add eth0,00:12:34:56:78:9A,veth101.0,00:12:34:56:78:9B --save</pre>
<p>The second MAC address is from the mother side, and the first MAC address is self-generated. Click here if you&#8217;re not sure <a href="http://planet.admon.org/howto/generate-mac-address-by-scripts/">how to generate a MAC address</a>.</p>
<p>Then enable forwarding and ARP proxy, and apply some changes in route table:</p>
<pre># cat veth150.sh
ifconfig veth150.0 0
echo 1 &gt; /proc/sys/net/ipv4/conf/veth150.0/forwarding
echo 1 &gt; /proc/sys/net/ipv4/conf/veth150.0/proxy_arp
echo 1 &gt; /proc/sys/net/ipv4/conf/eth0/forwarding
echo 1 &gt; /proc/sys/net/ipv4/conf/eth0/proxy_arp
ip route add 192.168.201.150 dev veth150.0</pre>
<p>Warning: Before making these changes to your system, you&#8217;re suggested to verify what exactly you&#8217;re doing. For example, proxy_arp is problematic in a mixed network.</p>
<p>Secondly, in the VPS we need to config the new device eth0 like this:</p>
<pre>/sbin/ifconfig venet0:0 0
/sbin/ifconfig eth0 0
/sbin/ip addr add 192.168.201.150 dev eth0
/sbin/ip route add default dev eth0</pre>
<p>The IP address <em>192.168.201.150</em> can be in a different network from the physical side, you just need to make sure they are in the same VLAN.</p>
<p>When it&#8217;s tested OK, don&#8217;t forget to modify your network configuration files in <em>/etc/sysconfig/network-scripts/</em> for a permanent change.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/using-veth-instead-of-venet-in-openvz/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rename a Vserver step by step</title>
		<link>http://www.admon.org/rename-a-vserver-step-by-step/</link>
		<comments>http://www.admon.org/rename-a-vserver-step-by-step/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 03:39:09 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[vserver]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=522</guid>
		<description><![CDATA[Suppose you made a mistake on the Vserver name when creating it. After finished the installation, you might want to rename your Vserver. This can be accomplished by renaming the config directory and the root for the vserver in question, then modifying some symlinks to match. The general steps are: Stop the vserver in question [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you made a mistake on the <a href="http://www.linux-vserver.org/Welcome_to_Linux-VServer.org">Vserver</a> name when creating it. After finished the installation, you might want to <strong>rename your Vserver</strong>. This can be accomplished by renaming the config directory and the root for the vserver in question, then modifying some symlinks to match. <span id="more-522"></span></p>
<p>The general steps are:</p>
<ul>
<li> Stop the vserver in question</li>
<p>It can be done by this command: &#8220;<em>vserver  &lt;server name&gt; </em><em>stop</em>&#8221;</p>
<li>Rename the <em>/vservers/&lt;server name&gt;</em> directory</li>
<p>By default it&#8217;s in /vservers, and on some self-crafted versions, it might be re-defined to other path like /var/lib/vservers. Simply you just need to use mv command to rename the issued vserver.</p>
<li>Rename the <em>/etc/vservers/&lt;server name&gt;</em> directory</li>
<p><a href="http://www.nongnu.org/util-vserver/doc/conf/configuration.html">The directory /etc/vservers</a> is much like a system wide configuration directory for vservers, you can use mv to rename specified directory as well.</p>
<li>Update some softlink in <em>/etc/vservers/&lt;server name&gt;</em></li>
<p>update link: /etc/vservers/&lt;server name&gt;/run -&gt; /var/run/vservers/&lt;server name&gt;<br />
update link: /etc/vservers/&lt;server name&gt;/vdir -&gt; /etc/vservers/.defaults/vdirbase/&lt;server name&gt;<br />
update link: /etc/vservers/&lt;server name&gt;/cache -&gt; /etc/vservers/.defaults/cachebase/&lt;server name&gt;<br />
Pay some attention to relative path issue, otherwise these links might get broken, there&#8217;s an example, the current working directory is <em>/etc/vservers/mars</em>:</p>
<pre>joseph@galaxy:/etc/vservers/mars$ ln -s -f /etc/vservers/.defaults/vdirbase/mars vdir</pre>
<li>Update link: /var/run/vservers.rev/&lt;server XID&gt; -&gt; /etc/vservers/&lt;server name&gt;</li>
<p>Please note that this just an update by fixing the dead link, and there&#8217;s no need to create a new XID.</p>
<li>Reset hostname for vserver in question</li>
<p>Basically you just need to modify <em>/etc/vservers/&lt;server name&gt;/uts/nodename</em> before starting the issued vserver, and get other host name related settings modified when system booted.</p>
<pre>joseph@galaxy:/etc/vservers$ grep mars -R mars/ 2&gt;/dev/null -l
mars/uts/nodename
mars/vdir/etc/hosts
mars/vdir/etc/pam_ldap.conf
mars/vdir/etc/mailname
mars/vdir/etc/hostname</pre>
</ul>
<p>Now, It should start properly. If any issue encountered, please don&#8217;t hesitate to <a href="http://forum.admon.org/virtualization/" target="_blank">raise a forum thread</a> at our community forum.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/rename-a-vserver-step-by-step/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoid IP conflicts in Xen DomU</title>
		<link>http://www.admon.org/avoid-ip-conflicts-in-xen-domu/</link>
		<comments>http://www.admon.org/avoid-ip-conflicts-in-xen-domu/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 09:23:32 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[IP conflicts]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=425</guid>
		<description><![CDATA[Recently I’m playing with Xen virtualization, and I came across one protential problem. As I need to share my guest machines to clients,  I must give them root privileges&#8230; that’s whats VPS-es all about&#8230; having root access to OS without having to purchase expensive physical ones.  So having that in mind they are by default [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I’m playing with Xen virtualization, and I came across one protential problem. As I need to share my guest machines to clients,  I must give them root privileges&#8230; that’s whats <a href="http://en.wikipedia.org/wiki/Virtual_private_server">VPS</a>-es all about&#8230; having root access to OS without having to purchase expensive physical ones.  So having that in mind they are by default untrusted and unpredictable. Probably only god knows what they will do on their VMs!<span id="more-425"></span></p>
<p>So what&#8217;s the exact problem here?</p>
<p>By default xen, and all those tools, like <a href="http://www.cpanel.net/">Cpanel / WHM</a> and  <a href="http://www.webmin.com/">Webmin</a>, don’t really have a way of sorting out ip conflicts. So basically you have some scripts that will setup clients ip address during his machine startup, you have vif ip statment in the config file. But what’s really holds clients from entering:</p>
<pre># ifconfig eth0 x.x.x.x</pre>
<p>Where x.x.x.x is the IP of some super important server in same netmask. Luckily for me I came across this problem while still in testing. Xen supports ip declaration in vif statment of dom config file:</p>
<pre>vif = ['ip=x.x.x.x, more parametars here....']</pre>
<p>Also you can declare multiple ip’s by simply putting space between them, like this:</p>
<pre>vif = ['ip=xx.xx.xx.x1 xx.xx.xx.x2, more parametars here....']</pre>
<p>For the purpose of ip conflict prevention make sure you declare unique MAC address in vif section too.</p>
<p>Next step is to install <a href="http://ebtables.sourceforge.net/">ebtables</a> on your Dom0 box. After that, all we need to do is to apply the following patch for the script <em>vif-bridge</em> located in <em>/etc/xen/scripts/</em>:</p>
<pre>[root@dom0 scripts]# diff -u vif-bridge-org vif-bridge
--- vif-bridge-org      2009-11-12 16:31:56.000000000 +0800
+++ vif-bridge  2009-11-12 16:40:38.000000000 +0800
@@ -57,15 +57,41 @@
     online)
        setup_bridge_port "$vif"
        add_to_bridge "$bridge" "$vif"
+
+       ebtables -N $vif
+       ebtables -P $vif DROP
+       ebtables -A INPUT -i $vif -j $vif
+       ebtables -A FORWARD -i $vif -j $vif
+       ebtables -A $vif -p ARP --arp-opcode 1 -j ACCEPT
+
+       if [ ! -z "$ip" ]
+       then
+       for oneip in $ip
+       do
+               ebtables -A $vif -p IPv4 --ip-src $oneip -j ACCEPT
+               ebtables -A $vif -p IPv4 --ip-dst $oneip -j ACCEPT
+               ebtables -A $vif -p ARP --arp-opcode 2 --arp-ip-src $oneip -j ACCEPT
+       done
+
+       ebtables -A $vif --log-prefix="arp-drop" --log-arp -j DROP
+
+       fi
+
         ;;

     offline)
         do_without_error brctl delif "$bridge" "$vif"
         do_without_error ifconfig "$vif" down
+
+       do_without_error ebtables -D INPUT -i $vif -j $vif
+       do_without_error ebtables -D FORWARD -i $vif -j $vif
+       do_without_error ebtables -F $vif
+       do_without_error ebtables -X $vif
+
         ;;
 esac

-handle_iptable
+#handle_iptable

 log debug "Successful vif-bridge $command for $vif, bridge $bridge."
 if [ "$command" == "online" ]</pre>
<p>It&#8217;s tested OK in my latest CentOS-5.4 box.</p>
<p>Presuming you use bridging scripts this effectively binds ip address-es from “vif = ['ip=x.x.x.x']” list to mac addresses from vif list. Binding is done while enabling vps machine and undone when powering it off.</p>
<p>So this way untrusted user is limited only to the ip addresses defined in xen guest conf file, trying to change existing ip address into another one on same network will only cause that machine unresponsive.</p>
<p><em>Warning:</em> This post is original created by <a href="http://toic.org/2008/09/22/preventing-ip-conflicts-in-xen/">Branko at his blog site</a>.  I copied his content, and updated some settings so that it can work in CentOS-5.4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/avoid-ip-conflicts-in-xen-domu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install Windows XP in Xen CentOS</title>
		<link>http://www.admon.org/install-windows-xp-in-xen-centos/</link>
		<comments>http://www.admon.org/install-windows-xp-in-xen-centos/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 09:46:54 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[VNC]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=343</guid>
		<description><![CDATA[In a former post, we know how to use OpenVZ to create virtual system in CentOS, this article will show you how to install Windows under Xen on CentOS 5.3. We fixed one of the problems of Windows XP under Xen. Windows XP&#8217;s inability to shut itself down completely. Windows ends up on the &#8216;it [...]]]></description>
			<content:encoded><![CDATA[<p>In a former post, we know how to <a href="http://planet.admon.org/howto/openvz-on-centos-5-3-installation-and-config/">use OpenVZ to create virtual system in CentOS</a>, this article will show you how to install Windows under Xen on CentOS 5.3.</p>
<p><em>We fixed one of the problems of Windows XP under Xen. Windows XP&#8217;s inability to shut itself down completely. Windows ends up on the &#8216;it is safe to turn off your computer&#8217; screen, but the virtual machine is not destroyed. See <a href="http://wiki.xensource.com/xenwiki/XenWindowsACPI">XenWindowsACPI</a> for a summary.<span id="more-343"></span></em></p>
<p><strong>Preparation Windows image</strong></p>
<p>To create windows installation image is optional, and just describes a way that I&#8217;ve set things up that makes it easier to commission more than one VM. You can also use <em>/dev/cdrom</em> instead with the help of virt-manager.</p>
<p>Create a folder for the ISO image. the folder could be named like this <em>/tmp/windows</em>, we&#8217;ll use this directory to store a windows dump image from CDROM.</p>
<p>Put your windows installation disc in the CDROM drive.When it&#8217;s mounted, issue a command as follows:<br />
dd if=/dev/cdrom of=/tmp/windows/windows-xp.iso</p>
<p>If the CDROM cannot mounted automatically, you might need to mount it yourself. It would take a long time to dump a full windows images depending on the disc&#8217;s size.</p>
<p><strong>Create DISK file for Virtual Server</strong></p>
<p>After that, we need to create a disk image file for the virtualized WinXP. Here we store this file in a new sub directory /srv/xen. You might need to create this directory yourself if you are using CentOS. The hard drive of the virtual machine can be created like this:</p>
<pre>nice dd if=/dev/zero of=/srv/xen/winxp.img bs=1024k seek=4096 count=0</pre>
<p>Dont forget that raw disk is also supported by Xen.</p>
<p><strong>Install Windows in Xen Container</strong></p>
<p>Then we can start the installation process with help of <a href="http://virt-manager.et.redhat.com/ ">virt-install</a> command:</p>
<pre>virt-install -n winxp -r 256 -f /srv/xen/winxp.img -b xenbr0 --sdl -v -c /tmp/windows/windows-xp.iso</pre>
<p>This command will create a configuration file <em>/etc/xen/winxp</em>, start the new virtual machine,  and try to connect to it. Here&#8217;s a bit problematic. As you  may wonder how we gain the access to windows graphic desktop during the installation.</p>
<p>Generally there are two ways:<br />
1, Using the physic server&#8217;s graphic instead. When you have grphic access to physic server, you can use virt-manager&#8217;s grphic interface to control the process.<br />
2, You can use VNC client to connect virtual windows XP directly. By default when the installation started, there&#8217;s a VNC server running at localhost. It&#8217;s configurable in <em>/etc/xen/winxp</em>, you can set which socket it should bind to, and what password can be used to connect this running windows.</p>
<p>Some other adjustings to <em>/etc/xen/winxp</em> are highly recommended. We need to make note that when any error happened, the winxp should be shut down soon not hanging or doing some other crappy things that only god knows.</p>
<ul>
<li><em>&#8216;on_crash</em>&#8216; should be changed to &#8216;<em>destroy</em>&#8216;.</li>
<li>Change the line <em>on_reboot = &#8216;restart&#8217;</em> to <em>on_reboot = &#8216;destroy&#8217;</em>. This will ensure that Windows doesn&#8217;t restart during setup without our permission, which will be required for ACPI support in the guest to be set up properly.</li>
<li>Add <em>file:/var/lib/xen/images/winxp-install.iso,hdb:cdrom,r&#8217;</em>, to the list in the line disk = [ ... ]</li>
<li>Add new<em> line boot = &#8216;d&#8217;</em> (preferably after the line disk = [ ... ].).</li>
</ul>
<p>There&#8217;s a sample config file for windows XP in Xen:</p>
<pre>name = "winxp"
uuid = "821cc805-ecc3-cc1a-20de-79d4bc99c134"
maxmem = 256
memory = 256
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
vnclisten = "127.0.0.1"
vncpasswd = "virtual-chen"
keymap = "en-us"
disk = [ "file:/srv/xen/winxp.img,hda,w", "file:/tmp/windows/windows-xp.iso,hdc:cdrom,r" ]
vif = [ "mac=00:13:34:ae:70:3b,bridge=xenbr0" ]
serial = "pty"</pre>
<p>Then re-launch the virtual machine with &#8220;<em>xm create winxp</em>&#8220;,and use VNC to connect the virtual OS, and direct the installation process. When finished, setup tries to reboot, it will instead be shut down. Don&#8217;t panic, this is intentional and was created by the line on_reboot = &#8216;destroy&#8217; that we modified in the config file.</p>
<p><strong>Things to do when installation finished</strong></p>
<p>Now we need to recover the settings that we&#8217;ve made to /etc/xen/winxp:</p>
<ul>
<li>Change the line boot = &#8216;d&#8217; to boot = &#8216;c&#8217;</li>
<li>Change the line on_reboot = &#8216;destroy&#8217; to on_reboot = &#8216;restart&#8217;</li>
</ul>
<p>Continue the setup process by restarting the virtual machine with &#8220;<em>xm create winxp</em>&#8220;. Run through the rest of the normal Windows setup process, for example add the machine to the domain.</p>
<p>Install TightVNC in the guest so that you can access the guest remotely, so that the virtual machine is accessble while we are not logged into the physical machine. Boot the virtual machine with <em>xm create winxp</em>. If successful, the virtual machine will not show a display, but will show up in the results of xm list and you can connect to it with <a href="http://www.realvnc.com/">vncviewer</a>, <a href="http://www.tightvnc.com/">TightVNC</a>, etc.</p>
<p><strong>Trouble shooting</strong></p>
<p>If something goes wrong and you can&#8217;t connect via VNC or rdesktop, you can use virt-manager (aka Applications → System Tools → Virtual Machine Manager) to connect directly to the virtual machine&#8217;s console and see what it&#8217;s doing. Please keep note that using virt-manager depends on graphic destop at the physical server, which always eats lots of system resournces.</p>
<p>For other issues please logon our support forum <a href="http://forum.admon.org/virtualization/">Virtualization</a>, and raise a thread there.  You can also <a href="http://forums.citrix.com/support">ask Citrix for help directly at their forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/install-windows-xp-in-xen-centos/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>OpenVZ On CentOS 5.4 installation and configuration</title>
		<link>http://www.admon.org/openvz-on-centos-5-3-installation-and-config/</link>
		<comments>http://www.admon.org/openvz-on-centos-5-3-installation-and-config/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 11:45:01 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[Virtuozzo]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://planet.admon.org/?p=335</guid>
		<description><![CDATA[This article will describe how to create OpenVZ container in CentOS 5.4. With OpenVZ you can create multiple Virtual Private Servers (VPS) on same hardware machine and running them simultaneously and efficiently. OpenVZ is the open-source branch of Virtuozzo, a commercial virtualization solution widely used by hosting providers. The OpenVZ kernel patch is licensed under [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png"><img class="alignleft size-full wp-image-743" title="openvz" src="http://planet.admon.org/wp-content/uploads/2010/04/openvz.png" alt="" width="135" height="135" /></a>This article will describe how to create <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> container in <a href="http://mirror.centos.org/centos/5/isos/">CentOS 5.4</a>. With OpenVZ you can create multiple <a href="http://en.wikipedia.org/wiki/Virtual_private_server">Virtual Private Servers</a> (VPS) on same hardware machine and running them simultaneously and efficiently.</p>
<p>OpenVZ is the open-source branch of <a href="http://www.parallels.com/en/products/virtuozzo/">Virtuozzo</a>, a commercial virtualization solution widely used by hosting providers. The OpenVZ kernel patch is licensed under <a href="http://www.gnu.org/licenses/gpl.html">GPL license</a>, and the user-level tools are under the QPL license.<br />
<span id="more-335"></span><br />
As there are many ways of achieving this goal, I&#8217;d keep this howto as smart as possible. In the following days, I&#8217;d create similar posts on Xen / <a href="http://linux-vserver.org/">Vserver</a>, please keep a close eye on <a href="http://planet.admon.org/">my planet</a>.</p>
<p><strong>1, Install OpenVZ</strong></p>
<p>In order to install OpenVZ, we need to add the OpenVZ repository to yum,  this would also help us keep the kernel up-to-date:</p>
<pre>cd /etc/yum.repos.d
wget http://download.openvz.org/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ</pre>
<p>The repository contains a few different OpenVZ kernels (you can find more details here: http://wiki.openvz.org/Kernel_flavors), or with this command &#8220;<em>yum search ovzkernel</em>&#8220;.</p>
<p>Pick one of them and install it as follows:</p>
<pre>yum install ovzkernel</pre>
<p>This should automatically update the GRUB bootloader as well. An example is listed below&#8221;</p>
<pre>cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.2.1.el5.028stab064.7)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-128.2.1.el5.028stab064.7 ro root=LABEL=/
	initrd /initrd-2.6.18-128.2.1.el5.028stab064.7.img</pre>
<p><strong>2, Pre-adjustings before the installation</strong></p>
<p>Now we install some OpenVZ user tools:</p>
<p><em>yum install vzctl vzquota</em></p>
<p>Open /etc/sysctl.conf and make sure that you have the following settings in it:</p>
<pre>cat /etc/sysctl.conf

net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1</pre>
<p>The following step is important if the IP addresses of your virtual machines are from a different subnet than the host system&#8217;s IP address. If you don&#8217;t do this, networking will not work in the virtual machines!</p>
<p>Open <em>/etc/vz/vz.conf</em> and set <em>NEIGHBOUR_DEVS</em> to all,  the modified entry is like this &#8220;<em>NEIGHBOUR_DEVS=all</em>&#8220;. SELinux needs to be disabled, you can do it by making changes on its config file <em>/etc/sysconfig/selinux</em>. Finally, reboot the system, and then your new OpenVZ kernel should show up:</p>
<pre>[root@server1 ~]# uname -r
2.6.18-128.2.1.el5.028stab064.7</pre>
<p><strong>3, Create a Virutal Server</strong></p>
<p>Before we can create virtual machines with OpenVZ, we need to have a template for the distribution that we want to use in the virtual machines in the <em>/vz/template/cache</em> by default. New virtual machines will be created from these templates. A list of <a href="http://wiki.openvz.org/Download/template/precreated">precreated templates is available here</a>.</p>
<p>I want to use CentOS 5 in my virtual machines, so I download a CentOS 5 template:</p>
<pre>cd /vz/template/cache
wget http://download.openvz.org/template/precreated/contrib/centos-5-i386-default.tar.gz</pre>
<p>To set up a VPS from the default CentOS 5 template, run:</p>
<pre>vzctl create 211 --ostemplate centos-5-i386-default --config vps.basic</pre>
<p>The 211 must be uniqe and each virtual machine must have its own ID. You can use the last part of the VPS&#8217;s IP address for it. For example, if the virtual machine&#8217;s IP address is 192.168.0.211, you use 211 as the ID.</p>
<p><strong> </strong></p>
<p><strong>4, Common controls on OpenVZ</strong></p>
<p>If you want to have the vm started at boot, run:</p>
<pre>vzctl set 211 --onboot yes --save</pre>
<p>To set a hostname and IP address for the vm, run:</p>
<pre>vzctl set 211 --hostname test.example.com --save
vzctl set 211 --ipadd 192.168.0.211 --save</pre>
<p>Next we set the number of sockets to 120 and assign a few nameservers to the vm:</p>
<pre>vzctl set 211 --numothersock 120 --save
vzctl set 211 --nameserver 85.17.150.123 --nameserver 83.149.80.123 --nameserver 145.253.2.75 --save</pre>
<p>Instead of using the vzctl set commands, you can directly edit vm&#8217;s configuration file which is stored in the directory <em>/etc/vz/conf</em>. If the ID of the vm is 211, then the configuration file is <em>/etc/vz/conf/211.conf</em>.</p>
<p>In order to start the vm, run &#8220;vzctl start 211&#8243;, to set a root password for the vm, run &#8220;vzctl exec 211 passwd&#8221;. Now You can either connect to the vm via SSH (e.g. with PuTTY), or login through console directly as follows:</p>
<pre>vzctl enter 211</pre>
<p>To leave the vm&#8217;s console, type &#8220;exit&#8221;, to stop a vm, run &#8220;<em>vzctl stop 211</em>&#8220;, to restart a vm, run &#8220;<em>vzctl restart 211</em>&#8220;.</p>
<p>To delete a vm from the hard drive (it must be stopped before you can do this), run &#8220;<em>vzctl destroy 211</em>&#8220;.</p>
<p><strong>5, Check VM Status</strong></p>
<p>To get a list of your vms and their statuses, run &#8220;<em>vzlist -a</em>&#8221; like this:</p>
<pre>[root@server1 cache]# vzlist -a
      VEID      NPROC STATUS  IP_ADDR         HOSTNAME
       211         18 running 192.168.0.211   test.example.com</pre>
<p>To find out about the resources allocated to a vm, run like follows:</p>
<pre>[root@server1 cache]# vzctl exec 211 cat /proc/user_beancounters
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
      211:  kmemsize        1508202    1661695   11055923   11377049          0
            lockedpages           0          0        256        256          0
            privvmpages        5430       7102      65536      69632          0
            shmpages            381        381      21504      21504          0
            dummy                 0          0          0          0          0
            numproc              19         21        240        240          0
            physpages          2489       2775          0 2147483647          0
            vmguarpages           0          0      33792 2147483647          0
            oomguarpages       2489       2775      26112 2147483647          0
            numtcpsock            5          5        360        360          0
            numflock              3          4        188        206          0
            numpty                0          1         16         16          0
            numsiginfo            0          2        256        256          0
            tcpsndbuf         44720          0    1720320    2703360          0
            tcprcvbuf         81920          0    1720320    2703360          0
            othersockbuf      13144      14356    1126080    2097152          0
            dgramrcvbuf           0       8380     262144     262144          0
            numothersock         11         13        120        120          0
            dcachesize            0          0    3409920    3624960          0
            numfile             503        531       9312       9312          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            10         10        128        128          0</pre>
<p>The failcnt column is very important, it should be only zeros; if not, means that the vm needs more resources than currently allocated. Open the vm&#8217;s configuration file in <em>/etc/vz/conf</em> and raise the appropriate resource, then restart it.</p>
<p>To find out more about the vzctl command, run &#8220;man vzctl&#8221;. If you faced any issues during the installation, please create a thread and show your errors  in the sub forum <a href="http://forum.admon.org/virtualization/">virtualization</a> at admon community.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/openvz-on-centos-5-3-installation-and-config/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to run 32bit application under x64 system</title>
		<link>http://www.admon.org/how-to-run-32bit-application-under-x64-system/</link>
		<comments>http://www.admon.org/how-to-run-32bit-application-under-x64-system/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:34:08 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[System Tuning]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>

		<guid isPermaLink="false">http://blog.admon.org/?p=175</guid>
		<description><![CDATA[Sometimes you do not have access to source code or you really do not want to compile the code. Then Red Hat Enterprise Linux provides the service called ia32el. The ia32el package contains IA-32 Execution Layer platform which allows emulation of IA-32 binaries on IA-64.(i.e. it allows to run 32-bit applications through the use of [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Sometimes you do not have access to source code or you really do not  want to compile the code. Then Red Hat Enterprise Linux provides the  service called ia32el. The ia32el package contains IA-32 Execution  Layer platform which allows emulation of IA-32 binaries on IA-64.(i.e.  it allows to run 32-bit applications through the use of Intel&#8217;s IA-32  Execution Layer). The IA-32 Execution Layer and 32-bit compatibility  packages provide a runtime environment for 32-bit applications on the  64-bit native RedHat Linux distribution.<span id="more-175"></span></p>
<p>Use rpm command to verify that it is installed:</p>
<p><em># rpm -qa | grep ia32el</em></p>
<p>If it is not installed then install it via up2date command or install it from other extra CD provided by Red Hat Linux.  Once installed you can start service with command:<br />
# service ia32el start<br />
Check the status of service:<br />
<em><br />
# service ia32el status</em></p>
<p>And make sure you have /emul dir. If this failes then you need to  recompile the package from source code again on 64-bit system. Also make sure you update ia32el package, it has some bugs that can cause  problem.</p>
<p>See <a href="http://www.redhat.com/docs/">Red Hat Linux documentation</a> for more information. I&#8217;ve successfully install skype 32bit version on a 64bit laptop, and it&#8217;s running smoothly during the passed months. If you face any further issues, please leave me a message here.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.admon.org/how-to-run-32bit-application-under-x64-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

