<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">> I upgraded from CentOS 5.9 to CentOS 6.4.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I try to reuse my virtual machines and am only partially successful: I
<o:p></o:p></p>
<p class="MsoPlainText">> can run them, I just cannot get the network OK and need some help with that.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> What I had in the past was pretty simple: both the host and the VM?s
<o:p></o:p></p>
<p class="MsoPlainText">> used eth0 and each had an IP in the same subnet and could communicate freely.
<o:p></o:p></p>
<p class="MsoPlainText">> With the new install it seems somewhat more complex and I think I need to configure a bridge and use that.<o:p></o:p></p>
<p class="MsoPlainText">> Unfortunately, info I find through google is overwhelming and
<o:p></o:p></p>
<p class="MsoPlainText">> confusing. All examples either configure something else, or the outcome is not what? expected.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> So: how to go about setting things up to have say:<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> My physical machine is on 192.168.0.90<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> My Virtual machines are on 192.168.0.100 and 101.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> These are to be fixed addresses.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> The 2 VM?s have to communicate with each other and with the physical machine.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> The VM?s do not necessarily need to communicate with the rest of the world.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> The physical machine needs to communicate with the rest of the world.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I use:<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - CentOS-6.4_64<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - Virtual Machine Manager 0.9.0<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - xen 4.2.3<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - libvirt 0.10.2.7-5<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - VM?s show Hypervisor = xen (fullvirt)<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - Emulator = qemu-dm<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - NIC points to Shared device name virbr0<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> - on the host, virbr0 has IQ 192.168.122.1<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I have been fighting this for 2 weeks, now. I tried to follow several
<o:p></o:p></p>
<p class="MsoPlainText">> advises which resulted in either the VM?s not connecting to anything,
<o:p></o:p></p>
<p class="MsoPlainText">> or my host losing its connection to the rest of the world, or both. So either I still do something not-right, or I follow the wrong gidelines.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Can someone give me a push in the right direction, please?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks to all who responded to this: it is working now.<o:p></o:p></p>
<p class="MsoNormal">Solution was relatively easy and mainly a matter of understanding the “ifcfg-eth0 – like” files.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What I did:<o:p></o:p></p>
<p class="MsoNormal">1 - yum install bridge-utils<o:p></o:p></p>
<p class="MsoNormal">2 – change /etc/sysconfig/network-scripts/ifcfg-eth0 to:<o:p></o:p></p>
<p class="MsoNormal">DEVICE="eth0"<br>
BOOTPROTO=none<br>
ONBOOT="yes"<br>
TYPE="Ethernet"<br>
HWADDR=xx:xx:xx:xx:xx:xx<br>
BRIDGE="br0"<br>
USERCTL=no<br>
IPV6INIT=no<br>
NM_CONTROLLED="no"<br>
3 – change change /etc/sysconfig/network-scripts/ifcfg-br0 to:<o:p></o:p></p>
<p class="MsoNormal">DEVICE="br0"<br>
BOOTPROTO=none<br>
ONBOOT="yes"<br>
IPADDR=192.168.0.95<br>
NETMASK=255.255.255.0<br>
GATEWAY=192.168.0.1<br>
DNS1="192.168.0.1"<br>
PEERDNS="yes"<br>
TYPE="Bridge"<br>
DELAY=0<br>
STP=off<br>
USERCTL=no<br>
IPV6INIT=no<br>
NM_CONTROLLED=no<br>
4 - /etc/init.d/network restart<o:p></o:p></p>
<p class="MsoNormal">5 – choose Host device eth0 (Bridge ‘br0’) in the VM-manager GUI for the virtual-machine’s NIC<o:p></o:p></p>
<p class="MsoNormal">6 – restart the virtual machines<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That made it all work.<o:p></o:p></p>
<p class="MsoNormal">So what I had wrong initially were settings in the ifcfg-xxx files. There are different settings that may work and I just tried some of the not-working combinations.<o:p></o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal">Koos.<o:p></o:p></p>
</div>
</body>
</html>