View Single Post
  #2   (View Single Post)  
Old 11th November 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Thanks to some googling I finally I figured it out. I can now SSH in to the FreeBSD KVM guest under Linux Mint.
Code:
[adriaan@hercules]~: ssh root@192.168.222.244 
Password for root@freebsd_93.utp.xnet:
Last login: Tue Nov 11 02:38:03 2014
FreeBSD 9.3-RELEASE-p5 (GENERIC) #0: Mon Nov  3 22:38:58 UTC 2014

Welcome to FreeBSD!
My first attempt yesterday was to read the RedHat KVM administration guide at https://access.redhat.com/documentat...iguration.html
Although it taught me how to create a virbr0 device, it still did not work. It also mentioned this setup conflicts with NetworkManager, which seems to be some Linux solution to administer the network settings.

Today another google attempt led me to the Ubuntu documentation (Linux Mint is based on Ubuntu) at https://help.ubuntu.com/community/KVM/Networking which provided the necessary background information about the two types of KVM networking:
Quote:
There are a few different ways to allow a virtual machine access to the external network.

The default virtual network configuration is known as Usermode Networking. Traffic is NATed through the host interface to the outside network.

Alternately, you can configure Bridged Networking to enable external hosts to directly access services on the guest operating system.

Usermode Networking

In the default configuration, the guest operating system will have access to network services, but will not be visible to other machines on the network. The guest will be able, for example, to browse the web, but will not be able to host an accessible web server.

By default, the guest OS will get an IP address in the 10.0.2.0/24 address space and the host OS will be reachable at 10.0.2.2.

You should be able to ssh into the host OS (at 10.0.2.2) from inside the guest OS and use scp to copy files back and forth.

If this configuration is suitable for your purposes, no other configuration is required.

If your guests do not have connectivity "out-of-the-box" see Troubleshooting, below.

Bridged Networking

Bridged networking allows the virtual interfaces to connect to the outside network through the physical interface, making them appear as normal hosts to the rest of the network.

Warning: Network bridging will not work when the physical network device (e.g., eth1, ath0) used for bridging is a wireless device (e.g., ipw3945), as most wireless device drivers do not support bridging!
So it was clear that I needed Bridged Networking

The following post allowed me to get it working: Could not ping Solaris KVM Guest from another computer
Quote:
I setup Solaris Guest using KVM in Ubuntu. I don't have problem pinging host (Ubuntu) to guest (Solaris) and vice versa. Also my Solaris guest can ping other computers in my network but not the other way around.
The person having the problem updated his question with the Ubuntu /etc/network/interfaces contents that solved his issue

My version of that file:
Code:
# interfaces(5) file used by ifup(8) and ifdown(8)

# loopback
auto lo
iface lo inet loopback

# eth0 interface
auto eth0
iface eth0 inet dhcp

#virtual bridge
auto br0
iface br0 inet dhcp
   bridge_ports eth0
   bridge_stp off
   bridge_fd 0
   bridge_maxwait 0
The ifconfig output of the Linux Mint host
Code:
br0       Link encap:Ethernet  HWaddr a0:1d:48:97:5b:74  
          inet addr:192.168.222.222  Bcast:192.168.222.255  Mask:255.255.255.0
          inet6 addr: fe80::a21d:48ff:fe97:5b74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1416 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:326680 (326.6 KB)  TX bytes:11025 (11.0 KB)

eth0      Link encap:Ethernet  HWaddr a0:1d:48:97:5b:74  
          inet addr:192.168.222.222  Bcast:192.168.222.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4976 errors:0 dropped:0 overruns:0 frame:0
          TX packets:671 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:604477 (604.4 KB)  TX bytes:92342 (92.3 KB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5992 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5992 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2638916 (2.6 MB)  TX bytes:2638916 (2.6 MB)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1334 (1.3 KB)  TX bytes:5282 (5.2 KB)

vnet0     Link encap:Ethernet  HWaddr fe:54:00:45:aa:97  
          inet6 addr: fe80::fc54:ff:fe45:aa97/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:333 errors:0 dropped:0 overruns:0 frame:0
          TX packets:609 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:50908 (50.9 KB)  TX bytes:128537 (128.5 KB)
The only issue I am having is that the Linux Mint host cannot connect to the internet and/or ping local hosts on my LAN anymore. But at least there is some progress
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 11th November 2014 at 04:01 AM. Reason: Continue
Reply With Quote