<?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>Samuel's HQ &#187; Geeky Linux fr</title>
	<atom:link href="http://samuel.happycoders.org/category/francais/geeky-linux-fr/feed/" rel="self" type="application/rss+xml" />
	<link>http://samuel.happycoders.org</link>
	<description>A french/american blog with some hungarian spices...</description>
	<lastBuildDate>Sun, 27 Nov 2011 02:53:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu 11.10 avec KVM sur dedibox</title>
		<link>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/</link>
		<comments>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 02:13:14 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Francais]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[Geeky Linux fr]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/?p=194</guid>
		<description><![CDATA[La plupart des hebergeurs interdisent d&#8217;utiliser le mode bridge pour hoster des VMs sur un serveur. Les hebergeurs veulent limiter le nombre d&#8217;adresses mac sur leur reseaux car les tables macs des switchs sont limitees en taille (sur un catalyst 6500, 128,000 macs par example). Si les machines  [...]]]></description>
			<content:encoded><![CDATA[<p>La plupart des hebergeurs interdisent d&#8217;utiliser le mode bridge pour hoster des VMs sur un serveur. Les hebergeurs veulent limiter le nombre d&#8217;adresses mac sur leur reseaux car les tables macs des switchs sont limitees en taille (sur un catalyst 6500, 128,000 macs par example). Si les machines hebergees utilisent un mode bridge, le nombre de mac peut rapidement exploser&#8230; nb_mac = nb_machines * nb_vms&#8230; Pour se proteger, les hebergeurs utilisent <a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/port_sec.html" target="_blank">port-security</a>, et le switch automatiquement bloque le port si il detecte du traffic en provenance de plusieurs Mac.<br />
Conclusion, il faut faire attention&#8230;</p>
<p><span id="more-194"></span></p>
<p>Voici les etapes a suivre pour configurer une machine HOST avec 2 VMs GUEST en utilisant ubuntu 11.10 et kvm en mode route.</p>
<p><strong>Modifiez votre /etc/network/interfaces</strong></p>
<p>Configurez l&#8217;ip physique de la machine et creez des bridge.  Le plus important est la derniere ligne, vous devez activez le proxy_arp sur votre interface physique. Cela permet a la machine HOST de repondre au ARP request venant du reseau pour les VMs (donc seulement la mac physique est annoncee et ce pour l&#8217;IP HOST et les IPs des VMs).</p>
<pre class="perl"><span style="color: #808080; font-style: italic;"># The loopback network interface</span>
auto lo
iface lo inet loopback
&nbsp;
<span style="color: #808080; font-style: italic;"># The primary network interface</span>
auto eth0
iface eth0 inet static
        address IP_HOST_FIXME
        netmask <span style="color: #cc66cc;">255.255</span><span style="color: #cc66cc;">.255</span><span style="color: #cc66cc;">.0</span>
        network NETWORK_FIXME
        broadcast BROADCAST_FIXME
        gateway GATEWAY_FIXME
        <span style="color: #808080; font-style: italic;"># create dummy interfaces</span>
        up /sbin/ifconfig dummy0 up
        up /sbin/ifconfig dummy1 up
        <span style="color: #808080; font-style: italic;"># create the bridges</span>
        up /sbin/brctl addbr bridge0
        up /sbin/brctl addbr bridge1
        <span style="color: #808080; font-style: italic;"># add the interfaces to the bridges</span>
        up /sbin/brctl addif bridge0 dummy0
        up /sbin/brctl addif bridge1 dummy1
        <span style="color: #808080; font-style: italic;"># bringup the bridges</span>
        up /sbin/ifconfig bridge0 up
        up /sbin/ifconfig bridge1 up
        <span style="color: #808080; font-style: italic;"># add the routes</span>
        up /sbin/route add IP_VM_1_FIXME dev bridge0
        up /sbin/route add IP_VM_2_FIXME dev bridge1
        <span style="color: #808080; font-style: italic;"># the most important!</span>
        up /sbin/sysctl -w net.ipv4.conf.eth0.proxy_arp=<span style="color: #cc66cc;">1</span>
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/interfaces.txt">interfaces.txt</a></p>
<p>Je pense qu&#8217;il doit etre possible de n&#8217;utiliser qu&#8217;un bridge, mais je n&#8217;ai pas tente.</p>
<p><strong>Activez IP forwarding</strong></p>
<p>Editez /etc/sysctl.conf et modifiez la ligne</p>
<blockquote><p># Uncomment the next line to enable packet forwarding for IPv4<br />
net.ipv4.ip_forward=1</p></blockquote>
<p><strong>Creez la configuration virsh pour vos VM</strong></p>
<p>Creez un fichier xml comme le suivant:</p>
<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;domain</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'kvm'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>ubuntu<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;memory<span style="font-weight: bold; color: black;">&gt;</span></span></span>8388608<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/memory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;currentMemory<span style="font-weight: bold; color: black;">&gt;</span></span></span>8388608<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/currentMemory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;vcpu<span style="font-weight: bold; color: black;">&gt;</span></span></span>4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/vcpu<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;os<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;type</span> <span style="color: #000066;">arch</span>=<span style="color: #ff0000;">'x86_64'</span> <span style="color: #000066;">machine</span>=<span style="color: #ff0000;">'pc-0.14'</span><span style="font-weight: bold; color: black;">&gt;</span></span>hvm<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/type<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;boot</span> <span style="color: #000066;">dev</span>=<span style="color: #ff0000;">'hd'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/os<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;features<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;acpi</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/features<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;clock</span> <span style="color: #000066;">offset</span>=<span style="color: #ff0000;">'utc'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_poweroff<span style="font-weight: bold; color: black;">&gt;</span></span></span>destroy<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_poweroff<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_reboot<span style="font-weight: bold; color: black;">&gt;</span></span></span>restart<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_reboot<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_crash<span style="font-weight: bold; color: black;">&gt;</span></span></span>destroy<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_crash<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;devices<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;emulator<span style="font-weight: bold; color: black;">&gt;</span></span></span>/usr/bin/kvm<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/emulator<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;disk</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'file'</span> <span style="color: #000066;">device</span>=<span style="color: #ff0000;">'disk'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;driver</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">'qemu'</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'qcow2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">'/srv/ubuntu.qcow2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">dev</span>=<span style="color: #ff0000;">'hda'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'ide'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'drive'</span> <span style="color: #000066;">controller</span>=<span style="color: #ff0000;">'0'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0'</span> <span style="color: #000066;">unit</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/disk<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;controller</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'ide'</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x01'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/controller<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interface</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'bridge'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mac</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">'FIXME_MAC_GENERATED'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source</span> <span style="color: #000066;">bridge</span>=<span style="color: #ff0000;">'bridge0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;model</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'virtio'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x03'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/interface<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;serial</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pty'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/serial<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;console</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pty'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'serial'</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/console<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'mouse'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'ps2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;graphics</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'vnc'</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'-1'</span> <span style="color: #000066;">autoport</span>=<span style="color: #ff0000;">'yes'</span> <span style="color: #000066;">listen</span>=<span style="color: #ff0000;">'127.0.0.1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;video<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;model</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'cirrus'</span> <span style="color: #000066;">vram</span>=<span style="color: #ff0000;">'9216'</span> <span style="color: #000066;">heads</span>=<span style="color: #ff0000;">'1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x02'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/video<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;memballoon</span> <span style="color: #000066;">model</span>=<span style="color: #ff0000;">'virtio'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x04'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/memballoon<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/devices<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/domain<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/ubuntu.xml">ubuntu.xml</a></p>
<p><strong> Importez la configuration de votre VM</strong></p>
<blockquote><p># virsh define foo.xml<br />
# virsh start ubuntu</p></blockquote>
<p><strong>  Modifiez le /etc/network/interfaces de vos VMs</strong></p>
<pre class="perl">auto lo
iface lo inet loopback
&nbsp;
auto eth0
iface eth0 inet static
        address IP_VM1_FIXME
        netmask <span style="color: #cc66cc;">255.255</span><span style="color: #cc66cc;">.255</span><span style="color: #cc66cc;">.255</span>
        up /sbin/route add IP_HOST_FIXME dev eth0
        up /sbin/route add default gw IP_HOST_FIXME
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/interfaces-vm.txt">interfaces-vm.txt</a></p>
<p>&nbsp;</p>
<p>Voila les grandes lignes, en esperant que cela aide quelques personnes.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Note pour plus tard&#8230; revisiter mes passwords</title>
		<link>http://samuel.happycoders.org/2007/05/19/note-pour-plus-tard-revisiter-mes-passwords/</link>
		<comments>http://samuel.happycoders.org/2007/05/19/note-pour-plus-tard-revisiter-mes-passwords/#comments</comments>
		<pubDate>Fri, 18 May 2007 23:46:27 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[Francais]]></category>
		<category><![CDATA[Geeky Linux fr]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2007/05/19/note-pour-plus-tard-revisiter-mes-passwords/</guid>
		<description><![CDATA[Petite commande pour generer des mots de passe a dormir debout:
apg -m 8 -x 12 -a 1 -n 8
]]></description>
			<content:encoded><![CDATA[<p>Petite commande pour generer des mots de passe a dormir debout:</p>
<p><code>apg -m 8 -x 12 -a 1 -n 8</code></p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2007/05/19/note-pour-plus-tard-revisiter-mes-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

