LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-17-2012, 12:56 AM   #1
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
Old 08-17-2012, 03:17 AM   #2
guna_pmk
Member
 
Registered: Sep 2008
Posts: 220

Rep: Reputation: 5
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
 
Old 08-19-2012, 09:33 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Original Poster
Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to share from windows 7(host) to RHEL6.2 (guest) on VMware workstation 8.0 shibir Linux - Server 5 05-30-2012 04:54 AM
KVM guest cannot access host thehemi Linux - Virtualization and Cloud 8 03-28-2012 04:36 AM
ubuntu move kvm guest from one host to another thllgo Linux - Software 1 04-18-2011 06:12 PM
Share between Qemu-Kvm host and guest Alexvader General 1 06-13-2010 03:07 PM
Has anyone attempted running OS/2 guest under KVM (or other host)? kaza Linux - Virtualization and Cloud 3 05-16-2010 02:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration