QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

Hi.
I have Qemu running on my Windows 10.

Code: Select all

$ qemu-system-ppc --version
QEMU emulator version 5.1.0 (v5.1.0-11824-g8699890d91-dirty)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
I managed to create guests for almost all version of Mac OS X from 10.0 to 10.5.
Without using the tap, I can have the QEmu internal DHCP server offering 10.0.2.15, which indicates that the non-TAP set-up works.

Code: Select all

"qemu-system-ppc.exe" \
	-name "${sName}" \
	-L pc-bios \
	-boot c \
	-M mac99,via=pmu \
	-cpu g4 \
	-m 2048 \
	-prom-env "boot-args=-v" \
	-prom-env "vga-ndrv?=true" \
	-prom-env "auto-boot?=true" \
	-drive file="$sHD",format=qcow2,media=disk \
 	-netdev user,id=mynet0 \
		-device sungem,netdev=mynet0 \
	-usb \
		-device usb-mouse \
		-device usb-kbd \
	-sdl \
	-g 1920x1080x32 \
	-device VGA,edid=on
Now I am having a hard time making the TAP connection from the guest into Windows 10.
I followed all the instructions I could find online.
On the windows side I have a network device TAP-Windows Adapter V9 for OpenVPN Connect installed and working. I renamed it to mytap.
I created a bridge between the internal network interface and the TAP device. When opening the bridge Status window, I can see the Sent and Receive packets counter increasing constantly.
On the guest side (Mac OS X 10.5.8 PowerPC), I am using the following to start the guest:

Code: Select all

"qemu-system-ppc.exe" \
	-name "${sName}" \
	-L pc-bios \
	-boot c \
	-M mac99,via=pmu \
	-cpu g4 \
	-m 2048 \
	-prom-env "boot-args=-v" \
	-prom-env "vga-ndrv?=true" \
	-prom-env "auto-boot?=true" \
	-drive file="$sHD",format=qcow2,media=disk \
 	-netdev tap,ifname=mytap,id=mynet0 \
		-device sungem,netdev=mynet0 \
	-usb \
		-device usb-mouse \
		-device usb-kbd \
	-sdl \
	-g 1920x1080x32 \
	-device VGA,edid=on
However, the IP assigned to the guest is on the range of 169.254.x.x.

Any clue of what am I doing wrong?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by Cat_7 »

Not yet ;-)

When you select properties for the bridge, do you see both the normal ethernet connection and the tap device listed and checked under the Adapters heading?
Does the status of the tap device change to enabled, bridged after you start Qemu?

In my list of apps & features I see both OpenVPN 2.4.9-I601-Win10 and TAP-Windows 9.24.2

Best,
Cat_7
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

:)
Yes, Network Bridge Properties shows both the "mytap" and "Intel -2.5Gb" interfaces selected.

Yes, upon starting the QEmu guest, the "mytap" device shows "Enabled, Bridged"

My list of "apps & features" shws:
- OpenVPN 2.5.0-I601 amd64
- Nothing with "tap"
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

Good news.

After removing all the network software, restarting the servers, re-installing OpenVPN, restarting the server, now my TAP device is working.

I can start a single guest to the use the TAP device.
A second guest brings an error message:

Code: Select all

tap: Could not open 'mytap'
C:\Program Files\qemu\qemu-system-ppc.exe: Device 'tap' could not be initialized
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

Well, I found a solution. Not elegant, but works.
A TAP interface for each new guest.
For each guest, a different MAC address for the network interface.
This allows the DHCP server to provide a different IP address to the virtual NIC.
I also have IPv6 working on it.
My strategy is to change the last 3 digits for the MAC address to reflect a different guest flavour

Code: Select all

-netdev tap,ifname=mytap3457,id=mynet0 \
		-device sungem,netdev=mynet0,mac=52:54:00:12:34:57 \
With this approach, I can access the guest hosts from each other.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by Cat_7 »

Well done!

It works as described here?
https://www.emaculation.com/doku.php/pp ... networking

Best,
Cat_7
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

It did not work.
When opening a second instance of Qemu, to the same tap device (mytap), it fails with an error message

Code: Select all

tap: Could not open 'mytap'
C:\Program Files\qemu\qemu-system-ppc.exe: Device 'tap' could not be initialized
First instance:

Code: Select all

        -netdev tap,ifname=mytap,id=mynet0 \
                -device sungem,netdev=mynet0,mac=52:54:00:12:34:58 \
Second instance

Code: Select all

        -netdev tap,ifname=mytap,id=mynet0 \
                -device sungem,netdev=mynet0,mac=52:54:00:12:34:57 \
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by Cat_7 »

Those multiple tap devices should have different names as well. You cannot activate the same tap device twice.

To allow two qemu instances to “see” each other on the network and also have internet access, you can install a second tap device and bridge both tap devices with the default network connection. You must then also use different mac addresses for each connection:

-netdev tap,ifname=TapEthernet1,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:56
-netdev tap,ifname=TapEthernet2,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:66
afberendsen
Inquisitive Elf
Posts: 27
Joined: Fri Jul 21, 2017 3:27 am
Location: Berlin, Germany

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by afberendsen »

Good.
This is what I found out two posts above :)
Thanks for the tip.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: QEmu PPC on Windows 10 x64 with Mac OS X 10.5 TAP interface

Post by mabam »

afberendsen wrote: Sat Nov 14, 2020 10:20 am Good.
This is what I found out two posts above :)
Thanks for the tip.

I might be wrong, but I guess the different ifname also makes a difference:
afberendsen wrote: Sat Nov 14, 2020 8:29 am First instance:
-netdev tap,ifname=mytap,id=mynet0 \
-device sungem,netdev=mynet0,mac=52:54:00:12:34:58 \

Second instance
-netdev tap,ifname=mytap,id=mynet0 \
-device sungem,netdev=mynet0,mac=52:54:00:12:34:57 \
Cat_7 wrote: Sat Nov 14, 2020 8:42 am -netdev tap,ifname=TapEthernet1,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:56
-netdev tap,ifname=TapEthernet2,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:66
Post Reply