{"id":240,"date":"2008-12-05T17:04:31","date_gmt":"2008-12-05T16:04:31","guid":{"rendered":"http:\/\/blog.guiguiabloc.fr\/?p=240"},"modified":"2008-12-05T18:38:55","modified_gmt":"2008-12-05T17:38:55","slug":"ovh-ip-failover-dans-une-machine-virtuelle-vmware","status":"publish","type":"post","link":"http:\/\/blog.guiguiabloc.fr\/index.php\/2008\/12\/05\/ovh-ip-failover-dans-une-machine-virtuelle-vmware\/","title":{"rendered":"OVH, Ip Failover dans une machine virtuelle VMWare"},"content":{"rendered":"<p>Suite \u00e0 <a title=\"Vmware-ovh\" href=\"http:\/\/blog.guiguiabloc.fr\/index.php\/2008\/10\/28\/vmware-server-20-sur-dedies-ovh-et-mise-en-oeuvre-dune-solution-de-haute-disponibilite-avec-datastore-en-drbd\/\" target=\"_blank\">ce billet<\/a> sur la mise en oeuvre de VMware Server 2 sur un serveur d\u00e9di\u00e9 OVH, il semble que certain d&rsquo;entre vous soit en difficult\u00e9 pour affecter une ip failover \u00e0 votre Machine Virtuelle et pour la faire communiquer avec le Nain Ternet.<\/p>\n<p>Donc , petite mise au point et tuto pour le \u00ab\u00a0comment qu&rsquo;on fait\u00a0\u00bb pour mettre une ip failover OVH sur ma VM.<\/p>\n<ul>\n<li><strong>Pr\u00e9-requis H\u00f4te<br \/>\n<\/strong><\/li>\n<\/ul>\n<p>Vous avez lu le billet sur l&rsquo;installation VMWare et l&rsquo;h\u00f4te est op\u00e9rationnel.<\/p>\n<p>J&rsquo;appelerais l&rsquo;h\u00f4te le serveur sur lequel est install\u00e9 VMWare server.<\/p>\n<p>L&rsquo;interface Host-only utilis\u00e9e sur l&rsquo;h\u00f4te est VMNET1 :<\/p>\n<pre lang=\"text\">hote# ifconfig\r\n\r\nvmnet1    Lien encap:Ethernet  HWaddr 00:50:56:C0:00:01\r\n          inet adr:10.154.98.1  Bcast:10.154.98.255  Masque:255.255.255.0\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n          RX packets:3675317 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:3013354 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 lg file transmission:1000\r\n          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)<\/pre>\n<p>L&rsquo;ip affect\u00e9e \u00e0 VMNET1 est de <a title=\"ip classe priv\u00e9e\" href=\"http:\/\/fr.wikipedia.org\/wiki\/Adresse_IPv4#Assignation_des_plages_d.27adresses_IP\" target=\"_blank\">classe priv\u00e9e<\/a> (192.168\/16, 172.16\/12 ou 10\/8) ici, 10.154.98.1\/24 (la notation \/24 correspond au nombre de bits du masque se sous-r\u00e9seau donc ici 255.255.255.0).<\/p>\n<p>Le forwarding IP est activ\u00e9e :<\/p>\n<pre lang=\"text\">hote# cat \/proc\/sys\/net\/ipv4\/ip_forward\r\n1<\/pre>\n<p>Le proxy ARP est actif sur l&rsquo;interface VMNET1 :<\/p>\n<pre lang=\"text\">hote# cat \/proc\/sys\/net\/ipv4\/conf\/vmnet1\/proxy_arp\r\n1<\/pre>\n<p>Si les valeurs sont a 0, les activer :<\/p>\n<pre lang=\"text\">hote# \/bin\/echo \"1\" > \/proc\/sys\/net\/ipv4\/ip_forward\r\nhote# \/bin\/echo \"1\" > \/proc\/sys\/net\/ipv4\/conf\/vmnet1\/proxy_arp<\/pre>\n<p>L&rsquo;ip FailOver utilis\u00e9e dans cette exemple est 91.121.58.158.<\/p>\n<p>On ajoute une route par d\u00e9faut pour l&rsquo;ipFailover :<\/p>\n<pre lang=\"text\">hote# route add 91.121.58.158 dev vmnet1\r\nhote# route -n\r\nTable de routage IP du noyau\r\nDestination     Passerelle      Genmask         Indic Metric Ref    Use Iface\r\n91.121.58.158  0.0.0.0         255.255.255.255 UH    0      0        0 vmnet1<\/pre>\n<ul>\n<li><strong>Machine Virtuelle Linux (type Debian)<\/strong><\/li>\n<\/ul>\n<pre lang=\"text\">guest:~# cat \/etc\/network\/interfaces\r\n# This file describes the network interfaces available on your system\r\n# and how to activate them. For more information, see interfaces(5).\r\n\r\n# The loopback network interface\r\nauto lo\r\niface lo inet loopback\r\n\r\n# The primary network interface\r\nallow-hotplug eth0\r\niface eth0 inet static\r\naddress 91.121.58.158\r\nnetmask 255.255.255.255\r\ndns-nameservers 213.186.33.99\r\n\r\npost-up \/sbin\/route add default dev eth0<\/pre>\n<p>N&rsquo;oubliez pas de renseigner vos serveurs de noms (opendns ici)<\/p>\n<pre lang=\"text\">guest:~# cat \/etc\/resolv.conf\r\nsearch localdomain\r\nnameserver 208.67.222.222\r\nnameserver 208.67.220.220<\/pre>\n<p>On reboot, Un ping sur une adresse externe doit fonctionner sans probl\u00e8me :<\/p>\n<div id=\"attachment_245\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/linuxvm.jpg\"><img aria-describedby=\"caption-attachment-245\" loading=\"lazy\" class=\"size-medium wp-image-245\" title=\"linuxvm\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/linuxvm-300x189.jpg\" alt=\"LinuxVM\" width=\"300\" height=\"189\" \/><\/a><p id=\"caption-attachment-245\" class=\"wp-caption-text\">LinuxVM<\/p><\/div>\n<p>Si vous pr\u00e9f\u00e9rez faire la config \u00e0 la main :<\/p>\n<pre lang=\"text\">guest# ifconfig eth0 91.121.58.158 netmask 255.255.255.255\r\nguest# route add default dev eth0<\/pre>\n<ul>\n<li><strong>Machine Virtuelle WINDOWS<\/strong><\/li>\n<\/ul>\n<div id=\"attachment_247\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm1.jpg\"><img aria-describedby=\"caption-attachment-247\" loading=\"lazy\" class=\"size-medium wp-image-247\" title=\"xpvm1\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm1-300x244.jpg\" alt=\"Etape 1\" width=\"300\" height=\"244\" \/><\/a><p id=\"caption-attachment-247\" class=\"wp-caption-text\">Etape 1<\/p><\/div>\n<p>On sp\u00e9cifie l&rsquo;ip failover,  la passerelle qui l&rsquo;adresse de VMNET1 de l&rsquo;h\u00f4te et les DNS.<\/p>\n<p>Concernant les masques, si vous laissez 255.255.255.255, vous aurez un message d&rsquo;erreur :<\/p>\n<div id=\"attachment_248\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm2.jpg\"><img aria-describedby=\"caption-attachment-248\" loading=\"lazy\" class=\"size-medium wp-image-248\" title=\"xpvm2\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm2-300x244.jpg\" alt=\"Erreur masque\" width=\"300\" height=\"244\" \/><\/a><p id=\"caption-attachment-248\" class=\"wp-caption-text\">Erreur masque<\/p><\/div>\n<p>On va donc laisser 255.255.255.0 pour l&rsquo;instant :<\/p>\n<div id=\"attachment_249\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm3.jpg\"><img aria-describedby=\"caption-attachment-249\" loading=\"lazy\" class=\"size-medium wp-image-249\" title=\"xpvm3\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm3-300x244.jpg\" alt=\"Masque par defaut\" width=\"300\" height=\"244\" \/><\/a><p id=\"caption-attachment-249\" class=\"wp-caption-text\">Masque par defaut<\/p><\/div>\n<p>Lancer Regedit pour modifier la valeur du netmask (D\u00e9marrer\/executer\/Regedit).<\/p>\n<p>D\u00e9placer vous sur HkEY_LOCAL_MACHINE\/SYSTEM et faites une recherche sur \u00ab\u00a0subnet\u00a0\u00bb<\/p>\n<div id=\"attachment_250\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm4.jpg\"><img aria-describedby=\"caption-attachment-250\" loading=\"lazy\" class=\"size-medium wp-image-250\" title=\"xpvm4\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm4-300x244.jpg\" alt=\"Modification dans le registre\" width=\"300\" height=\"244\" \/><\/a><p id=\"caption-attachment-250\" class=\"wp-caption-text\">Modification dans le registre<\/p><\/div>\n<p>Modifie la valeur 255.255.255.0 en 255.255.255.255<\/p>\n<div id=\"attachment_251\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm5.jpg\"><img aria-describedby=\"caption-attachment-251\" loading=\"lazy\" class=\"size-medium wp-image-251\" title=\"xpvm5\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm5-300x244.jpg\" alt=\"Modification Netmask\" width=\"300\" height=\"244\" \/><\/a><p id=\"caption-attachment-251\" class=\"wp-caption-text\">Modification Netmask<\/p><\/div>\n<p>On reboot le pc, tout doit \u00eatre ok d\u00e9sormais :<strong><\/strong><\/p>\n<div id=\"attachment_252\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm6.jpg\"><img aria-describedby=\"caption-attachment-252\" loading=\"lazy\" class=\"size-medium wp-image-252\" title=\"xpvm6\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/xpvm6-300x238.jpg\" alt=\"Test final\" width=\"300\" height=\"238\" \/><\/a><p id=\"caption-attachment-252\" class=\"wp-caption-text\">Test final<\/p><\/div>\n<p><strong>ATTENTION<\/strong><strong> le netmask affich\u00e9e est INCORRECT !! LA PREUVE :<\/strong><\/p>\n<div id=\"attachment_255\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/bugxp.jpg\"><img aria-describedby=\"caption-attachment-255\" loading=\"lazy\" class=\"size-medium wp-image-255\" title=\"bugxp\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/bugxp-300x242.jpg\" alt=\"Bug netmask ipconfig\" width=\"300\" height=\"242\" \/><\/a><p id=\"caption-attachment-255\" class=\"wp-caption-text\">Bug netmask ipconfig<\/p><\/div>\n<p>En esp\u00e8rant que cela vous aide \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Suite \u00e0 ce billet sur la mise en oeuvre de VMware Server 2 sur un serveur d\u00e9di\u00e9 OVH, il semble que certain d&rsquo;entre vous soit en difficult\u00e9 pour affecter une ip failover \u00e0 votre Machine Virtuelle et pour la faire &hellip; <a href=\"http:\/\/blog.guiguiabloc.fr\/index.php\/2008\/12\/05\/ovh-ip-failover-dans-une-machine-virtuelle-vmware\/\">Read More <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,3],"tags":[67,60,12],"_links":{"self":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/240"}],"collection":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":11,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":259,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/240\/revisions\/259"}],"wp:attachment":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}