Guest host networking

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
captainmatt29
Student Driver
Posts: 10
Joined: Fri May 15, 2020 4:55 pm

Guest host networking

Post by captainmatt29 »

Is there a way to enable guest / host networking as I want to share some files over APF between Catalina and Mac OS 9.2 but i cant find any walkthrough on how to do this.
User avatar
adespoton
Forum All-Star
Posts: 4286
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Guest host networking

Post by adespoton »

You've got an easy solution and a couple of harder solutions:

Easy: pause QEMU and open the disk image in Catalina to move files back and forth.

Medium: use the folder sharing feature -- it'll share a folder as if it were a FAT drive. Resources will be lost.

Hard: Install Tun/Tap device in Catalina. This involves disabling SIP, running QEMU as root, and installing the soon-to-be-totally-deprecated signed and notarized Tap kext via installing TunnelBlick. See https://tunnelblick.net/cTunTapConnections.html for why that'll only last you until this coming October.

Out of curiosity, has anyone attempted to get Tun networking to work with BII/SS/QEMU? Because unlike Tap, it doesn't require the soon-to-be-broken Tap kext.

See my other discussion in https://www.emaculation.com/forum/viewtopic.php?t=10076 -- there are further limitations with using Tap devices with emulators in Catalina and later.

[edit] to more directly answer your post, the instructions are available at https://wiki.qemu.org/Documentation/Networking
Note that from inside the guest, connecting to a port on the "gateway" IP address will connect to that port on the host; so for instance "ssh 10.0.2.2" will ssh from the guest to the host.

You can configure User Networking using the -netdev user command line option.

Adding the following to the qemu command line will change the network configuration to use 192.168.76.0/24 instead of the default (10.0.2.0/24) and will start guest DHCP allocation from 9 (instead of 15):

-netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9
You can isolate the guest from the host (and broader network) using the restrict option. For example -netdev user,id=mynet0,restrict=y or -netdev type=user,id=mynet0,restrict=yes will restrict networking to just the guest and any virtual devices. This can be used to prevent software running inside the guest from phoning home while still providing a network inside the guest. You can selectively override this using hostfwd and guestfwd options.
Post Reply