|
Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own. |
|
Thread Tools | Display Modes |
|
|||
KVM Virtual Machine network configuration
These last few days I have been playing with KVM on Linux Mint. Installed an OpenBSD current snapshot, NetBSD and FreeBSD 9.3.
I am using Virtual Machine Manager for managing and installing these virtual machines. It all works rather well. The only thing I haven't figured out is how to configure the network part in such a way that I can use an external box login over SSH to for example the FreeBSD 9.3 image. RTFM pointers are welcome, if at least it mentions which FM
__________________
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 02:16 AM. |
|
|||
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! 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:
The following post allowed me to get it working: Could not ping Solaris KVM Guest from another computer Quote:
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 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)
__________________
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 |
|
|||
I printed the virt-install(1) and virsh(1) man pages so I could study them conveniently.
The virt-install(1) man page explains the types of networking: Code:
Networking Configuration -w NETWORK, --network=NETWORK,opt1=val1,opt2=val2 Connect the guest to the host network. The value for "NETWORK" can take one of 3 formats: bridge=BRIDGE Connect to a bridge device in the host called "BRIDGE". Use this option if the host has static networking config & the guest requires full outbound and inbound connectivity to/from the LAN. Also use this if live migration will be used with this guest. network=NAME Connect to a virtual network in the host called "NAME". Virtual networks can be listed, created, deleted using the "virsh" command line tool. In an unmodified install of "libvirt" there is usually a virtual network with a name of "default". Use a virtual network if the host has dynamic networking (eg NetworkManager), or using wireless. The guest will be NATed to the LAN by whichever connection is active. # virt-install will configure the networking for the guest system:Code:
--network bridge=br0,model=virtio
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
Tags |
guest, hypervisor, kvm, kvm bridged networking, kvm networking |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Version 2.2.0 of the Parrot virtual machine arrives | J65nko | News | 1 | 20th March 2010 04:01 AM |
Networking on virtual machine | satimis | General software and network | 4 | 29th November 2008 02:16 PM |
USB support in virtual machine? | Sunnz | OpenBSD Packages and Ports | 2 | 16th November 2008 04:00 AM |
highly secure virtual machine | uptonm | OpenBSD Security | 26 | 28th July 2008 10:10 PM |
Extract ISO under OpenVZ virtual machine | stukov | Other BSD and UNIX/UNIX-like | 1 | 14th May 2008 09:46 PM |