<?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; hostname</title>
	<atom:link href="http://www.admon.org/tag/hostname/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>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>

