Skip to contentSkip to conversation

slirp, darwin problems

Qemu-devel Joshua Kwan 3 participants 3 messages Jun 25, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

There are two problems I experienced here using qemu.

I tried qemu from Debian today which has slirp support compiled into it. Here is how I invoked it:

qemu -user-net -hda darwin.bin -cdrom darwin-701.iso -m 128 -boot d

As you might have guessed, my intenet is to install Darwin for x86 as qemu's guest OS.

First problem I encountered was that qemu would not boot the Darwin kernel. It would stop at

From path: "cdrom", Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOMedia</string><key>Content Hint</key><string ID="2">CD_ROM_Mode_1</string></dict> PCI Ver=0.00 BusCount=1 Features=[ ]

and hang right there.

So I decided to see if Debian would work as a guest OS. I got to DHCP stage, and that worked: I was impressed. I could resolve hostnames correctly, and the gateway was set to 10.0.2.2. However, when I tried to retrieve anything, nothing worked...

My thinking is that qemu might be looking in the wrong place for a gateway? My computer is behind a NAT, and has two network interfaces:
one for a local wired network, and a wireless network which allows me to connect to my firewall and the Internet. My default gateway is set correctly and I am able to use the Internet normally from my host. However, qemu maybe doesn't see the default gateway being used or something?

Any help would be appreciated, with either problem. Please CC me on replies as I'm not subscribed to this list :)

Signature · 1 line
Joshua Kwan
#1 lore raw

Dear Joshua,

These are known problems. See the following bug reports:

Quoted 4 lines

From path: "cdrom", Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOMedia</string><key>Content Hint</key><string ID="2">CD_ROM_Mode_1</string></dict> PCI Ver=0.00 BusCount=1 Features=[ ]

Using CVS head, Darwin 7.01 guest stopped slightly after that:
https://savannah.nongnu.org/bugs/?func=detailitem&item_id=9428

Quoted 4 lines

So I decided to see if Debian would work as a guest OS. I got to DHCP stage, and that worked: I was impressed. I could resolve hostnames correctly, and the gateway was set to 10.0.2.2. However, when I tried to retrieve anything, nothing worked...

user-net does not work under Debian guest (and many other GNU/Linux systems):
https://savannah.nongnu.org/bugs/?func=detailitem&item_id=9388

If you set up tun networking, it works like a charm.

I am not an expert, but you should be compiling Qemu from CVS head as it includes several fixes and evolves very quickly with a bunch of pending patches.

Cheers,
Jean-Michel

#2 lore raw
In reply to Joshua Kwan

Hi,

Quoted 7 lines · Joshua Kwan

My thinking is that qemu might be looking in the wrong place for a gateway? My computer is behind a NAT, and has two network interfaces:
one for a local wired network, and a wireless network which allows me to connect to my firewall and the Internet. My default gateway is set correctly and I am able to use the Internet normally from my host. However, qemu maybe doesn't see the default gateway being used or something?

QEMU with slirp is a simple client program. Virtual network in QEMU which has DHCP server doesn't have any relationship with a host's network configuration. If your debian can get an IP address like 10.0.2.x by dhcpcd or dhclient from virtual DHCP server , the problem is that packets cannnot be sent or received to QEMU.

If you can use tcpdump as root on a host OS, you can check it. [host OS]# tcpdump -i eth0
or
[host OS]# tcpdump -i eth1 (if you have two cards)
or when you use a host-gest connection,
[host OS]# tcpdump -i lo

Then use a program on a guest OS.
[guest OS]$ lynx http://----example-----/

When a connection is normal, you will see some output of tcpdump.

Regards,
kazu