<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Xen – Yeri Tiete</title>
    <link>https://yeri.be/tag/xen/</link>
    <description>Yeri Tiete&#39;s blog</description>
    <language>en</language>
    <copyright>© Yeri Tiete</copyright>
    <lastBuildDate>Sat, 14 Jun 2014 18:43:03 +0200</lastBuildDate>
    <atom:link href="https://yeri.be/tag/xen/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Wheezy Xen Dom0 &amp; RAM</title>
      <link>https://yeri.be/wheezy-xen-dom0-ram/</link>
      <pubDate>Sat, 14 Jun 2014 18:43:03 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/wheezy-xen-dom0-ram/</guid>
      <description>&lt;p&gt;Note to self: &amp;lt;1Gb of RAM on a Dom0 Wheezy server causes kernel panics.&lt;/p&gt;&#xA;&lt;p&gt;Using 2Gb of RAM seems to do the trick.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Note to self: &lt;1Gb of RAM on a Dom0 Wheezy server causes kernel panics.</p>
<p>Using 2Gb of RAM seems to do the trick.</p>
]]></content:encoded>
      <category>errors</category><category>hardware</category><category>linux</category><category>software</category><category>virtualisation</category>
      <category>debian</category><category>xen</category>
    </item>
    
    <item>
      <title>Xen: NAT and Bridging</title>
      <link>https://yeri.be/xen-nat-and-bridging/</link>
      <pubDate>Sun, 04 Dec 2011 21:41:54 +0100</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/xen-nat-and-bridging/</guid>
      <description>&lt;p&gt;Because dom0 was running NAT, and I needed bridging;&lt;/p&gt;&#xA;&lt;p&gt;Debian network file (/etc/network/interfaces):&lt;/p&gt;&#xA;&lt;pre&gt;iface eth3 inet manual&#xA;&#xA;auto xenbr0&#xA;iface xenbr0 inet static&#xA;        bridge_ports eth3&#xA;        address 10.19.86.1&#xA;        broadcast 10.19.86.255&#xA;        netmask 255.255.255.0&lt;/pre&gt;&#xA;&lt;p&gt;&lt;span class=&#34;Apple-style-span&#34; style=&#34;font-family: Georgia, &#39;Times New Roman&#39;, &#39;Bitstream Charter&#39;, Times, serif; font-size: 13px; line-height: 19px; white-space: normal;&#34;&gt;NAT is running on eth2, bridging on eth3 (/etc/xen/xend-config.sxp):&lt;/span&gt;&lt;/p&gt;&#xA;&lt;pre&gt;(network-script &#39;network-nat netdev=eth2&#39;)&lt;/pre&gt;&#xA;&lt;p&gt;Now, for the VM configs:&lt;/p&gt;&#xA;&lt;p&gt;NAT:&lt;/p&gt;&#xA;&lt;pre&gt;vif         = [ &#39;ip=172.16.1.12,mac=00:16:3E:5E:0D:1A&#39; ]&lt;/pre&gt;&#xA;&lt;p&gt;Bridge:&lt;/p&gt;&#xA;&lt;pre&gt;vif         = [ &#39;ip=85.12.6.178,mac=00:16:3E:1D:F5:6C,script=vif-bridge,bridge=xenbr0&#39; ]&lt;/pre&gt;&#xA;&lt;p&gt;It&amp;rsquo;s magic and it works! ;)&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Because dom0 was running NAT, and I needed bridging;</p>
<p>Debian network file (/etc/network/interfaces):</p>
<pre>iface eth3 inet manual

auto xenbr0
iface xenbr0 inet static
        bridge_ports eth3
        address 10.19.86.1
        broadcast 10.19.86.255
        netmask 255.255.255.0</pre>
