LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   RHEL6 KVM Host / guest network doesn't (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/rhel6-kvm-host-guest-network-doesn%27t-4175422555/)

chrism01 08-17-2012 12:56 AM

RHEL6 KVM Host / guest network doesn't
 
Hi Guys,

Did a new install, but can't get Host to network to Guest or vice versa.
Console access to guest from host is fine.

host settings
Code:

ifconfig
br0      Link encap:Ethernet  HWaddr 00:23:7D:D4:46:B8
          inet addr:10.15.97.131  Bcast:10.15.97.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:254864 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17736 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13316146 (12.6 MiB)  TX bytes:2600267 (2.4 MiB)

eth5      Link encap:Ethernet  HWaddr 00:23:7D:D4:46:B8
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:24023 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1729862 (1.6 MiB)  TX bytes:776908 (758.6 KiB)
          Interrupt:17 Memory:fa000000-fa012800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:65 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10614 (10.3 KiB)  TX bytes:10614 (10.3 KiB)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:0C:68:20
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:882 (882.0 b)

vnet0    Link encap:Ethernet  HWaddr FE:54:00:35:73:C3
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1115 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:3546 (3.4 KiB)  TX bytes:72344 (70.6 KiB)

host route table
Code:

route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
10.15.97.0      0.0.0.0        255.255.255.0  U    0      0        0 br0
192.168.122.0  0.0.0.0        255.255.255.0  U    0      0        0 virbr0
169.254.0.0    0.0.0.0        255.255.0.0    U    1013  0        0 br0
0.0.0.0        10.15.97.1      0.0.0.0        UG    0      0        0 br0

Guest ifcfg-eth0
Code:

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="52:54:00:35:73:C3"
NM_CONTROLLED="no"
ONBOOT="no"
TYPE="Ethernet"
UUID="ca5d0b53-ce3e-48f8-8355-bb793c4651cc"

Guest route table empty

Also on guest
Code:

ifup eth0

Determining IP information for eth0... failed.

Relevant section of guest's xml file
Code:

    <interface type='bridge'>
      <mac address='52:54:00:35:73:c3'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

Anyone tell me how to fix it?
Normally it should grab an address in the 192.168.122.0 network.

NB: host has static IP: it's a server.

guna_pmk 08-17-2012 03:17 AM

Sneaky question. Do you have DHCP server running anywhere in the network reachable by the host and thus by the guest?

For debugging, have you tried a static ip on the guest and it connects to the rest of the network?

Cheers

chrism01 08-19-2012 09:33 PM

OK; finally(!) found out how to do a cmd line only(!) install that creates a guest with the virsh console available and the default network ready
Code:

virt-install \
--network=network:default \
--name vm1 \
--ram=2048 \
--vcpus=2 \
--disk path=/var/lib/libvirt/images/vm1.img,size=12 \
--graphics none \
-l /mnt/isos/CentOS-6.3-x86_64-bin-DVD1.iso \
 -x "console=ttyS0"

:)

Still have to go into the guest via console and edit ifcfg-eth0 to set 'ONBOOT=yes' and then 'service network restart'.
Its now ssh-able from the host.


All times are GMT -5. The time now is 03:46 PM.