Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
albaraka
Posts: 4
Joined: 20. Dec 2022, 20:42

Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by albaraka »

I am trying to set up a Mojave VM on VirtualBox to run 32-bit apps.

Successfully installed Mojave (10.14.6) on my VB (6.1.40), and added the Oracle_VM_VirtualBox_Extension_Pack-6.1.40.vbox-extpack.

But I cannot get VB to have access to attached USB devices or to shared folders.Copy/Paste does not work either. Details:

(1) USB problem:
In Settings, I enabled USB Controller USB 2.0 and selected an external USB drive (Samsung PSSD T7). When connecting the drive to my Mac, I get the following error message:
Failed to connect USB device Samsung PSSD T7 [0100] to the virtual machine MojaveVirtual.
Details: Failed to create a proxy device for the USB device. (Error: VERR_PDM_NO_USB_PORTS)
(2) Shared Folders problem:
In Settings/Shared Folders, I set up two of my host system’s folders as shared folders (Applications, and Downloads). I gave them a new name to be used in VB, granted full access, and set them to automount. However, none of these folders shows up anywhere when I run my MojaveVirtual machine.
I also tried to share these folders from my host using smb, without success (my host user name/pw is not accepted, and neither is guest access).

(3) Lastly, Shared Clipboard and Drag and Drop do not work either, even though they are set up as bidirectional in Settings.

My host system is Mojave 10.14.6 if that should be of any significance – I have not updated so far since I need some 32-bit apps, and want to make sure to get a VirtualMojave up and running before I upgrade my host. I have also tried to install a Mojave virtual machine on another Mac running Ventura (13.1) and VirtualBox 7.0.4, but there I failed to even install Mojave.

Thank you for helping me to configure my Virtual Mojave so that I can overcome the three problems mentioned.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by mpack »

albaraka wrote: (2) Shared Folders problem:
(3) Lastly, Shared Clipboard and Drag and Drop do not work either, even though they are set up as bidirectional in Settings.
Guest Additions Shared Folders, clipboard copy and drag and drop - are all Guest Additions features, which do not exist for MacOS guests (actually they do exist unofficially, but the feature set is very meagre and includes none of the features mentioned).

Note that the Extension Pack and the Guest Additions are two entirely different things. The former is installed on the host and adds features to VirtualBox itself. The latter is installed in supported guests and allows software running inside the guest to access features of the host software such as shared folders, integrated mouse cursor, drag and drop.

I'm not a Mac user, so I'll let others help you with USB problems.
granada29
Volunteer
Posts: 702
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by granada29 »

As @mpack said, the Guest Additions are very minimal for a macOS VM.

I have found that macOS Screen Sharing is the most effective way of communicating between your host and the guest VM. In the guest VM go to System Preferences/Sharing and enable both Screen Sharing and File Sharing. I usually enable SSH as well to have command line access to the VM but this is not strictly necessary.

For this to work you must also have a network connection between your host and the VM. Configuring the VM with Bridged networking is the easiest way of doing this although this will be unlikely to work if you are using WiFi.

Did you try enabling USB 3 in your guest configuration?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by scottgus1 »

granada29 wrote:Configuring the VM with Bridged networking is ... unlikely to work if you are using WiFi.
Host-Only would be a usable fall-back for networking between the host and the VM for these services to work, and add NAT for internet in the VM.
albaraka
Posts: 4
Joined: 20. Dec 2022, 20:42

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by albaraka »

Thank you for your suggestions, @granada29 and @scottgus1. I am not that technically well-versed in networking, so maybe would need some more elaborate step-by-step advice. I did play around with the network settings in VB, leaving NAT on for Adapter 1, and enabling both bridged for Adapter 2, and Host-only for Adapter 3, and enabling screen sharing and file sharing in my virtual machine. Bridged networking did not have any effect; Host-only does allow me to see my host in my guest. I cannot, however, connect to my host from the guest or vice vice using my admin user name and password (I do have different user name/pw for host and guest, respectively). In my virtual machine, I see ‘Connected as: Guest’, and I see one folder there, ‘Applications’ (which I had shared), but not the other shared folder. I cannot see the content of ‘Applications’, though. Both SMB and AFP are enabled on my host Mac, and I can see there that 1 user is connected by SMB (obviously, the ‘Guest’ user of my virtual Mojave).