<p><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;">NAT is running on eth2, bridging on eth3 (/etc/xen/xend-config.sxp):</span></p>
<pre>(network-script 'network-nat netdev=eth2')</pre>
<p>Now, for the VM configs:</p>
<p>NAT:</p>
<pre>vif         = [ 'ip=172.16.1.12,mac=00:16:3E:5E:0D:1A' ]</pre>
<p>Bridge:</p>
<pre>vif         = [ 'ip=85.12.6.178,mac=00:16:3E:1D:F5:6C,script=vif-bridge,bridge=xenbr0' ]</pre>
<p>It&rsquo;s magic and it works! ;)</p>
]]></content:encoded>
      <category>linux</category><category>networking</category>
      <category>xen</category>
    </item>
    
    <item>
      <title>Xen: iptables issue</title>
      <link>https://yeri.be/xen-iptables-issue/</link>
      <pubDate>Sat, 23 Oct 2010 02:06:36 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/xen-iptables-issue/</guid>
      <description>&lt;pre&gt;vm3:/# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination 85.12.6.173:8180&#xA;WARNING: Could not open &#39;kernel/net/netfilter/x_tables.ko&#39;: No such file or directory&#xA;FATAL: Could not open &#39;kernel/net/ipv4/netfilter/ip_tables.ko&#39;: No such file or directory&#xA;iptables v1.4.2: can&#39;t initialize iptables table `filter&#39;: iptables who? (do you need to insmod?)&#xA;Perhaps iptables or your kernel needs to be upgraded.&lt;/pre&gt;&#xA;&lt;p&gt;Solution:&lt;/p&gt;&#xA;&lt;pre&gt;vm3:/# depmod&#xA;vm3:/# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination 85.12.6.173:8180&lt;/pre&gt;&#xA;&lt;p&gt;All ok :)&lt;/p&gt;</description>
      <content:encoded><![CDATA[<pre>vm3:/# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination 85.12.6.173:8180
WARNING: Could not open 'kernel/net/netfilter/x_tables.ko': No such file or directory
FATAL: Could not open 'kernel/net/ipv4/netfilter/ip_tables.ko': No such file or directory
iptables v1.4.2: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.</pre>
<p>Solution:</p>
<pre>vm3:/# depmod
vm3:/# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j DNAT --to-destination 85.12.6.173:8180</pre>
<p>All ok :)</p>
]]></content:encoded>
      <category>linux</category><category>software</category><category>virtualisation</category>
      <category>xen</category>
    </item>
    
    <item>
      <title>Xen: PTY allocation request failed</title>
      <link>https://yeri.be/xen-pty-allocation-request-failed/</link>
      <pubDate>Thu, 21 Oct 2010 01:37:21 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/xen-pty-allocation-request-failed/</guid>
      <description>&lt;pre&gt;$ ssh vm3.rootspirit.com -l root&#xA;root@vm3.rootspirit.com&#39;s password:&#xA;PTY allocation request failed on channel 0&#xA;stdin: is not a tty&lt;/pre&gt;&#xA;&lt;div&gt;Solution:&lt;/div&gt;&#xA;Kill the DomU (xm console *might* work, but somehow rarely works for me).&#xA;&lt;pre&gt;mkdir /tmp/disk&#xA;mount /path/to/disk.img /tmp/disk&#xA;chroot /tmp/disk /bin/bash&lt;/pre&gt;&#xA;=&amp;gt; in chroot env&#xA;&lt;pre&gt;nano -w /etc/fstab&lt;/pre&gt;&#xA;And add (though this is probably not needed):&#xA;&lt;pre&gt;none            /dev/pts      devpts    defaults        0   0&lt;/pre&gt;&#xA;And install udev:&#xA;&lt;pre&gt;apt-get install udev&lt;/pre&gt;&#xA;Clean up, and restart DomU&#xA;&lt;pre&gt;exit&#xA;umount /tmp/disk&#xA;xm create /path/to/xen/vm.cfg&lt;/pre&gt;&#xA;Should do the trick. :)</description>
      <content:encoded><![CDATA[<pre>$ ssh vm3.rootspirit.com -l root
root@vm3.rootspirit.com's password:
PTY allocation request failed on channel 0
stdin: is not a tty</pre>
<div>Solution:</div>
Kill the DomU (xm console *might* work, but somehow rarely works for me).
<pre>mkdir /tmp/disk
mount /path/to/disk.img /tmp/disk
chroot /tmp/disk /bin/bash</pre>
=&gt; in chroot env
<pre>nano -w /etc/fstab</pre>
And add (though this is probably not needed):
<pre>none            /dev/pts      devpts    defaults        0   0</pre>
And install udev:
<pre>apt-get install udev</pre>
Clean up, and restart DomU
<pre>exit
umount /tmp/disk
xm create /path/to/xen/vm.cfg</pre>
Should do the trick. :)
]]></content:encoded>
      <category>errors</category><category>linux</category><category>software</category><category>virtualisation</category>
      <category>xen</category>
    </item>
    
    <item>
      <title>Xen: Failed to find an unused loop device</title>
      <link>https://yeri.be/xen-failed-to-find-an-unused-loop-device/</link>
      <pubDate>Wed, 20 Oct 2010 01:21:18 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/xen-failed-to-find-an-unused-loop-device/</guid>
      <description>&lt;p&gt;I had to start a new Xen domU this afternoon,&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;xm create vm#.domain&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;But this resulted in following error:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Error: Device 5632 (vbd) could not be connected.&#xA;Failed to find an unused loop device&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Solution:&lt;/p&gt;&#xA;&lt;p&gt;Create &lt;code&gt;/etc/modprobe.d/local-loop.conf&lt;/code&gt; with this content:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;options loop max_loop=64&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Turn off all DomUs, yes, bummer. You&amp;rsquo;ll need to reload the loop module which won&amp;rsquo;t work if Xen is still using them. &lt;code&gt;xm list&lt;/code&gt; should only display Domain-0.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I had to start a new Xen domU this afternoon,</p>
<p><code>xm create vm#.domain</code></p>
<p>But this resulted in following error:</p>
<p><code>Error: Device 5632 (vbd) could not be connected.
Failed to find an unused loop device</code></p>
<p>Solution:</p>
<p>Create <code>/etc/modprobe.d/local-loop.conf</code> with this content:</p>
<p><code>options loop max_loop=64</code></p>
<p>Turn off all DomUs, yes, bummer. You&rsquo;ll need to reload the loop module which won&rsquo;t work if Xen is still using them. <code>xm list</code> should only display Domain-0.</p>
<p><code>modprobe -r loop &amp;&amp; modprobe loop</code></p>
<p>And restart all DomUs. You can now create 32 (64/2 ~= # of DomUs; increase if you need more) DomUs.</p>
<p>You can check (before &amp; after) the difference in loop back devices: <code>ls -ls /dev | grep loop | wc -l</code></p>
]]></content:encoded>
      <category>errors</category><category>linux</category><category>software</category><category>virtualisation</category>
      <category>xen</category>
    </item>
    
  </channel>
</rss>
