<?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; vserver</title>
	<atom:link href="http://www.admon.org/tag/vserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.admon.org</link>
	<description>Linux System Administration</description>
	<lastBuildDate>Sat, 19 May 2012 03:36:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</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>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>
	</channel>
</rss>

