You are not logged in.

#1 2014-04-07 09:45:20

giuscri
Member
From: Milan, Italy
Registered: 2013-08-19
Posts: 21

Sharing my network connection with a virtual machine (using qemu)

Hello,

I need to do some tests using OpenWrt and I chose to run it on a virtual machine (using qemu).

Once downloaded the Attitude Adjustment version (12.09) (here) I've run it simply by

qemu -hda openwrt-x86-generic-combined-ext4.img

that correcly (I think ...) returns a virtual machine running OpenWrt.

Though I'm connected from my laptop (the host?), if I try to ping any address from the guest (right?) I can't get any useful result. Indeed

ping -c1 www.google.com
ping: bad address `www.google.com'

Probably there are tons of article out there, but I'm pretty a newbie with networks and I can't make myself in comfort among all that documentation.

Thanks,

Giuseppe

Post scriptum: I'm appending the /etc/config/network here

configure interface loopback
  option ifname lo
  option proto static
  option ipaddr 127.0.0.1
  option netmask 255.0.0.0

configure interface lan
  option ifname eth0
  option type bridge
  option proto static
  option ipaddr 192.168.1.1
  option netmask 255.255.255.0

Offline

#2 2014-04-07 09:57:18

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Sharing my network connection with a virtual machine (using qemu)

Then let's start with the local wiki: https://wiki.archlinux.org/index.php/Qemu#Networking

Offline

#3 2014-04-07 13:52:59

tsyijiu
Member
Registered: 2012-03-19
Posts: 6

Re: Sharing my network connection with a virtual machine (using qemu)

If you do not want to set up the network by yourself, you can use the GUI, like virt-manager, it's very useful.

Offline

Board footer

Powered by FluxBB