BUT at least:
I can connect to my guest using screen sharing from my host, and there, my username/password combination does work, and I can drop files from host to guest and run applications on the guest :-)
[I can also connect from guest to host using screen sharing, but that would be less useful in practice obviously]

Still wondering why screen sharing would work but file sharing not.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by scottgus1 »

albaraka wrote:leaving NAT on for Adapter 1, and enabling both bridged for Adapter 2, and Host-only for Adapter 3
Bridged duplicates NAT & Host-Only, so it can confuse the VM OS.

Try Bridged first. See if the VM gets an IP address in the host LAN's range from the house router. If it does, and you can then ping 8.8.8.8 (Google DNS) then you have internet in the VM. Open the host and VM OS's firewalls to allow ping in each OS. Then ping the host's IP address from the VM, and the VM's IP address from the host. If each ping goes through, you have full network access. Once this is established, set the Mac OS file and screen sharing settings to get file sharing, as you now have a full network between the host and the VM.

If you cannot get Bridged to get IP address and ping, then you have to use NAT & Host-Only. (Don't keep Bridged up if you have to go to this workaround.) NAT will put internet in the VM, you should be able to ping 8.8.8.8. Host-Only will default to giving the VM a 192.168.56.# IP address, and the host will have a 192.168.56.1 IP address. Set up the VM OS to look to 192.168.56.1 for file sharing, and the host to look to 192.168.56.# (where # is the last number in the VM's IP address).

If you need further help, please post the following:

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)

In each OS provide the output of the "ifconfig" command.

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)
albaraka
Posts: 4
Joined: 20. Dec 2022, 20:42

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by albaraka »

Thank you, @scottgus1 — with your help, I got one step further. Your first solution (Bridged; NAT and Host-only turned off) worked. I had to select “en0: WiFi (AirPort)” for the bridge instead of “p2p0”, which I had before. I thus got internet access in the virtual machine and was able to ping in both directions between host and guest.

However, I am only able to log into the host as “Guest”, not as my host’s regular registered user. The host’s user/password combination is not accepted. What could be the reason for that?

I am also still not able to access USB drives from the guest. I can see them when I click the little USB symbol in the VirtualBox’s lower menubar, but they are greyed out. What could be the reason for that? I tried with both USB 1, 2, and 3 in the Settings.
Attachments
VBox.log.zip
(31.6 KiB) Downloaded 1 time
MojaveVirtual.vbox.zip
(1.84 KiB) Downloaded 1 time
granada29
Volunteer
Posts: 702
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by granada29 »

albaraka wrote: However, I am only able to log into the host as “Guest”, not as my host’s regular registered user. The host’s user/password combination is not accepted. What could be the reason for that?
Check the Sharing permissions in the host System Settings. I usually connect the other way - from the host to the guest.

Are your USB drives mounted on the host? You may have to set a USB filter in the guest configuration in order to capture the drives before the host can mount them.
albaraka
Posts: 4
Joined: 20. Dec 2022, 20:42

Re: Mojave guest on Mac host: how to configure USB / shared folders / clipboard?

Post by albaraka »

@granada29:

(1) Sharing permissions in the host are set to give read & write access to two specific folders to my host’s administrative user. I did the same in the guest. However, this does not work as expected, only partially.
In effect, I can mount the two folders on the host using file sharing if I log in as “guest” from the guest OS; I cannot log into the host with my host admin user name/pw.
I can see my “MojaveVirtual” in the Network location on the host; but I cannot log in to the guest (filesharing) from the host, neither as registered user nor as guest.
I can, however, access the guest from the host using screen sharing.
So it partly works, but I’d like to understand why only partly.

(2) USB: VirtualBox can ‘see’ my USB drives when I configure them in VB’s settings, and since I now understood that I have to unmount them from the host, they also appear in black (not greyed out) in the virtual machine’s ‘Devices’ menu. But selecting them returns the error “Failed to attach the USB device […]”. Any solution for that?
Post Reply