<?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>Lâmôlabs &#187; virtualization</title>
	<atom:link href="http://www.lamolabs.org/blog/tag/virtualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lamolabs.org/blog</link>
	<description>Lame Oh Labs .... Linux &#38; Tech! Is there anything else?</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:00:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keeping CentOS 5 OpenVZ images up to Date with Yum</title>
		<link>http://www.lamolabs.org/blog/1114/keeping-centos-5-openvz-images-up-to-date-with-yum/</link>
		<comments>http://www.lamolabs.org/blog/1114/keeping-centos-5-openvz-images-up-to-date-with-yum/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 07:17:14 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[package management]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1114</guid>
		<description><![CDATA[<p>Now that I&#8217;ve been using OpenVZ for several months I&#8217;d gotten to the point where I wanted/needed to &#8220;yum update&#8221; all my VEs. I currently have 11 images running on my OpenVZ Server. I thought I could just vzctl exec &#8230; yum -y update all the VEs, but quickly ran into some issues with this [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve been using OpenVZ for several months I&#8217;d gotten to the point where I wanted/needed to &#8220;yum update&#8221; all my VEs. I currently have 11 images running on my OpenVZ Server. I thought I could just <strong>vzctl exec &#8230; yum -y update</strong> all the VEs, but quickly ran into some issues with this brute force approach. Doing the yum -y update broke several of my VEs so I opted to restore the unrecoverable ones from backups.</p>

<p>For my second attempt, I opted to do each VE independently, to get a better understanding of what the best approach would be for doing mass upgrades like this now, and in the future. The first hurdle to overcome had to do with some of the VEs running out of memory (RAM) during the upgrade process. </p>

<p><span class="caps">NOTE</span>: A VE = Virtual Environment (aka. a virtual host), while HN = Host Node</p>

<h4>Issue #1, not enough <span class="caps">RAM </span>for yum to run</h4>


<div class="wp_codebox"><table width="100%" ><tr id="p11146"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code" id="p1114code6"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># RAM budgets for VEs</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># NOTE: values are in # of pages (1 pg. = 4K)</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;vm feature held maxheld barrier limit failcnt<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>; <span style="color: #c20cb9; font-weight: bold;">grep</span> privvm <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span>1<span style="color: #000000; font-weight: bold;">*/</span>resources<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">|</span>column <span style="color: #660033;">-t</span>
vm                       feature      held    maxheld  barrier  limit   failcnt
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">101</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">31904</span>   <span style="color: #000000;">82215</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">69632</span>   <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">102</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">119803</span>  <span style="color: #000000;">196620</span>   <span style="color: #000000;">166400</span>   <span style="color: #000000;">179200</span>  <span style="color: #000000;">9517</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">103</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">27125</span>   <span style="color: #000000;">35974</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">69632</span>   <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">104</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">56251</span>   <span style="color: #000000;">107250</span>   <span style="color: #000000;">104960</span>   <span style="color: #000000;">115200</span>  <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">105</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">73559</span>   <span style="color: #000000;">82926</span>    <span style="color: #000000;">98304</span>    <span style="color: #000000;">103304</span>  <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">106</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">30219</span>   <span style="color: #000000;">68097</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">69632</span>   <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">108</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">30081</span>   <span style="color: #000000;">84291</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">69632</span>   <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">109</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">32790</span>   <span style="color: #000000;">74199</span>    <span style="color: #000000;">98304</span>    <span style="color: #000000;">103304</span>  <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">110</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">40497</span>   <span style="color: #000000;">69408</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">69632</span>   <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">111</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">26990</span>   <span style="color: #000000;">35371</span>    <span style="color: #000000;">65536</span>    <span style="color: #000000;">67840</span>   <span style="color: #000000;">0</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># NOTE: converted the columns to megabytes (MB), it's just easier to read</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;vm feature held maxheld barrier limit failcnt<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>; <span style="color: #c20cb9; font-weight: bold;">grep</span> privvm <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span>1<span style="color: #000000; font-weight: bold;">*/</span>resources<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{sub($3,$3*4096/2^20) sub($4,$4*4096/2^20) sub($5,$5*4096/2^20) sub($6,$6*4096/2^20)}1'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">|</span>column <span style="color: #660033;">-t</span>
vm                       feature      held     maxheld  barrier  limit    failcnt
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">101</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">124.625</span>  <span style="color: #000000;">321.152</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">272</span>      <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">102</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">467.98</span>   <span style="color: #000000;">768.047</span>  <span style="color: #000000;">650</span>      <span style="color: #000000;">700</span>      <span style="color: #000000;">9517</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">103</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">105.957</span>  <span style="color: #000000;">140.523</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">272</span>      <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">104</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">219.73</span>   <span style="color: #000000;">418.945</span>  <span style="color: #000000;">410</span>      <span style="color: #000000;">450</span>      <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">105</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">287.34</span>   <span style="color: #000000;">323.93</span>   <span style="color: #000000;">384</span>      <span style="color: #000000;">403.531</span>  <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">106</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">118.043</span>  <span style="color: #000000;">266.004</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">272</span>      <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">108</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">117.504</span>  <span style="color: #000000;">329.262</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">272</span>      <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">109</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">128.086</span>  <span style="color: #000000;">289.84</span>   <span style="color: #000000;">384</span>      <span style="color: #000000;">403.531</span>  <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">110</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">158.191</span>  <span style="color: #000000;">271.125</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">272</span>      <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>bc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">111</span><span style="color: #000000; font-weight: bold;">/</span>resources:  privvmpages  <span style="color: #000000;">105.43</span>   <span style="color: #000000;">138.168</span>  <span style="color: #000000;">256</span>      <span style="color: #000000;">265</span>      <span style="color: #000000;">0</span></pre></td></tr></table></div>




<p>According to this data 4 of the 11 images had gone over their allocation of <span class="caps">RAM.</span> So I tried restarting these and re-running yum update within the problem VEs. Again the update failed and so I needed to increase their allocation of memory. I didn&#8217;t want to devote more memory permanently, just a enough temporarily to do the upgrade. So I used this trick to temporarily bump up a VEs allocated memory.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p11147"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p1114code7"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># increase the RAM by 100MB</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 101 <span style="color: #660033;">--privvmpages</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>256+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>272+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m <span style="color: #660033;">--save</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># ...</span>
<span style="color: #666666; font-style: italic;"># do the upgrade (yum update)</span>
<span style="color: #666666; font-style: italic;"># ...</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># decrease the RAM back to the original value</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 101 <span style="color: #660033;">--privvmpages</span> 256m:272m <span style="color: #660033;">--save</span></pre></td></tr></table></div>




<p>For the remaining 3 VEs that needed additional memory I used these commands to increase their allocations of <span class="caps">RAM</span></p>


<div class="wp_codebox"><table width="100%" ><tr id="p11148"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p1114code8"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cmds. to increase RAM by 100MB</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 102 <span style="color: #660033;">--privvmpages</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>650+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>700+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 108 <span style="color: #660033;">--privvmpages</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>256+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>272+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 110 <span style="color: #660033;">--privvmpages</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>256+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>272+100<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>m <span style="color: #660033;">--save</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># cmds. to decrease</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 102 <span style="color: #660033;">--privvmpages</span> 650m:700m <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 108 <span style="color: #660033;">--privvmpages</span> 256m:272m <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 110 <span style="color: #660033;">--privvmpages</span> 256m:272m <span style="color: #660033;">--save</span></pre></td></tr></table></div>





<h4>Issue #2, not enough diskspace for yum to run</h4>

<p>The next snag I ran into had to do with a couple of the VEs running out of diskspace.  And here&#8217;s the commands I used to reconfigure more diskspace.</p>

<p><span id="more-1114"></span></p>


<div class="wp_codebox"><table width="100%" ><tr id="p11149"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1114code9"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># reconfigure with 2GB of diskspace</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 101 <span style="color: #660033;">--diskspace</span> 2048M:2252M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 102 <span style="color: #660033;">--diskspace</span> 2048M:2252M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 103 <span style="color: #660033;">--diskspace</span> 2048M:2252M <span style="color: #660033;">--save</span></pre></td></tr></table></div>




<p>At this point I was able to yum update all my images, and work through any packages that had been updated.</p>

<h4>Issue #3, unfinished yum transactions</h4>

<p>One final snag that I didn&#8217;t really pick up on until probably the 2nd or 3rd time I went through this &#8220;process&#8221; was that some of the VEs would report during yum update that there were <strong>incomplete transactions</strong>, and that I really should run the <strong>yum-complete-transaction</strong> command. I&#8217;d never heard of this command, so I went looking and apparently if yum fails to complete a transaction, it remains queued up, causing you to get warnings during subsequent yum updates. So to get <strong>yum-complete-transaction</strong> command you need to install a package called <strong>yum-utils</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p111410"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p1114code10"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> yum-utils</pre></td></tr></table></div>




<p>Then you&#8217;ll want to run <strong>yum-complete-transaction</strong>. Pay special attention to how many unfinished transactions this command finds. Multiple yum transactions can get queued up so you may need to run <strong>yum-complete-transaction</strong> multiple times. If you do need to run it more than once, it runs the last unfinished transaction first, and then the 2nd to last, and so on until they&#8217;re all completed. Don&#8217;t be alarmed if it says it&#8217;s removing what appear to be critical packages such as bash. This occured on several of my systems and it turned out that there was multiple bashes installed (at least according to the <span class="caps">RPM </span>database) and the unfinished transaction was merely trying to uninstall the previous version, leaving the latest version intact.</p>

<p>A bonus to running <strong>yum-complete-transaction</strong>, is that it helps reduce the memory footprint that yum needs when it has unfinished transactions vs. when it doesn&#8217;t. I was seeing yum using 50-100MB in some cases due to all the unfinished transactions, so fixing this issue helped with minimizing future problems that I may see related to issue #1, not enough <span class="caps">RAM.</span></p>

<h4>Final Thoughts</h4>

<p>My original plan was that I would create a single OpenVZ image that included everything that I needed as far as packages go, and then selectively turn on and off apps that I didn&#8217;t need, like apache, for example. Going forward I&#8217;m going to try a completely different approach, and thin out each image to only include the bare minimum, to perform it&#8217;s job, i.e. mail server, samba server, etc. This should help out with a lot of redundant updating to all the VEs with packages that only 1 or 2 will actually need. The downside with this approach, and reason I avoided it to begin with, was that it seemed to be more work in maintaining many different images, but in practice this may not be as bad as having a single monolithic image multiplied many times across many VEs. </p>

<p>OpenVZ is still a tremendous tool here. Many times when I ran into a problem, I simply restored an image from backup and then resumed, so this isn&#8217;t a slam on it, and more a workflow issue and what&#8217;s the best way to manage many instances of machines. Really what I want is a way to manage roles of machines. Perhaps it&#8217;s time to revisit using something like <a href="http://reductivelabs.com/trac/puppet/wiki/AboutPuppet">puppet</a>?</p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/401/git-and-subversion-setup-on-centos-5/" rel="bookmark" class="wherego_title">Git and subversion setup on CentOS 5</a></li><li><a href="http://www.lamolabs.org/blog/226/how-to-setup-a-mail-server-on-centos-5/" rel="bookmark" class="wherego_title">How to Setup a Mail Server on CentOS 5</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1114/keeping-centos-5-openvz-images-up-to-date-with-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing OpenVZ Instance Descriptions</title>
		<link>http://www.lamolabs.org/blog/2094/managing-openvz-instance-descriptions/</link>
		<comments>http://www.lamolabs.org/blog/2094/managing-openvz-instance-descriptions/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 03:31:01 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=2094</guid>
		<description><![CDATA[<p>I recently discovered that you can assign descriptions to your OpenVZ instances. This isn&#8217;t really that surprising but I never really took the the time until now to scan through the vzctl and vzlist man pages. Prior to discovering these more esoteric features of vzctl and vzlist, I&#8217;d normally just run this command to see [...]]]></description>
			<content:encoded><![CDATA[<p>I recently discovered that you can assign <strong>descriptions</strong> to your <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> instances. This isn&#8217;t really that surprising but I never really took the the time until now to scan through the <strong>vzctl</strong> and <strong>vzlist</strong> man pages. Prior to discovering these more esoteric features of <strong>vzctl</strong> and <strong>vzlist</strong>, I&#8217;d normally just run this command to see what&#8217;s what with my <strong>OpenVZ</strong> instances:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p209415"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p2094code15"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># list of all VE instances</span>
<span style="color: #000000; font-weight: bold;">%</span> vzlist <span style="color: #660033;">-a</span>
      CTID      NPROC STATUS  IP_ADDR         HOSTNAME                        
       <span style="color: #000000;">101</span>         <span style="color: #000000;">32</span> running 10.1.1.101      flanders.mydom.net              
       <span style="color: #000000;">102</span>         <span style="color: #000000;">49</span> running 10.1.1.102      lisa.mydom.net                  
       <span style="color: #000000;">103</span>         <span style="color: #000000;">36</span> running -               bart.mydom.net                  
       <span style="color: #000000;">104</span>         <span style="color: #000000;">38</span> running 10.1.1.104      marge.mydom.net                 
       <span style="color: #000000;">105</span>         <span style="color: #000000;">34</span> running 10.1.1.105      homer.mydom.net                 
       <span style="color: #000000;">106</span>         <span style="color: #000000;">31</span> running 10.1.1.106      kang.mydom.net                  
       <span style="color: #000000;">107</span>         <span style="color: #000000;">27</span> running 10.1.1.107      kodos.mydom.net                 
       <span style="color: #000000;">108</span>         <span style="color: #000000;">32</span> running 10.1.1.108      maude.mydom.net                 
       <span style="color: #000000;">109</span>         <span style="color: #000000;">30</span> running 10.1.1.109      nelson.mydom.net                
       <span style="color: #000000;">110</span>         <span style="color: #000000;">32</span> running 10.1.1.110      ralphie.mydom.net               
       <span style="color: #000000;">111</span>         <span style="color: #000000;">30</span> running 10.1.1.111      martin.mydom.net</pre></td></tr></table></div>




<p>This had worked fine, but sometimes I&#8217;d draw a blank about what&#8217;s running in each instance, hence my need for the description column. You can use the following command to see the description of each instance.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p209416"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p2094code16"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># initial description columns for VEs</span>
<span style="color: #000000; font-weight: bold;">%</span> vzlist <span style="color: #660033;">-o</span> ctid,numproc,status,ip,<span style="color: #c20cb9; font-weight: bold;">hostname</span>,description
      CTID      NPROC STATUS  IP_ADDR         HOSTNAME                         DESCRIPTION                     
       <span style="color: #000000;">101</span>         <span style="color: #000000;">34</span> running 10.1.1.101      flanders.mydom.net               -                               
       <span style="color: #000000;">102</span>         <span style="color: #000000;">49</span> running 10.1.1.102      lisa.mydom.net                   -                               
       <span style="color: #000000;">103</span>         <span style="color: #000000;">35</span> running -               bart.mydom.net                   -                               
       <span style="color: #000000;">104</span>         <span style="color: #000000;">38</span> running 10.1.1.104      marge.mydom.net                  -                               
       <span style="color: #000000;">105</span>         <span style="color: #000000;">34</span> running 10.1.1.105      homer.mydom.net                  -                               
       <span style="color: #000000;">106</span>         <span style="color: #000000;">31</span> running 10.1.1.106      kang.mydom.net                   -                               
       <span style="color: #000000;">107</span>         <span style="color: #000000;">27</span> running 10.1.1.107      kodos.mydom.net                  -                               
       <span style="color: #000000;">108</span>         <span style="color: #000000;">32</span> running 10.1.1.108      maude.mydom.net                  -                               
       <span style="color: #000000;">109</span>         <span style="color: #000000;">30</span> running 10.1.1.109      nelson.mydom.net                 -                               
       <span style="color: #000000;">110</span>         <span style="color: #000000;">32</span> running 10.1.1.110      ralphie.mydom.net                -                               
       <span style="color: #000000;">111</span>         <span style="color: #000000;">30</span> running 10.1.1.111      martin.mydom.net                 -</pre></td></tr></table></div>




<p>I used the following commands to set the description for each <acronym title="Virtual Environment">VE</acronym>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p209417"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p2094code17"><pre class="bash" style="font-family:monospace;">vzctl <span style="color: #000000; font-weight: bold;">set</span> 101 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;nis server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 102 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;mail,imap,smtp server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 103 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;samba server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 104 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;mysql server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 105 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;www,blog,webmail server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 106 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;trac,git,svn server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 107 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;trac,git,svn server (dev)&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 108 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;ldap server (dev)&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 109 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;cacti server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 110 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;tracks server&quot;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> 111 <span style="color: #660033;">--description</span> <span style="color: #ff0000;">&quot;wiki server&quot;</span> <span style="color: #660033;">--save</span></pre></td></tr></table></div>




<p>Re-running the <strong>vzlist</strong> command from before now shows the newly added descriptions.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p209418"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p2094code18"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># filled out description columns for VEs</span>
<span style="color: #000000; font-weight: bold;">%</span> vzlist <span style="color: #660033;">-o</span> ctid,numproc,status,ip,<span style="color: #c20cb9; font-weight: bold;">hostname</span>,description
      CTID      NPROC STATUS  IP_ADDR         HOSTNAME                         DESCRIPTION                     
       101         32 running 10.1.1.101      flanders.mydom.net               nis server                      
       102         49 running 10.1.1.102      lisa.mydom.net                   mail,imap,smtp server           
       103         36 running -               bart.mydom.net                   samba server                    
       104         38 running 10.1.1.104      marge.mydom.net                  mysql server                    
       105         34 running 10.1.1.105      homer.mydom.net                  www,blog,webmail server         
       106         31 running 10.1.1.106      kang.mydom.net                   trac,git,<span style="color: #c20cb9; font-weight: bold;">svn</span> server             
       107         27 running 10.1.1.107      kodos.mydom.net                  trac,git,<span style="color: #c20cb9; font-weight: bold;">svn</span> server <span style="color: #7a0874; font-weight: bold;">&#40;</span>dev<span style="color: #7a0874; font-weight: bold;">&#41;</span>       
       <span style="color: #000000;">108</span>         <span style="color: #000000;">32</span> running 10.1.1.108      maude.mydom.net                  ldap server <span style="color: #7a0874; font-weight: bold;">&#40;</span>dev<span style="color: #7a0874; font-weight: bold;">&#41;</span>               
       <span style="color: #000000;">109</span>         <span style="color: #000000;">30</span> running 10.1.1.109      nelson.mydom.net                 cacti server                    
       <span style="color: #000000;">110</span>         <span style="color: #000000;">32</span> running 10.1.1.110      ralphie.mydom.net                tracks server                   
       <span style="color: #000000;">111</span>         <span style="color: #000000;">30</span> running 10.1.1.111      martin.mydom.net                 wiki server</pre></td></tr></table></div>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/2094/managing-openvz-instance-descriptions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Troubleshooting a Restore of an OpenVZ Image from one Host Node to Another</title>
		<link>http://www.lamolabs.org/blog/1777/troubleshooting-restore-an-openvz-image-from-one-host-node-to-another/</link>
		<comments>http://www.lamolabs.org/blog/1777/troubleshooting-restore-an-openvz-image-from-one-host-node-to-another/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 04:30:14 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1777</guid>
		<description><![CDATA[
.center   { margin-left: 5em; margin-right: 5em; }


<p>I hadn&#8217;t tried this before but I figured I could use vzdump to save a Virtual Environment aka. (VE) from one Host Node aka. (HN) and restore it to another Host Node. It turns out that you can do this but there is one gotcha that I [...]]]></description>
			<content:encoded><![CDATA[<style>
.center   { margin-left: 5em; margin-right: 5em; }
</style>

<p>I hadn&#8217;t tried this before but I figured I could use <strong>vzdump</strong> to save a <strong>Virtual Environment</strong> aka. <strong>(VE)</strong> from one <strong>Host Node</strong> aka. <strong>(HN)</strong> and restore it to another <strong>Host Node</strong>. It turns out that <strong>you can do this</strong> but there is <strong>one gotcha</strong> that I wasted couple of hours on, so this post is my attempt to hopefully save someone else a couple of hours and also as a beacon for myself the next time I run into this and forget how to work around it.</p>

<p>Firstly I have 2 OpenVZ servers. One has <strong>4 GB of <span class="caps">RAM</span></strong> and the 2nd has <strong>1 GB</strong>. I started off using <strong>vzdump</strong> to create a <strong>backup</strong> of one of my <strong>VEs</strong> running on the <strong>4 GB HN</strong>. I then <strong>restored</strong> the backed up VE using vzdump on the <strong>1 GB HN</strong>. Everything went smoothly up to this point, until I ran the <strong>vzlist -a</strong> command on the <strong>1 GB HN</strong> and was presented with this message:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p177723"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p1777code23"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> vzlist <span style="color: #660033;">-a</span>
Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">PHYSPAGES</span>=0:9223372036854775807 was truncated
Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">VMGUARPAGES</span>=33792:9223372036854775807 was truncated
Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">OOMGUARPAGES</span>=<span style="color: #000000;">26112</span>:<span style="color: #000000;">9223372036854775807</span> was truncated
      CTID      NPROC STATUS  IP_ADDR         HOSTNAME                        
       <span style="color: #000000;">201</span>          - stopped 192.168.1.201   flanders.bubba.net</pre></td></tr></table></div>




<p>I had never seen this message before and it appeared to be benign in terms of the VE being able to start/stop, but messages like this really get under my skin, so of course I had to burn a few hours to figure out why. There wasn&#8217;t really much in the way of blog posts or forum posts either, which kind of surprised me.</p>

<p>To start I researched what these 3 parameters actually controlled.</p>

<div class="center">

<table><tr><td align="center"><strong><ins><span class="caps">PARAMETER</span></ins></strong></td><td align="center"><strong><ins>Type</ins></strong></td><td align="center"><strong><ins>Definition</ins></strong></td></tr><tr><td align="center"><strong>oomguarpages</strong></td><td align="center">(system)</td><td>The guaranteed amount of memory for the case the memory is &#8220;over-booked&#8221; (out-of-memory kill guarantee).</td></tr><tr><td align="center"><strong>vmguarpages</strong></td><td align="center">(system)</td><td>Memory allocation guarantee.</td></tr><tr><td align="center"><strong>physpages</strong></td><td align="center">(system)</td><td>Total number of <span class="caps">RAM </span>pages used by processes.</td></tr></table>

</div>

<p>I then poked around and noticed that the <strong>/etc/vz/conf/0.conf</strong> file on the <strong>1 GB HN</strong> looked like this:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p177724"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p1777code24"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">more</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>0.conf 
<span style="color: #666666; font-style: italic;"># This is configuration file for VE0.</span>
<span style="color: #666666; font-style: italic;"># Only UB parameters are processed</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Copyright (C) 2006-2008, Parallels, Inc. All rights reserved.</span>
&nbsp;
<span style="color: #007800;">ONBOOT</span>=<span style="color: #ff0000;">&quot;no&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># UBC parameters (in form of barrier:limit)</span>
<span style="color: #007800;">OOMGUARPAGES</span>=<span style="color: #ff0000;">&quot;2147483647:2147483647&quot;</span></pre></td></tr></table></div>




<p>While on the <strong>4 GB HN</strong> system it looked like this:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p177725"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p1777code25"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">more</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>0.conf 
<span style="color: #666666; font-style: italic;"># This is configuration file for VE0.</span>
<span style="color: #666666; font-style: italic;"># Only UB parameters are processed</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Copyright (C) 2006-2008, Parallels, Inc. All rights reserved.</span>
&nbsp;
<span style="color: #007800;">ONBOOT</span>=<span style="color: #ff0000;">&quot;no&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># UBC parameters (in form of barrier:limit)</span>
<span style="color: #007800;">OOMGUARPAGES</span>=<span style="color: #ff0000;">&quot;9223372036854775807:9223372036854775807&quot;</span></pre></td></tr></table></div>




<p>It then dawned on me that the barrier portion of these parameters was the problem. The barrier is the number that comes after the colon in these lines:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p177726"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p1777code26"><pre class="bash" style="font-family:monospace;">Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">PHYSPAGES</span>=0:9223372036854775807 was truncated
Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">VMGUARPAGES</span>=33792:9223372036854775807 was truncated
Warning: too large value <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #007800;">OOMGUARPAGES</span>=<span style="color: #000000;">26112</span>:<span style="color: #000000;">9223372036854775807</span> was truncated</pre></td></tr></table></div>




<p>So a quick change of all the values from <strong>9223372036854775807</strong> to <strong>2147483647</strong> fixed the problem.</p>

<p>This post doesn&#8217;t even scratch the surface of all the nuts and bolts of memory management ins and outs within OpenVZ. For more info about OpenVZ memory management you might want to check out these useful links:</p>








<ul>
<li><a href="http://forum.parallels.com/showthread.php?t=59082&amp;highlight=oomguarpages">Good explanation of the mechanics behind oomguarpages, privvmpages, and physpages</a></li>
<li><a href="http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/lin/VzLinuxUBCMgmt/18849.htm">OpenVZ Resource Management Parameters Example</a></li>
</ul>




<ul>
<li><a href="http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/lin/VzLinuxUBCMgmt/18731.htm">Definition of OpenVZ parameters</a></li>
<li><a href="http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/lin/VzLinuxUBCMgmt/18766.htm">Definition of parameter: vmguarpages</a></li>
<li><a href="http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/lin/VzLinuxUBCMgmt/18767.htm">Definition of parameters: oomguarpages &amp; privvmpages</a></li>
</ul>

<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/2681/one-liner-how-to-use-the-bash-shells-export-command/" rel="bookmark" class="wherego_title">[one-liner]: How to Use the Bash Shell&#8217;s export Command</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1777/troubleshooting-restore-an-openvz-image-from-one-host-node-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto Stop Clock Drift Issues on a CentOS 5 OpenVZ Host Node</title>
		<link>http://www.lamolabs.org/blog/1739/howto-stop-clock-drift-issuescentos5-openvz-host-node/</link>
		<comments>http://www.lamolabs.org/blog/1739/howto-stop-clock-drift-issuescentos5-openvz-host-node/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 06:45:58 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1739</guid>
		<description><![CDATA[<p>I&#8217;ve been dealing with a nagging problem for several months. The problem? I can&#8217;t get my OpenVZ Host Node, aka. HN, to keep consistent time. I&#8217;ve even been running ntpd, and the time would still invariably drift so that the HN and the Virtual Environments, aka. VEs, running on the HN were all several hours [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been dealing with a nagging problem for several months. The problem? I can&#8217;t get my <strong>OpenVZ Host Node</strong>, aka. <strong>HN</strong>, to <strong>keep consistent time</strong>. I&#8217;ve even been running <strong>ntpd</strong>, and the time would still invariably drift so that the <strong><acronym title="Host Node">HN</acronym></strong> and the <strong>Virtual Environments</strong>, aka. <strong>VEs</strong>, running on the <strong>HN</strong> were all several hours behind. Simply restarting ntpd would temporarily fix the situation, but I shouldn&#8217;t have to do that.</p>

<p>So I finally hunkered down and figured out how to solve this problem. These 2 threads proved extremely helpful in determining the fix.</p>


<ul>
<li><a href="http://forum.openvz.org/index.php?t=msg&amp;goto=7153&amp;amp">OpenVZ Forum thread</a></li>
<li><a href="http://www.webhostingtalk.com/showthread.php?p=6281096%23post6281096">Webhostingtalk Forum thread</a></li>
</ul>



<p>These threads offered 2 fixes to try. The first, was to <strong>modify</strong> the <strong>ntp.conf file</strong> so that any <strong>server</strong> definitions now included the <strong>burst &amp; iburst switches</strong> like this:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p173932"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1739code32"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/ntp.conf</span>
...
server 192.168.1.6 burst iburst
...</pre></td></tr></table></div>




<p>Adding these switches seemed to help, but then my <strong>/var/log/messages</strong> log started getting filled with <strong>synch attempts</strong> by <strong>ntpd</strong> like these:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p173933"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p1739code33"><pre class="bash" style="font-family:monospace;">Jul <span style="color: #000000;">10</span> 03:<span style="color: #000000;">50</span>:<span style="color: #000000;">18</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 03:<span style="color: #000000;">51</span>:<span style="color: #000000;">24</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span>
Jul <span style="color: #000000;">10</span> 03:<span style="color: #000000;">59</span>:<span style="color: #000000;">59</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 04:01:<span style="color: #000000;">21</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">11</span>:<span style="color: #000000;">52</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">15</span>:05 mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">27</span>:<span style="color: #000000;">56</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">30</span>:06 mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">41</span>:<span style="color: #000000;">53</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 04:<span style="color: #000000;">47</span>:<span style="color: #000000;">17</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span>
Jul <span style="color: #000000;">10</span> 05:03:<span style="color: #000000;">28</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">10</span> 05:<span style="color: #000000;">12</span>:05 mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">15032</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span></pre></td></tr></table></div>




<p>The <strong>second suggestion</strong> was the <strong>key tip</strong>. It recommended that you add a <strong>kernel switch</strong> called <strong>clock=pmtmr</strong> to the <strong>grub.conf</strong> file. Once I tried this I received a <strong>warning message</strong> in the <strong>dmesg log</strong> stating that this switch had been <strong>deprecated</strong>, and the <strong>new switch</strong> was now <strong>clocksource=acpi_pm</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p173934"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p1739code34"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">dmesg</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> clock
Command line: ro <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>VolGroup00<span style="color: #000000; font-weight: bold;">/</span>LogVol00 rhgb quiet <span style="color: #007800;">clock</span>=pmtmr
Kernel <span style="color: #7a0874; font-weight: bold;">command</span> line: ro <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>VolGroup00<span style="color: #000000; font-weight: bold;">/</span>LogVol00 rhgb quiet <span style="color: #007800;">clock</span>=pmtmr
Warning: <span style="color: #007800;">clock</span>=pmtmr is deprecated. Use <span style="color: #007800;">clocksource</span>=acpi_pm.
Real Time Clock Driver v1.12ac</pre></td></tr></table></div>




<p>So I <strong>modified</strong> the <strong>grub.conf</strong> to incorporate the <strong>clocksource switch</strong>, rebooted the system, and was rewarded with a cleaner dmesg.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p173935"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1739code35"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">dmesg</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> clock
Command line: ro <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>VolGroup00<span style="color: #000000; font-weight: bold;">/</span>LogVol00 rhgb quiet <span style="color: #007800;">clocksource</span>=acpi_pm
Kernel <span style="color: #7a0874; font-weight: bold;">command</span> line: ro <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>VolGroup00<span style="color: #000000; font-weight: bold;">/</span>LogVol00 rhgb quiet <span style="color: #007800;">clocksource</span>=acpi_pm
Real Time Clock Driver v1.12ac</pre></td></tr></table></div>




<p>A quick check of <strong>/var/log/messages</strong> looked good, <strong>no more ntpd synch</strong> messages:</p>


<div class="wp_codebox"><table width="100%" ><tr id="p173936"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p1739code36"><pre class="bash" style="font-family:monospace;">Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24578</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: ntpd 4.2.2p1<span style="color: #000000; font-weight: bold;">@</span><span style="color: #000000;">1.1570</span>-o Thu Apr  <span style="color: #000000;">9</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">53</span>:<span style="color: #000000;">31</span> UTC <span style="color: #000000;">2009</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: precision = <span style="color: #000000;">1.000</span> usec
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Listening on interface wildcard, 0.0.0.0<span style="color: #666666; font-style: italic;">#123 Disabled</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Listening on interface wildcard, ::<span style="color: #666666; font-style: italic;">#123 Disabled</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Listening on interface lo, ::<span style="color: #000000;">1</span><span style="color: #666666; font-style: italic;">#123 Enabled</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Listening on interface veth103.0, fe80::<span style="color: #000000;">218</span>:51ff:fe43:<span style="color: #000000;">8487</span><span style="color: #666666; font-style: italic;">#123 Enabled</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">49</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Listening on interface vmbr0, fe80::<span style="color: #000000;">222</span>:15ff:fe91:c12d<span style="color: #666666; font-style: italic;">#123 Enabled</span>
Jul 11 00:30:55 mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span>24579<span style="color: #7a0874; font-weight: bold;">&#93;</span>: kernel <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #c20cb9; font-weight: bold;">sync</span> status 0040
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">30</span>:<span style="color: #000000;">56</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: frequency initialized <span style="color: #000000;">25.118</span> PPM from <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ntp<span style="color: #000000; font-weight: bold;">/</span>drift
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">42</span>:<span style="color: #000000;">51</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to LOCAL<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, stratum <span style="color: #000000;">10</span>
Jul <span style="color: #000000;">11</span> 00:<span style="color: #000000;">43</span>:<span style="color: #000000;">54</span> mulder ntpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">24579</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: synchronized to 192.168.1.6, stratum <span style="color: #000000;">3</span></pre></td></tr></table></div>




<p>Just to be on the safe side, I opted to leave the <strong>burst &amp; iburst</strong> switches on the <strong>server line</strong> in the <strong>/etc/ntp.conf</strong> file. For completeness, I researched what the <strong>burst/iburst</strong> switches do. Here are those descriptions right out of the <strong>ntp.conf man page</strong>:</p>

<blockquote><p><strong>burst</strong> &#8211; When  the server is reachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between the first and second packets can be changed with the calldelay command to allow additional time for a modem or <span class="caps">ISDN </span>call to complete. This option is valid with only the server command and is a recommended option with this command when the maxpoll option is 11 or greater.</p></blockquote>

<blockquote><p><strong>iburst</strong> &#8211; When  the  server  is  unreachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between  the  first and second packets can be changed with the calldelay command to allow additional time for a modem or <span class="caps">ISDN </span>call to complete. This option is valid with only the server command and is a recommended option with this command.</p></blockquote>

<p>After waiting for ~2 hours, I still did not see anymore of the <strong>ntp synch</strong> messages in <strong>/var/log/messages</strong>. Since the <strong>burst/iburst</strong> switches don&#8217;t seem to be causing any additional problems I&#8217;m going to leave them <strong>on</strong> going forward, and I may remove them completely at a later date. For now, I&#8217;m going to wait and make sure that the time remains stable before I do that.</p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/949/remote-installing-centos-5-using-vnc/" rel="bookmark" class="wherego_title">Remote Installing CentOS 5 using VNC</a></li><li><a href="http://www.lamolabs.org/blog/1724/one-liner-bash-wait-command/" rel="bookmark" class="wherego_title">[one-liner]: Bash&#8217;s wait Command</a></li><li><a href="http://www.lamolabs.org/blog/1487/getting-a-brother-mfc-8480dn-printerscannerfax-and-openvz-to-play-nice-on-centos-5/" rel="bookmark" class="wherego_title">Getting a Brother MFC-8480DN Printer/Scanner/Fax and OpenVZ to Play Nice on CentOS 5</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1739/howto-stop-clock-drift-issuescentos5-openvz-host-node/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Info About OpenVZ and Memory</title>
		<link>http://www.lamolabs.org/blog/1218/more-info-about-openvz-and-memory/</link>
		<comments>http://www.lamolabs.org/blog/1218/more-info-about-openvz-and-memory/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 00:08:14 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1218</guid>
		<description><![CDATA[<p>Found this extremely useful post over on maxgarrick.com about how OpenVZ resource limits work. I&#8217;m re-posting a very handy diagram that was part of the blog post so that I have a local copy for my own references here:</p>

<p></p>

<p>I highly recommend that you check out the post if you want a great description of the [...]]]></description>
			<content:encoded><![CDATA[<p>Found this extremely useful post over on <a href="http://maxgarrick.com/">maxgarrick.com</a> about <a href="http://maxgarrick.com/understanding-openvz-resource-limits/">how OpenVZ resource limits work</a>. I&#8217;m re-posting a very handy diagram that was part of the blog post so that I have a local copy for my own references here:</p>

<p><a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/vz.png" rel="lightbox[1218]"><img src="http://www.lamolabs.org/blog/wp-content/uploads/2009/06/vz-459x650.png" alt="vz" title="vz" width="459" height="650" class="aligncenter size-medium wp-image-1220" /></a></p>

<p>I highly recommend that you check out the post if you want a great description of the resource limits with respect to memory work with OpenVZ.</p><div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1218/more-info-about-openvz-and-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing Up OpenVZ</title>
		<link>http://www.lamolabs.org/blog/1136/backing-up-openvz/</link>
		<comments>http://www.lamolabs.org/blog/1136/backing-up-openvz/#comments</comments>
		<pubDate>Wed, 20 May 2009 01:54:02 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/1136/backing-up-openvz/</guid>
		<description><![CDATA[<p>Now that I&#8217;ve been using OpenVZ for several months I thought it would be a good time to devote a few cycles to putting together a backup routine for the 10+ OpenVZ VEs that I&#8217;ve setup. Here is the procedure I put together to backup one of my VEs. I should mention that all my [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve been using OpenVZ for several months I thought it would be a good time to devote a few cycles to putting together a backup routine for the 10+ OpenVZ <acronym title="Virtual Environment">VE</acronym>s that I&#8217;ve setup. Here is the procedure I put together to backup one of my VEs. I should mention that all my VEs make use of automounts, and through experimentation I figured out that I need to stop the automounter while I&#8217;m performing a backup of a <span class="caps">VE.</span> From my <acronym title="Host Node">HN</acronym> I determined that this was the minimal number of commands I could accomplish a backup of a single <span class="caps">VE.</span></p>


<div class="wp_codebox"><table width="100%" ><tr id="p113640"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1136code40"><pre class="bash" style="font-family:monospace;">vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">101</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs stop			<span style="color: #666666; font-style: italic;"># stop automounter</span>
vzdump <span style="color: #660033;">--compress</span> <span style="color: #660033;">--suspend</span> <span style="color: #000000;">101</span>				<span style="color: #666666; font-style: italic;"># backup VE(Virtual Environment) 101</span>
vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">101</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs start			<span style="color: #666666; font-style: italic;"># start automounter</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> vzdump-101.log vzdump-101.tgz <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>vz_backups<span style="color: #000000; font-weight: bold;">/</span>	<span style="color: #666666; font-style: italic;"># move backed up file to on-line storage area</span></pre></td></tr></table></div>




<p><strong>Here is the full transcript from a backup</strong></p>


<div class="wp_codebox"><table width="100%" ><tr id="p113641"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code" id="p1136code41"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> 101 <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs stop
Stopping automount: <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> vzdump <span style="color: #660033;">--compress</span> <span style="color: #660033;">--suspend</span> 101
INFO: Starting new backup job - vzdump <span style="color: #660033;">--compress</span> <span style="color: #660033;">--suspend</span> 101
INFO: Starting Backup of VM 101 <span style="color: #7a0874; font-weight: bold;">&#40;</span>openvz<span style="color: #7a0874; font-weight: bold;">&#41;</span>
INFO: status = CTID 101 exist mounted running
INFO: starting first <span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>101 to <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vzdumptmp22651
INFO: Number of files: 35178
INFO: Number of files transferred: 25940
INFO: Total <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span>: 800591555 bytes
INFO: Total transferred <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span>: 616512883 bytes
INFO: Literal data: 616512883 bytes
INFO: Matched data: 0 bytes
INFO: File list <span style="color: #c20cb9; font-weight: bold;">size</span>: 712364
INFO: File list generation <span style="color: #000000; font-weight: bold;">time</span>: 0.001 seconds
INFO: File list transfer <span style="color: #000000; font-weight: bold;">time</span>: 0.000 seconds
INFO: Total bytes sent: 618585522
INFO: Total bytes received: 679718
INFO: sent 618585522 bytes  received 679718 bytes  10069353.50 bytes<span style="color: #000000; font-weight: bold;">/</span>sec
INFO: total <span style="color: #c20cb9; font-weight: bold;">size</span> is 800591555  speedup is 1.29
INFO: first <span style="color: #c20cb9; font-weight: bold;">sync</span> finished <span style="color: #7a0874; font-weight: bold;">&#40;</span>61 seconds<span style="color: #7a0874; font-weight: bold;">&#41;</span>
INFO: <span style="color: #7a0874; font-weight: bold;">suspend</span> vps
INFO: Setting up checkpoint...
INFO:   suspend...
INFO:   get context...
INFO: Checkpointing completed succesfully
INFO: final <span style="color: #c20cb9; font-weight: bold;">sync</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>101 to <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vzdumptmp22651
INFO: Number of files: 35178
INFO: Number of files transferred: 0
INFO: Total <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span>: 800591555 bytes
INFO: Total transferred <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span>: 0 bytes
INFO: Literal data: 0 bytes
INFO: Matched data: 0 bytes
INFO: File list <span style="color: #c20cb9; font-weight: bold;">size</span>: 712364
INFO: File list generation <span style="color: #000000; font-weight: bold;">time</span>: 0.001 seconds
INFO: File list transfer <span style="color: #000000; font-weight: bold;">time</span>: 0.000 seconds
INFO: Total bytes sent: 716728
INFO: Total bytes received: 4363
INFO: sent 716728 bytes  received 4363 bytes  480727.33 bytes<span style="color: #000000; font-weight: bold;">/</span>sec
INFO: total <span style="color: #c20cb9; font-weight: bold;">size</span> is 800591555  speedup is 1110.25
INFO: final <span style="color: #c20cb9; font-weight: bold;">sync</span> finished <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span> seconds<span style="color: #7a0874; font-weight: bold;">&#41;</span>
INFO: resume vps
INFO: Resuming...
INFO: vps is online again after <span style="color: #000000;">3</span> seconds
INFO: creating archive <span style="color: #ff0000;">'/vz/dump/vzdump-101.dat'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vzdumptmp22651<span style="color: #000000; font-weight: bold;">/</span>101<span style="color: #7a0874; font-weight: bold;">&#41;</span>
INFO: Total bytes written: 641587200 <span style="color: #7a0874; font-weight: bold;">&#40;</span>612MiB, 11MiB<span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span>
INFO: <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #c20cb9; font-weight: bold;">size</span> 201MB
INFO: Finished Backup of VM 101 <span style="color: #7a0874; font-weight: bold;">&#40;</span>00:02:02<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> 101 <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs start
Starting automount: <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> vzdump-101.log vzdump-101.tgz <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>vz_backups<span style="color: #000000; font-weight: bold;">/</span>.</pre></td></tr></table></div>




<p><strong>I put together this one-liner which will handle the backing up of all 11 of my <acronym title="Virtual Environment">VE</acronym>s.</strong></p>


<div class="wp_codebox"><table width="100%" ><tr id="p113642"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1136code42"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">seq</span> 101 111<span style="color: #000000; font-weight: bold;">`</span>;<span style="color: #000000; font-weight: bold;">do</span> vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs stop; vzdump <span style="color: #660033;">--compress</span> <span style="color: #660033;">--suspend</span> <span style="color: #007800;">$i</span>; vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>autofs start;<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> vzdump-<span style="color: #000000; font-weight: bold;">*</span>.tgz <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>vz_backups<span style="color: #000000; font-weight: bold;">/</span>.</pre></td></tr></table></div>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1136/backing-up-openvz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting Videocasts</title>
		<link>http://www.lamolabs.org/blog/1053/interesting-videocasts/</link>
		<comments>http://www.lamolabs.org/blog/1053/interesting-videocasts/#comments</comments>
		<pubDate>Wed, 06 May 2009 00:06:57 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[videocasts]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[videcasts]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=1053</guid>
		<description><![CDATA[<p>Here is a list of interesting videocasts/webcasts that i would recommend from the O&#8217;Reilly, InfoQ, &#38; Google Tech Talks websites.</p>

O&#8217;Reilly



MySQL Replication: Audit, Test, &#38; Verify




<p></p>



10 Things Every Software Architect Should Know




<p></p>



Getting Started with Amazon Web Services




<p></p>



Showing Off Your Models: Presentations in Google SketchUp




<p>Video is TBD and should be available after May 14th, 2009</p>

<p></p>

InfoQ

Startups, Business, &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a list of interesting videocasts/webcasts that i would recommend from the <a href="http://oreilly.com/webcasts/"><span class="caps">O&#8217;R</span>eilly</a>, <a href="http://www.infoq.com/">InfoQ</a>, &amp; <a href="http://www.youtube.com/user/googletechtalks">Google Tech Talks</a> websites.</p>

<h4><span class="caps">O&#8217;R</span>eilly</h4>


<ul>
<li><a href="http://www.oreillynet.com/pub/e/1214">MySQL Replication: Audit, Test, &amp; Verify</a></li>
</ul>



<p><center><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/vgDqwxdMr6o&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vgDqwxdMr6o&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></center></p>


<ul>
<li><a href="http://www.oreillynet.com/pub/e/1250">10 Things Every Software Architect Should Know</a></li>
</ul>



<p><center><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Dtd0njgo4s8&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Dtd0njgo4s8&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></center></p>


<ul>
<li><a href="http://www.oreillynet.com/pub/e/1289">Getting Started with Amazon Web Services</a></li>
</ul>



<p><center><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/c8yuGvnU3A0&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/c8yuGvnU3A0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></center></p>


<ul>
<li><a href="http://www.oreillynet.com/pub/e/1333">Showing Off Your Models: Presentations in Google SketchUp</a></li>
</ul>



<p><center>Video is <span class="caps">TBD </span>and should be available after May 14th, 2009</center></p>

<p><span id="more-1053"></span></p>

<h4>InfoQ</h4>

<h5>Startups, Business, &amp; Development Processes</h5>


<ul>
<li><a href="http://www.infoq.com/presentations/teamwork-an-individual-skill">Teamwork Is An Individual Skill: How to Build Any Team Any Time</a></li>
<li><a href="http://www.infoq.com/articles/backlog-panel">Virtual Panel: Is the Backlog a Vital Artifact and Practice or Waste?</a></li>
<li><a href="http://www.infoq.com/presentations/straw-yellowpages"><span class="caps">YELLOWPAGES.COM</span>: Behind the Curtain</a></li>
</ul>



<h5>Rails</h5>


<ul>
<li><a href="http://www.infoq.com/presentations/chelimsky-under-the-hood">Ruby Gems: Under The Hood + A Few Useful Gems: hpricot, builder, mocha, hoe, bones, and more</a></li>
<li><a href="http://www.infoq.com/presentations/bini-power-on-jvm">JRuby: Power on the <span class="caps">JVM</span></a></li>
<li><a href="http://www.infoq.com/interviews/grosenbach-peepcode">Geoffrey Grosenbach on PeepCode</a></li>
<li><a href="http://www.infoq.com/presentations/hellesoy-bdd-rspec">Executable User Stories with RSpec and <span class="caps">BDD</span></a></li>
<li><a href="http://www.infoq.com/presentations/vinoski-rest-serendipity"><span class="caps">REST,</span> Reuse, and Serendipity</a></li>
<li><a href="http://www.infoq.com/articles/gregg-pollack-scaling-rails">Gregg Pollack and the How-To of Scaling Rails</a></li>
</ul>



<h5>Virtualization &amp; Cloud</h5>


<ul>
<li><a href="http://www.infoq.com/interviews/magnusson-geir-cloud">Geir Magnusson on Cloud Computing</a></li>
<li><a href="http://www.infoq.com/interviews/charlton-cloud-computing">Stu Charlton on Cloud Computing</a></li>
<li><a href="http://www.infoq.com/presentations/amazon-web-services">Amazon Web Services: Building Blocks for True Internet Applications</a></li>
</ul>



<h5>Architectures &amp; Performance</h5>


<ul>
<li><a href="http://www.infoq.com/presentations/Digg-Joe-Stump">Digg, An Infrastructure in Transition</a></li>
<li><a href="http://www.infoq.com/articles/eight-isolation-levels">Eight Isolation Levels Every Web Developer Should Know</a></li>
<li><a href="http://www.infoq.com/presentations/refactoring-databases">Refactoring Databases: Evolutionary Database Design</a></li>
</ul>



<h4>Google Tech Talks</h4>

<h5>Architectures</h5>


<ul>
<li><a href="http://www.youtube.com/watch?v=NWHfY_lvKIQ">Learning from StackOverflow.com</a></li>
</ul>



<p><center><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/NWHfY_lvKIQ&amp;hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/NWHfY_lvKIQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></center></p><div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/1053/interesting-videocasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increasing RAM in a OpenVZ Virtual Environment</title>
		<link>http://www.lamolabs.org/blog/657/increasing-ram-in-a-openvz-virtual-environment/</link>
		<comments>http://www.lamolabs.org/blog/657/increasing-ram-in-a-openvz-virtual-environment/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 04:31:07 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/657/increasing-ram-in-a-openvz-virtual-environment/</guid>
		<description><![CDATA[<p>Recently I started to get a strange error with one of my OpenVZ VE nodes. This VE is the one that maintains my MySQL database for my Wordpress blog. Here&#8217;s the error I was getting.</p>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# inside the OpenVZ VE
&#160;
% yum update
Loading &#34;fastestmirror&#34; plugin
Loading mirror speeds from cached hostfile
 * atrpms: dl.atrpms.net
 * extras: mirror.anl.gov
 * [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I started to get a strange error with one of my <strong>OpenVZ <acronym title="Virtual Environment">VE</acronym></strong> nodes. This <strong>VE</strong> is the one that maintains my MySQL database for my Wordpress blog. Here&#8217;s the error I was getting.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p65748"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code" id="p657code48"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># inside the OpenVZ VE</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> yum update
Loading <span style="color: #ff0000;">&quot;fastestmirror&quot;</span> plugin
Loading mirror speeds from cached hostfile
 <span style="color: #000000; font-weight: bold;">*</span> atrpms: dl.atrpms.net
 <span style="color: #000000; font-weight: bold;">*</span> extras: mirror.anl.gov
 <span style="color: #000000; font-weight: bold;">*</span> rpmforge: ftp-stud.fht-esslingen.de
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
  File <span style="color: #ff0000;">&quot;/usr/bin/yum&quot;</span>, line 29, <span style="color: #000000; font-weight: bold;">in</span> ?
    yummain.main<span style="color: #7a0874; font-weight: bold;">&#40;</span>sys.argv<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span>:<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/share/yum-cli/yummain.py&quot;</span>, line 105, <span style="color: #000000; font-weight: bold;">in</span> main
    result, resultmsgs = base.doCommands<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/share/yum-cli/cli.py&quot;</span>, line 289, <span style="color: #000000; font-weight: bold;">in</span> doCommands
    self._getTs<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/depsolve.py&quot;</span>, line 85, <span style="color: #000000; font-weight: bold;">in</span> _getTs
    self._getTsInfo<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/depsolve.py&quot;</span>, line 91, <span style="color: #000000; font-weight: bold;">in</span> _getTsInfo
    self._tsInfo.setDatabases<span style="color: #7a0874; font-weight: bold;">&#40;</span>self.rpmdb, self.pkgSack<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/__init__.py&quot;</span>, line 537, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>lambda<span style="color: #000000; font-weight: bold;">&gt;</span>
    pkgSack = property<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">fget</span>=lambda self: self._getSacks<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>,
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/__init__.py&quot;</span>, line 392, <span style="color: #000000; font-weight: bold;">in</span> _getSacks
    self.repos.populateSack<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span>=repos<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/repos.py&quot;</span>, line 214, <span style="color: #000000; font-weight: bold;">in</span> populateSack
    self.doSetup<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/repos.py&quot;</span>, line 66, <span style="color: #000000; font-weight: bold;">in</span> doSetup
    self.ayum.plugins.run<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'postreposetup'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/site-packages/yum/plugins.py&quot;</span>, line 169, <span style="color: #000000; font-weight: bold;">in</span> run
    func<span style="color: #7a0874; font-weight: bold;">&#40;</span>conduitcls<span style="color: #7a0874; font-weight: bold;">&#40;</span>self, self.base, conf, <span style="color: #000000; font-weight: bold;">**</span>kwargs<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/yum-plugins/fastestmirror.py&quot;</span>, line 90, <span style="color: #000000; font-weight: bold;">in</span> postreposetup_hook
    repomirrors<span style="color: #7a0874; font-weight: bold;">&#91;</span>str<span style="color: #7a0874; font-weight: bold;">&#40;</span>repo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> = FastestMirror<span style="color: #7a0874; font-weight: bold;">&#40;</span>repo.urls<span style="color: #7a0874; font-weight: bold;">&#41;</span>.get_mirrorlist<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/yum-plugins/fastestmirror.py&quot;</span>, line 142, <span style="color: #000000; font-weight: bold;">in</span> get_mirrorlist
    self._poll_mirrors<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/yum-plugins/fastestmirror.py&quot;</span>, line 155, <span style="color: #000000; font-weight: bold;">in</span> _poll_mirrors
    pollThread.start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
  File <span style="color: #ff0000;">&quot;/usr/lib/python2.4/threading.py&quot;</span>, line 416, <span style="color: #000000; font-weight: bold;">in</span> start
    _start_new_thread<span style="color: #7a0874; font-weight: bold;">&#40;</span>self.__bootstrap, <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
thread.error: can<span style="color: #ff0000;">'t start new thread</span></pre></td></tr></table></div>




<p>Yup, it made a lot of sense to me as well. Seemed to be something with <strong>yum&#8217;s fastermirror plugin</strong>, or so I thought, so I just disabled it and was able to get a little further like this:</p>

<p><span id="more-657"></span></p>


<div class="wp_codebox"><table width="100%" ><tr id="p65749"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p657code49"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># inside the OpenVZ VE</span>
&nbsp;
yum <span style="color: #660033;">--disableplugin</span>=fastermirror update</pre></td></tr></table></div>




<p>However now the update would go through the motions of downloading packages etc. but would just die when trying to install them. So after googling for a bit I found a <a href="http://yum.baseurl.org/ticket/70">bug submitted against yum</a> reporting a similar problem. Turns out this is <strong>yum and/or python&#8217;s</strong> way of saying it <strong>ran out of memory</strong>. So obvious, right?</p>

<p>So I checked my <strong><span class="caps">VE&#8217;</span>s beancounters</strong> and low and behold it was <strong>running out of memory</strong>. You can tell when you start seeing a count in the <strong>failcnt</strong> column below on the <strong>privvmpages</strong> row. <span class="caps">BTW, </span>this <strong>VE</strong> instance is using the default value of <strong>256MB</strong> of <span class="caps">RAM, </span>aka. <b>65536 pages * 4096KB = 268,435,456 bytes</b>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p65750"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code" id="p657code50"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># inside the OpenVZ VE</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>user_beancounters 
Version: <span style="color: #000000;">2.5</span>
       uid  resource                     held              maxheld              barrier                limit              failcnt
      <span style="color: #000000;">104</span>:  kmemsize                  <span style="color: #000000;">2406222</span>              <span style="color: #000000;">2873722</span>             <span style="color: #000000;">14372700</span>             <span style="color: #000000;">14790164</span>                    <span style="color: #000000;">0</span>
            lockedpages                     <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                  <span style="color: #000000;">256</span>                  <span style="color: #000000;">256</span>                    <span style="color: #000000;">0</span>
            privvmpages                 <span style="color: #000000;">45641</span>                <span style="color: #000000;">65547</span>                <span style="color: #000000;">65536</span>                <span style="color: #000000;">69632</span>                   <span style="color: #000000;">53</span>
            shmpages                        <span style="color: #000000;">1</span>                  <span style="color: #000000;">673</span>                <span style="color: #000000;">21504</span>                <span style="color: #000000;">21504</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            numproc                        <span style="color: #000000;">39</span>                   <span style="color: #000000;">46</span>                  <span style="color: #000000;">240</span>                  <span style="color: #000000;">240</span>                    <span style="color: #000000;">0</span>
            physpages                    <span style="color: #000000;">6694</span>                <span style="color: #000000;">20451</span>                    <span style="color: #000000;">0</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            vmguarpages                     <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                <span style="color: #000000;">33792</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            oomguarpages                 <span style="color: #000000;">6694</span>                <span style="color: #000000;">20451</span>                <span style="color: #000000;">26112</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            numtcpsock                      <span style="color: #000000;">7</span>                   <span style="color: #000000;">23</span>                  <span style="color: #000000;">360</span>                  <span style="color: #000000;">360</span>                    <span style="color: #000000;">0</span>
            numflock                        <span style="color: #000000;">9</span>                   <span style="color: #000000;">13</span>                  <span style="color: #000000;">188</span>                  <span style="color: #000000;">206</span>                    <span style="color: #000000;">0</span>
            numpty                          <span style="color: #000000;">1</span>                    <span style="color: #000000;">1</span>                   <span style="color: #000000;">16</span>                   <span style="color: #000000;">16</span>                    <span style="color: #000000;">0</span>
            numsiginfo                      <span style="color: #000000;">1</span>                    <span style="color: #000000;">4</span>                  <span style="color: #000000;">256</span>                  <span style="color: #000000;">256</span>                    <span style="color: #000000;">0</span>
            tcpsndbuf                  <span style="color: #000000;">122304</span>               <span style="color: #000000;">838656</span>              <span style="color: #000000;">1720320</span>              <span style="color: #000000;">2703360</span>                    <span style="color: #000000;">0</span>
            tcprcvbuf                  <span style="color: #000000;">114688</span>               <span style="color: #000000;">860544</span>              <span style="color: #000000;">1720320</span>              <span style="color: #000000;">2703360</span>                    <span style="color: #000000;">0</span>
            othersockbuf                <span style="color: #000000;">18560</span>                <span style="color: #000000;">84768</span>              <span style="color: #000000;">1126080</span>              <span style="color: #000000;">2097152</span>                    <span style="color: #000000;">0</span>
            dgramrcvbuf                     <span style="color: #000000;">0</span>                <span style="color: #000000;">13376</span>               <span style="color: #000000;">262144</span>               <span style="color: #000000;">262144</span>                    <span style="color: #000000;">0</span>
            numothersock                   <span style="color: #000000;">17</span>                   <span style="color: #000000;">24</span>                  <span style="color: #000000;">120</span>                  <span style="color: #000000;">120</span>                    <span style="color: #000000;">0</span>
            dcachesize                      <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>              <span style="color: #000000;">3409920</span>              <span style="color: #000000;">3624960</span>                    <span style="color: #000000;">0</span>
            numfile                       <span style="color: #000000;">865</span>                 <span style="color: #000000;">1179</span>                 <span style="color: #000000;">9312</span>                 <span style="color: #000000;">9312</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            numiptent                      <span style="color: #000000;">10</span>                   <span style="color: #000000;">10</span>                  <span style="color: #000000;">128</span>                  <span style="color: #000000;">128</span>                    <span style="color: #000000;">0</span></pre></td></tr></table></div>




<p>Using the command below increased the <strong><span class="caps">VE&#8217;</span>s</strong> memory from the default <strong>256MB</strong> to <strong>410MB</strong>. As an aside, I&#8217;ve never seen it mentioned on any blog/wiki/forum whatever, but you can specify the value to the <strong>&#8211;privvmpages</strong> arguement as either # pages, Gigabytes, Megabytes, or Kilobytes. I find this easier to use these than trying to calculate out the number of pages. In fact the only mention I&#8217;ve seen of these easier ways to specify them <span class="caps">RAM </span>is in <strong>vzctl&#8217;s man page</strong>. Guess it pays to read the man pages?</p>


<div class="wp_codebox"><table width="100%" ><tr id="p65751"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p657code51"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># outside the OpenVZ VE, aka. on the OpenVZ Host Node</span>
&nbsp;
vzctl <span style="color: #000000; font-weight: bold;">set</span> 104 <span style="color: #660033;">--privvmpages</span> 410m:450m <span style="color: #660033;">--save</span></pre></td></tr></table></div>




<p>Here is a snippet from the <strong>vzctl man page</strong>.</p>



<pre class="mediawiki">
...

You  can  also  specify  different  suffixes  for  set  parameters (except for the parameters which names start with num).  For example, vzctl set CTID
--privvmpages 5M:6M should set privvmpages' barrier to 5 megabytes and its limit to 6 megabytes.

Available suffixes are:
g, G -- gigabytes.
m, M -- megabytes.
k, K -- kilobytes.
p, P -- pages (page is 4096 bytes on x86 architecture, other architectures may differ).

You can also specify the literal word unlimited in place of a number.  In that case the corresponding value will be set to LONG_MAX, i. e.  the maximum
possible value.

...
</pre>



<p>So now the <strong>VE</strong> instance has <strong>104960 pages</strong> available aka. <strong>~410MB</strong>, with a barrier limit of <strong>~450MB</strong>, aka. <strong>115200 pages</strong>, and yum is happy.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p65752"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code" id="p657code52"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># inside the OpenVZ VE</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>user_beancounters 
Version: <span style="color: #000000;">2.5</span>
       uid  resource                     held              maxheld              barrier                limit              failcnt
      <span style="color: #000000;">104</span>:  kmemsize                  <span style="color: #000000;">2431123</span>              <span style="color: #000000;">2891301</span>             <span style="color: #000000;">14372700</span>             <span style="color: #000000;">14790164</span>                    <span style="color: #000000;">0</span>
            lockedpages                     <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                  <span style="color: #000000;">256</span>                  <span style="color: #000000;">256</span>                    <span style="color: #000000;">0</span>
            privvmpages                 <span style="color: #000000;">46320</span>                <span style="color: #000000;">74647</span>               <span style="color: #000000;">104960</span>               <span style="color: #000000;">115200</span>                   <span style="color: #000000;">54</span>
            shmpages                        <span style="color: #000000;">1</span>                  <span style="color: #000000;">673</span>                <span style="color: #000000;">21504</span>                <span style="color: #000000;">21504</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            numproc                        <span style="color: #000000;">39</span>                   <span style="color: #000000;">49</span>                  <span style="color: #000000;">240</span>                  <span style="color: #000000;">240</span>                    <span style="color: #000000;">0</span>
            physpages                    <span style="color: #000000;">7107</span>                <span style="color: #000000;">20451</span>                    <span style="color: #000000;">0</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            vmguarpages                     <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                <span style="color: #000000;">33792</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            oomguarpages                 <span style="color: #000000;">7107</span>                <span style="color: #000000;">20451</span>                <span style="color: #000000;">26112</span>  <span style="color: #000000;">9223372036854775807</span>                    <span style="color: #000000;">0</span>
            numtcpsock                      <span style="color: #000000;">7</span>                   <span style="color: #000000;">23</span>                  <span style="color: #000000;">360</span>                  <span style="color: #000000;">360</span>                    <span style="color: #000000;">0</span>
            numflock                        <span style="color: #000000;">9</span>                   <span style="color: #000000;">13</span>                  <span style="color: #000000;">188</span>                  <span style="color: #000000;">206</span>                    <span style="color: #000000;">0</span>
            numpty                          <span style="color: #000000;">1</span>                    <span style="color: #000000;">1</span>                   <span style="color: #000000;">16</span>                   <span style="color: #000000;">16</span>                    <span style="color: #000000;">0</span>
            numsiginfo                      <span style="color: #000000;">1</span>                    <span style="color: #000000;">4</span>                  <span style="color: #000000;">256</span>                  <span style="color: #000000;">256</span>                    <span style="color: #000000;">0</span>
            tcpsndbuf                  <span style="color: #000000;">122304</span>               <span style="color: #000000;">838656</span>              <span style="color: #000000;">1720320</span>              <span style="color: #000000;">2703360</span>                    <span style="color: #000000;">0</span>
            tcprcvbuf                  <span style="color: #000000;">114688</span>               <span style="color: #000000;">860544</span>              <span style="color: #000000;">1720320</span>              <span style="color: #000000;">2703360</span>                    <span style="color: #000000;">0</span>
            othersockbuf                <span style="color: #000000;">20880</span>                <span style="color: #000000;">84768</span>              <span style="color: #000000;">1126080</span>              <span style="color: #000000;">2097152</span>                    <span style="color: #000000;">0</span>
            dgramrcvbuf                     <span style="color: #000000;">0</span>                <span style="color: #000000;">13376</span>               <span style="color: #000000;">262144</span>               <span style="color: #000000;">262144</span>                    <span style="color: #000000;">0</span>
            numothersock                   <span style="color: #000000;">17</span>                   <span style="color: #000000;">24</span>                  <span style="color: #000000;">120</span>                  <span style="color: #000000;">120</span>                    <span style="color: #000000;">0</span>
            dcachesize                      <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>              <span style="color: #000000;">3409920</span>              <span style="color: #000000;">3624960</span>                    <span style="color: #000000;">0</span>
            numfile                       <span style="color: #000000;">873</span>                 <span style="color: #000000;">1179</span>                 <span style="color: #000000;">9312</span>                 <span style="color: #000000;">9312</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            dummy                           <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>                    <span style="color: #000000;">0</span>
            numiptent                      <span style="color: #000000;">10</span>                   <span style="color: #000000;">10</span>                  <span style="color: #000000;">128</span>                  <span style="color: #000000;">128</span>                    <span style="color: #000000;">0</span></pre></td></tr></table></div>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/657/increasing-ram-in-a-openvz-virtual-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting VMware 1.x Server Running on Fedora 10</title>
		<link>http://www.lamolabs.org/blog/605/getting-vmware-1x-server-running-on-fedora-10/</link>
		<comments>http://www.lamolabs.org/blog/605/getting-vmware-1x-server-running-on-fedora-10/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 05:40:24 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/605/getting-vmware-108-server-running-on-fedora-10/</guid>
		<description><![CDATA[<p>As part of the aftermath of my Fedora Core 6 laptop getting dropped, I needed to do several re-installs of key apps. One of the more critical ones was VMware Server 1.08. I&#8217;m not a big fan of the 2.x version of this product so I&#8217;d rather just continue using the 1.x version. </p>

<p>In what [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the aftermath of my <a href="http://www.fedoraproject.org/">Fedora Core 6</a> laptop getting dropped, I needed to do several re-installs of key apps. One of the more critical ones was <a href="http://www.vmware.com/products/server/">VMware Server 1.08</a>. I&#8217;m not a big fan of the <strong>2.x</strong> version of this product so I&#8217;d rather just continue using the <strong>1.x</strong> version. </p>

<p>In what has pretty much become the norm with VMware, every kernel upgrade, invariably breaks VMware.  Since I had previously been using <a href="http://www.fedoraproject.org/">Fedora Core 6</a>, a deprecated release, I hadn&#8217;t had a kernel update in a while, so I didn&#8217;t really have to deal with kernel churn. Now back on the bleeding edge with <a href="http://www.fedoraproject.org/">Fedora 10</a> I&#8217;m once again having to keep VMware Server working everytime a new kernel comes out.</p>

<p>So to start, I made sure I had the latest and greatest version of the <strong>1.x VMware Server</strong> branch. I prefer to work with <strong><span class="caps">RPM</span>s</strong>, so I grabbed the <span class="caps">RPM </span>version of the package. Upon installing it I ran into the following.</p>

<h5>1st install attempt</h5>


<div class="wp_codebox"><table width="100%" ><tr id="p60556"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code" id="p605code56"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## install vmware rpm</span>
<span style="color: #000000; font-weight: bold;">%</span> rpm <span style="color: #660033;">-ivh</span> VMware-server-1.0.8-126538.i386.rpm 
Preparing...                <span style="color: #666666; font-style: italic;">########################################### [100%]</span>
   <span style="color: #000000;">1</span>:VMware-server          <span style="color: #666666; font-style: italic;">########################################### [100%]</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># configure vmware</span>
<span style="color: #000000; font-weight: bold;">%</span> vmware-config.pl
...
...
Using 2.6.x kernel build system.
<span style="color: #c20cb9; font-weight: bold;">make</span>: Entering directory <span style="color: #000000; font-weight: bold;">`/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #ff0000;">'
make -C /lib/modules/2.6.27.19-170.2.35.fc10.i686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.19-170.2.35.fc10.i686'</span>
  CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.o
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>machine.h:<span style="color: #000000;">24</span>,
                 from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.h:<span style="color: #000000;">15</span>,
                 from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:<span style="color: #000000;">49</span>:
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>x86.h:<span style="color: #000000;">830</span>:<span style="color: #000000;">1</span>: warning: <span style="color: #ff0000;">&quot;PTE_PFN_MASK&quot;</span> redefined
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from include<span style="color: #000000; font-weight: bold;">/</span>asm<span style="color: #000000; font-weight: bold;">/</span>paravirt.h:7,
                 from include<span style="color: #000000; font-weight: bold;">/</span>asm<span style="color: #000000; font-weight: bold;">/</span>irqflags.h:55,
                 from include<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>irqflags.h:57,
                 from include<span style="color: #000000; font-weight: bold;">/</span>asm<span style="color: #000000; font-weight: bold;">/</span>system.h:11,
                 from include<span style="color: #000000; font-weight: bold;">/</span>asm<span style="color: #000000; font-weight: bold;">/</span>processor.h:17,
                 from include<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>prefetch.h:14,
                 from include<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>list.h:6,
                 from include<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>module.h:9,
                 from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:12:
include<span style="color: #000000; font-weight: bold;">/</span>asm<span style="color: #000000; font-weight: bold;">/</span>page.h:22:1: warning: this is the location of the previous definition
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>vmhost.h:13,
                 from <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:71:
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>compat_semaphore.h:5:27: error: asm<span style="color: #000000; font-weight: bold;">/</span>semaphore.h: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:146: error: unknown field ‘nopage’ specified <span style="color: #000000; font-weight: bold;">in</span> initializer
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:147: warning: initialization from incompatible pointer <span style="color: #7a0874; font-weight: bold;">type</span>
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:150: error: unknown field ‘nopage’ specified <span style="color: #000000; font-weight: bold;">in</span> initializer
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:151: warning: initialization from incompatible pointer <span style="color: #7a0874; font-weight: bold;">type</span>
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c: In <span style="color: #000000; font-weight: bold;">function</span> ‘LinuxDriver_Ioctl’:
<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.c:1670: error: too many arguments to <span style="color: #000000; font-weight: bold;">function</span> ‘smp_call_function’
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>2<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>driver.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 1
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>1<span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>_module_<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error 2
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>kernels<span style="color: #000000; font-weight: bold;">/</span>2.6.27.19-170.2.35.fc10.i686<span style="color: #ff0000;">'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config10/vmmon-only'</span>
Unable to build the vmmon module.
&nbsp;
For <span style="color: #c20cb9; font-weight: bold;">more</span> information on how to troubleshoot module-related problems, please 
visit our Web site at <span style="color: #ff0000;">&quot;http://www.vmware.com/download/modules/modules.html&quot;</span> and
<span style="color: #ff0000;">&quot;http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html&quot;</span>.
&nbsp;
Execution aborted.</pre></td></tr></table></div>




<p>Googling a bit produced this <a href="http://www.insecure.ws/2008/10/20/vmware-specific-specific-55x-and-kernel-2627">blog post</a> and <a href="http://fedorasolved.org/server-solutions/vmserver-install">this wiki post</a>. According to the blog post you need to apply the following patch set to <strong>VMware 1.08</strong> to get it to work with the newer <strong>2.6.27 kernels</strong>. Here&#8217;s a <a href="http://www.insecure.ws/warehouse/vmware-update-2.6.27-5.5.7-2.tar.gz">link to the original tarball of the patchset</a>, as well as a <a href="http://www.lamolabs.org/blog/wp-content/uploads/2009/03/vmware-update-2627-557-2tar.gz">link to a local copy</a> I have cached on my site.  </p>

<p><span id="more-605"></span></p>

<h5>Steps to download and unpack the patches</h5>


<div class="wp_codebox"><table width="100%" ><tr id="p60557"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p605code57"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## download patches</span>
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.insecure.ws<span style="color: #000000; font-weight: bold;">/</span>warehouse<span style="color: #000000; font-weight: bold;">/</span>vmware-update-2.6.27-5.5.7-2.tar.gz
&nbsp;
<span style="color: #666666; font-style: italic;">## unpack patches</span>
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf vmware-update-2.6.27-5.5.7-2.tar.gz 
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>services.sh
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>runme.pl
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>update.c
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>vmblock.tar
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>update
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>vmmon.tar
vmware-update-2.6.27-5.5.7-<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span>vmnet.tar</pre></td></tr></table></div>




<h5>Patch vmware</h5>

<p>Now we need to apply the patches to VMware and compile.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p60558"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
</pre></td><td class="code" id="p605code58"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## apply patches &amp; run vmware-config.pl</span>
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">cd</span> vmware-update-2.6.27-5.5.7-2
<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">perl</span> runme.pl
Updating <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmware-config.pl ... now patched
The <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>vmmon.tar that this script was about to 
<span style="color: #c20cb9; font-weight: bold;">install</span> already exists. Overwrite? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> 
&nbsp;
The <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>vmnet.tar that this script was about to 
<span style="color: #c20cb9; font-weight: bold;">install</span> already exists. Overwrite? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> 
&nbsp;
Updating <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmware ... No <span style="color: #c20cb9; font-weight: bold;">patch</span> needed<span style="color: #000000; font-weight: bold;">/</span>available
Updating <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmnet-bridge ... No <span style="color: #c20cb9; font-weight: bold;">patch</span> needed<span style="color: #000000; font-weight: bold;">/</span>available
Updating <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmware-vmx ... No <span style="color: #c20cb9; font-weight: bold;">patch</span> needed<span style="color: #000000; font-weight: bold;">/</span>available
Updating <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>bin-debug<span style="color: #000000; font-weight: bold;">/</span>vmware-vmx ... No <span style="color: #c20cb9; font-weight: bold;">patch</span> needed<span style="color: #000000; font-weight: bold;">/</span>available
VMware modules <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #ff0000;">&quot;/usr/lib/vmware/modules/source&quot;</span> has been updated.
&nbsp;
Before running VMware <span style="color: #000000; font-weight: bold;">for</span> the first <span style="color: #000000; font-weight: bold;">time</span> after update, you need to configure it 
<span style="color: #000000; font-weight: bold;">for</span> your running kernel by invoking the following <span style="color: #7a0874; font-weight: bold;">command</span>: 
<span style="color: #ff0000;">&quot;/usr/bin/vmware-config.pl&quot;</span>. Do you want this script to invoke the <span style="color: #7a0874; font-weight: bold;">command</span> <span style="color: #000000; font-weight: bold;">for</span> 
you now? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> 
&nbsp;
Making sure services <span style="color: #000000; font-weight: bold;">for</span> VMware Server are stopped.
&nbsp;
Stopping VMware services:
   Virtual machine monitor                                 <span style="color: #7a0874; font-weight: bold;">&#91;</span>  OK  <span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
You must <span style="color: #c20cb9; font-weight: bold;">read</span> and accept the End User License Agreement to continue.
Press enter to display it. 
...
...
<span style="color: #666666; font-style: italic;">### Skipping the EULA!</span>
...
...
Configuring fallback GTK+ 2.4 libraries.
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to <span style="color: #c20cb9; font-weight: bold;">install</span> the mime <span style="color: #7a0874; font-weight: bold;">type</span> icons? 
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>icons<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
&nbsp;
What directory contains your desktop menu entry files? These files have a 
.desktop <span style="color: #c20cb9; font-weight: bold;">file</span> extension. <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>applications<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to <span style="color: #c20cb9; font-weight: bold;">install</span> the application<span style="color: #ff0000;">'s icon? 
[/usr/share/pixmaps] 
&nbsp;
/usr/share/applications/vmware-server.desktop: warning: value &quot;vmware-server.png&quot; for key &quot;Icon&quot; in group &quot;Desktop Entry&quot; is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
/usr/share/applications/vmware-console-uri-handler.desktop: warning: value &quot;vmware-server.png&quot; for key &quot;Icon&quot; in group &quot;Desktop Entry&quot; is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
Trying to find a suitable vmmon module for your running kernel.
&nbsp;
None of the pre-built vmmon modules for VMware Server is suitable for your 
running kernel.  Do you want this program to try to build the vmmon module for 
your system (you need to have a C compiler installed on your system)? [yes] 
&nbsp;
Using compiler &quot;/usr/bin/gcc&quot;. Use environment variable CC to override.
&nbsp;
What is the location of the directory of C header files that match your running
kernel? 
[/lib/modules/2.6.27.19-170.2.35.fc10.i686/build/include] 
&nbsp;
Extracting the sources of the vmmon module.
&nbsp;
Building the vmmon module.
&nbsp;
Building for VMware Server 1.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config10/vmmon-only'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.27.19-170.2.35.fc10.i686<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>.. <span style="color: #007800;">SUBDIRS</span>=<span style="color: #007800;">$PWD</span> <span style="color: #007800;">SRCROOT</span>=<span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>. modules
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Entering directory <span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>kernels<span style="color: #000000; font-weight: bold;">/</span>2.6.27.19-170.2.35.fc10.i686<span style="color: #ff0000;">'
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/hostif.o
/tmp/vmware-config10/vmmon-only/linux/hostif.c: In function ‘HostIF_SetFastClockRate’:
/tmp/vmware-config10/vmmon-only/linux/hostif.c:3441: warning: passing argument 2 of ‘send_sig’ discards qualifiers from pointer target type
  CC [M]  /tmp/vmware-config10/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/task.o
cc1plus: warning: command line option &quot;-Werror-implicit-function-declaration&quot; is valid for C/ObjC but not for C++
cc1plus: warning: command line option &quot;-Wdeclaration-after-statement&quot; is valid for C/ObjC but not for C++
cc1plus: warning: command line option &quot;-Wno-pointer-sign&quot; is valid for C/ObjC but not for C++
cc1plus: warning: command line option &quot;-Wstrict-prototypes&quot; is valid for Ada/C/ObjC but not for C++
In file included from /tmp/vmware-config10/vmmon-only/common/task.c:1195:
/tmp/vmware-config10/vmmon-only/common/task_compat.h: In function ‘void Task_Switch_V45(VMDriver*, Vcpuid)’:
/tmp/vmware-config10/vmmon-only/common/task_compat.h:2667: warning: ‘sysenterState.SysenterStateV45::validEIP’ may be used uninitialized in this
function
/tmp/vmware-config10/vmmon-only/common/task_compat.h:2667: warning: ‘sysenterState.SysenterStateV45::cs’ may be used uninitialized in this function
/tmp/vmware-config10/vmmon-only/common/task_compat.h:2667: warning: ‘sysenterState.SysenterStateV45::rsp’ may be used uninitialized in this function
/tmp/vmware-config10/vmmon-only/common/task_compat.h:2667: warning: ‘sysenterState.SysenterStateV45::rip’ may be used uninitialized in this function
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciContext.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciDs.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciGroup.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciProcess.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciResource.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmciSharedMem.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-config10/vmmon-only/vmcore/compat.o
  CC [M]  /tmp/vmware-config10/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/vmware-config10/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: modpost: module vmmon.ko uses symbol '</span>init_mm<span style="color: #ff0000;">' marked UNUSED
  CC      /tmp/vmware-config10/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/vmware-config10/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.27.19-170.2.35.fc10.i686'</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-f</span> vmmon.ko .<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>vmmon.o
<span style="color: #c20cb9; font-weight: bold;">make</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmmon-only<span style="color: #ff0000;">'
The module loads perfectly in the running kernel.
&nbsp;
Do you want networking for your virtual machines? (yes/no/help) [yes] 
Configuring a bridged network for vmnet0.
&nbsp;
Your computer has multiple ethernet network interfaces available: eth0, pan0, 
wlan0. Which one do you want to bridge to vmnet0? [eth0] 
&nbsp;
The following bridged networks have been defined:
&nbsp;
. vmnet0 is bridged to eth0
&nbsp;
Do you wish to configure another bridged network? (yes/no) [no] 
&nbsp;
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] 
&nbsp;
Configuring a NAT network for vmnet8.
&nbsp;
Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 
&nbsp;
Probing for an unused private subnet (this can take some time)...
&nbsp;
The subnet 172.16.244.0/255.255.255.0 appears to be unused.
&nbsp;
The following NAT networks have been defined:
&nbsp;
. vmnet8 is a NAT network on private subnet 172.16.244.0.
&nbsp;
Do you wish to configure another NAT network? (yes/no) [no] 
&nbsp;
Do you want to be able to use host-only networking in your virtual machines? 
[yes] 
&nbsp;
Configuring a host-only network for vmnet1.
&nbsp;
Do you want this program to probe for an unused private subnet? (yes/no/help) 
[yes] 
&nbsp;
Probing for an unused private subnet (this can take some time)...
&nbsp;
The subnet 172.16.124.0/255.255.255.0 appears to be unused.
&nbsp;
The following host-only networks have been defined:
&nbsp;
. vmnet1 is a host-only network on private subnet 172.16.124.0.
&nbsp;
Do you wish to configure another host-only network? (yes/no) [no] 
&nbsp;
Extracting the sources of the vmnet module.
&nbsp;
Building the vmnet module.
&nbsp;
Building for VMware Server 1.0.0.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config10/vmnet-only'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.27.19-170.2.35.fc10.i686<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>.. <span style="color: #007800;">SUBDIRS</span>=<span style="color: #007800;">$PWD</span> <span style="color: #007800;">SRCROOT</span>=<span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>. modules
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Entering directory <span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>kernels<span style="color: #000000; font-weight: bold;">/</span>2.6.27.19-170.2.35.fc10.i686<span style="color: #ff0000;">'
  CC [M]  /tmp/vmware-config10/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config10/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config10/vmnet-only/userif.o
  CC [M]  /tmp/vmware-config10/vmnet-only/netif.o
  CC [M]  /tmp/vmware-config10/vmnet-only/bridge.o
  CC [M]  /tmp/vmware-config10/vmnet-only/filter.o
  CC [M]  /tmp/vmware-config10/vmnet-only/procfs.o
  CC [M]  /tmp/vmware-config10/vmnet-only/smac_compat.o
  CC [M]  /tmp/vmware-config10/vmnet-only/smac_linux.x386.o
  LD [M]  /tmp/vmware-config10/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: modpost: missing MODULE_LICENSE() in /tmp/vmware-config10/vmnet-only/vmnet.o
see include/linux/module.h for more information
  CC      /tmp/vmware-config10/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/vmware-config10/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.27.19-170.2.35.fc10.i686'</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-f</span> vmnet.ko .<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>vmnet.o
<span style="color: #c20cb9; font-weight: bold;">make</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config10<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #ff0000;">'
The module loads perfectly in the running kernel.
&nbsp;
Please specify a port for remote console connections to use [904] 
&nbsp;
WARNING: VMware Server has been configured to run on a port different from the 
default port. Remember to use this port when connecting to this server.
Stopping xinetd:                                           [FAILED]
Starting xinetd:                                           [  OK  ]
Configuring the VMware VmPerl Scripting API.
&nbsp;
Building the VMware VmPerl Scripting API.
&nbsp;
Using compiler &quot;/usr/bin/gcc&quot;. Use environment variable CC to override.
&nbsp;
Installing the VMware VmPerl Scripting API.
&nbsp;
The installation of the VMware VmPerl Scripting API succeeded.
&nbsp;
Generating SSL Server Certificate
&nbsp;
In which directory do you want to keep your virtual machine files? 
[/var/lib/vmware/Virtual Machines] 
&nbsp;
The path &quot;/var/lib/vmware/Virtual Machines&quot; does not exist currently. This 
program is going to create it, including needed parent directories. Is this 
what you want? [yes] 
&nbsp;
Please enter your 20-character serial number.
&nbsp;
Type XXXXX-XXXXX-XXXXX-XXXXX or '</span>Enter<span style="color: #ff0000;">' to cancel:  
&nbsp;
You cannot power on any virtual machines until you enter a valid serial number.
To enter the serial number, run this configuration program again, or choose 
'</span>Help <span style="color: #000000; font-weight: bold;">&gt;</span> Enter Serial Number<span style="color: #ff0000;">' in the virtual machine console.
&nbsp;
Starting VMware services:
   Virtual machine monitor                                 [  OK  ]
   Virtual ethernet                                        [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Host-only networking on /dev/vmnet1 (background)        [  OK  ]
   Host-only networking on /dev/vmnet8 (background)        [  OK  ]
   NAT service on /dev/vmnet8                              [  OK  ]
&nbsp;
The configuration of VMware Server 1.0.8 build-126538 for Linux for this 
running kernel completed successfully.</span></pre></td></tr></table></div>




<p>And with that VMware server should be installed on Fedora 10!</p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/3132/broken-arrow-keys-during-an-ubuntu-9-04-install-on-vmware-server-1-x/" rel="bookmark" class="wherego_title">Broken Arrow Keys during an Ubuntu 9.04 install on Vmware Server 1.X</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/605/getting-vmware-1x-server-running-on-fedora-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting CUPS and OpenVZ to Play Nice on CentOS 5</title>
		<link>http://www.lamolabs.org/blog/473/getting-cups-openvz-play-nice-centos5/</link>
		<comments>http://www.lamolabs.org/blog/473/getting-cups-openvz-play-nice-centos5/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 04:08:09 +0000</pubDate>
		<dc:creator>slmingol</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.lamolabs.org/blog/?p=473</guid>
		<description><![CDATA[<p>Recently I was trying to get one of my OpenVZ instances to host a CUPS service for my entire domain. In order to do this the VE instance needs to know about the device files under /dev that relate to the printers I wanted to share. The device files I needed to share were for [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was trying to get one of my <a href="http://www.openvz.org/">OpenVZ</a> instances to host a <a href="http://cups.org/"><span class="caps">CUPS</span></a> service for my entire domain. In order to do this the <strong><acronym title="Virtual Environment">VE</acronym></strong> instance needs to know about the device files under /dev that relate to the printers I wanted to share. The device files I needed to share were for 2 <strong><span class="caps">USB </span>printers</strong>. So I put the script below together to figure out what the current files are for the 2 <span class="caps">USB </span>printers on the <strong><acronym title="Host Node">HN</acronym></strong> and then create the necessary files within the VE and update the VE instance through the <em><strong>vzctl &#8211;details</strong></em> switch to reflect the devices for the printers.</p>

<p><strong><span class="caps">NOTE</span>:</strong> Some of the info on the OpenVZ wiki <a href="http://wiki.openvz.org/USB_Printing_in_VE">here</a> offered some helpful guidance.</p>

<h5>lsusb output</h5>


<div class="wp_codebox"><table width="100%" ><tr id="p47362"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p473code62"><pre class="bash" style="font-family:monospace;">Bus 004 Device 008: ID 04f9:000d Brother Industries, Ltd HL-<span style="color: #000000;">1440</span> Laser Printer
Bus 004 Device 004: ID 04a9:<span style="color: #000000;">1069</span> Canon, Inc. S820</pre></td></tr></table></div>




<p>I was interested in adding these 2 devices so I used their <strong>ID &#8230;.</strong> strings to uniquely identify them from reboot to reboot. They&#8217;re identified in the <strong>$filterDevices</strong> variable in the <strong>add_usb_devices_to_ve.sh</strong> script below.</p>

<p><span id="more-473"></span></p>

<h5>Adding the <span class="caps">USB </span>device files to the VE</h5>

<p>Here is the script I wrote to accomplish this, <strong>add_usb_devices_to_ve.sh</strong>.</p>


<div class="wp_codebox"><table width="100%" ><tr id="p47363"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
</pre></td><td class="code" id="p473code63"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Sample output from lsusb command</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#Bus 004 Device 008: ID 04f9:000d Brother Industries, Ltd HL-1440 Laser Printer</span>
<span style="color: #666666; font-style: italic;">#Bus 004 Device 004: ID 04a9:1069 Canon, Inc. S820</span>
<span style="color: #666666; font-style: italic;">#Bus 004 Device 001: ID 0000:0000  </span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Sample output from /dev/bus/usb/&lt;Bus 004&gt; directory</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#crw-r--r-- 1 root root 189, 384 Mar 14 01:08 001</span>
<span style="color: #666666; font-style: italic;">#crw-r--r-- 1 root root 189, 387 Mar 14 02:53 004</span>
<span style="color: #666666; font-style: italic;">#crw-r--r-- 1 root root 189, 391 Mar 14 13:01 008</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### /dev directories</span>
<span style="color: #007800;">usbDevDir</span>=<span style="color: #ff0000;">&quot;/dev/usb&quot;</span>
<span style="color: #007800;">usbBusDir</span>=<span style="color: #ff0000;">&quot;/dev/bus/usb&quot;</span>
<span style="color: #666666; font-style: italic;">### device ID's to add to our VE</span>
<span style="color: #007800;">filterDevices</span>=<span style="color: #ff0000;">&quot;04f9:000d|04a9:1069&quot;</span>
<span style="color: #007800;">lsusbOutput</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`lsusb | egrep \&quot;$filterDevices\&quot;`</span>&quot;</span>
<span style="color: #666666; font-style: italic;">### VE</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-ne</span> 1 <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>USAGE: $0 &lt;VE #&gt;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>;
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #007800;">ve</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### change field separator to end-of-line</span>
<span style="color: #007800;">ORIGIFS</span>=<span style="color: #007800;">$IFS</span>
<span style="color: #007800;">IFS</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-en</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>\b&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### mknod's under /dev/usb</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">idx</span>=0
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>### Setup usb devices under <span style="color: #007800;">$usbDevDir</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">for</span> line <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$lsusbOutput</span>; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #666666; font-style: italic;">#sample $line: Bus 004 Device 004: ID 04a9:1069 Canon, Inc. S820</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Found device ===&gt; <span style="color: #007800;">$line</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
&nbsp;
  <span style="color: #007800;">usbBus</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $line | awk '{print $2}'`</span>&quot;</span>                  <span style="color: #666666; font-style: italic;"># 004</span>
  <span style="color: #007800;">usbDev</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $line | awk '{print $4}' | sed 's/:$//'`</span>&quot;</span>   <span style="color: #666666; font-style: italic;"># 004</span>
  <span style="color: #007800;">lpDev</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${usbDevDir}</span>/lp<span style="color: #007800;">${idx}</span>&quot;</span>                             <span style="color: #666666; font-style: italic;"># /dev/usb/lp&lt;#&gt;</span>
&nbsp;
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; * Populating VE <span style="color: #007800;">$ve</span> /dev directory with device files&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;mkdir -p <span style="color: #007800;">$usbDevDir</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;[ -f <span style="color: #007800;">$lpDev</span> ] || mknod <span style="color: #007800;">$lpDev</span> c 180 <span style="color: #007800;">$idx</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;chown root:lp <span style="color: #007800;">$lpDev</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;chmod 660 <span style="color: #007800;">$lpDev</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;[ -f /dev/usblp<span style="color: #007800;">${idx}</span> ] || ln -s <span style="color: #007800;">$lpDev</span> /dev/usblp<span style="color: #007800;">${idx}</span>&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; * Configuring VE <span style="color: #007800;">$ve</span> using vzctl's --devices switch&quot;</span>
  vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">$ve</span> <span style="color: #660033;">--devices</span> c:<span style="color: #000000;">180</span>:<span style="color: #800000;">${idx}</span>:rw
  <span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #007800;">idx</span>=idx+1
<span style="color: #000000; font-weight: bold;">done</span>;
&nbsp;
<span style="color: #666666; font-style: italic;">### mknod's under /dev/bus/usb/&lt;Bus #&gt;</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">usbBusNumDir</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${usbBusDir}</span>/<span style="color: #007800;">${usbBus}</span>&quot;</span>             <span style="color: #666666; font-style: italic;"># /dev/bus/usb/004</span>
<span style="color: #007800;">lsOutput</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`ls -l $usbBusNumDir | grep -v total`</span>&quot;</span>  <span style="color: #666666; font-style: italic;"># contents of /dev/bus/usb/004</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>### Setup usb devices under <span style="color: #007800;">$usbBusNumDir</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">for</span> line <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$lsOutput</span>; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #666666; font-style: italic;">#sample $line: crw-r--r-- 1 root root 189, 384 Mar 14 01:08 001</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Found device ==&gt; <span style="color: #007800;">$line</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
&nbsp;
  <span style="color: #007800;">majorNum</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $line | awk '{print $5}' | sed 's/,//'`</span>&quot;</span>  <span style="color: #666666; font-style: italic;"># 189</span>
  <span style="color: #007800;">minorNum</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $line | awk '{print $6}'`</span>&quot;</span>                <span style="color: #666666; font-style: italic;"># 384</span>
  <span style="color: #007800;">usbDev</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`echo $line | awk '{print $NF}'`</span>&quot;</span>                 <span style="color: #666666; font-style: italic;"># 001</span>
  <span style="color: #007800;">usbNumDir</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${usbBusNumDir}</span>/<span style="color: #007800;">${usbDev}</span>&quot;</span>                     <span style="color: #666666; font-style: italic;"># /dev/bus/usb/004/001</span>
&nbsp;
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; * Populating VE <span style="color: #007800;">$ve</span> /dev directory with device files&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;mkdir -p <span style="color: #007800;">$usbBusNumDir</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;[ -f <span style="color: #007800;">$usbNumDir</span> ] || mknod <span style="color: #007800;">$usbNumDir</span> c <span style="color: #007800;">$majorNum</span> <span style="color: #007800;">$minorNum</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;chown root:root <span style="color: #007800;">$usbNumDir</span>&quot;</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$ve</span> <span style="color: #ff0000;">&quot;chmod 664 <span style="color: #007800;">$usbNumDir</span>&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; * Configuring VE <span style="color: #007800;">$ve</span> using vzctl's --devices switch&quot;</span>
  vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">$ve</span> <span style="color: #660033;">--devices</span> c:<span style="color: #800000;">${majorNum}</span>:<span style="color: #800000;">${minorNum}</span>:rw
<span style="color: #000000; font-weight: bold;">done</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># change field separator back to it's default (i.e. single space)</span>
<span style="color: #007800;">IFS</span>=<span style="color: #007800;">$ORIGIFS</span></pre></td></tr></table></div>




<h5>Changes to /etc/rc.local on the HN</h5>


<div class="wp_codebox"><table width="100%" ><tr id="p47364"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p473code64"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># add device files for usb printers to print.bubba.net instance (#103) &amp; restart cups </span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>add_usb_devices_to_ve.sh 103 
vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">103</span> <span style="color: #ff0000;">&quot;/etc/init.d/cups restart&quot;</span></pre></td></tr></table></div>




<p>Now every time the HN is rebooted the VE instance will get started up with <span class="caps">CUPS </span>sharing the printers.</p><div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.lamolabs.org/blog/439/cooking-basics/" rel="bookmark" class="wherego_title">Cooking Basics</a></li><li><a href="http://www.lamolabs.org/blog/492/delicious-bookmarks-for-march-15th-through-march-16th/" rel="bookmark" class="wherego_title">Delicious Bookmarks for March 15th through March 16th</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.lamolabs.org/blog/473/getting-cups-openvz-play-nice-centos5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
