Skip to content
86% off$349 $48.86code BF2026

Guides

VM Has No Internet on Mac or Loses Network After Sleep

VM with no internet on your Mac, or a network that dies after sleep? Check IP, route and DNS, then fix it with a full restart or NAT. Covers Hermitbox.

GuideUpdated 7 min read

On this page

Your VM has no internet, or it worked yesterday and stopped after the Mac slept: SSH hangs, pings go nowhere, the browser inside the VM times out.

Why a VM loses its network

Reports on the UTM project's issue tracker show two patterns. One describes a macOS VM that had worked for 4 months and then lost internet in January 2024, including on a freshly created VM, in both bridged and shared modes. The other describes an Ubuntu VM on a bridged adapter that stops working after the MacBook sleeps: SSH hangs and the route to the VM disappears. The workaround people report is to close all VMs and the VM app, then start again. We have not found a confirmed root cause for every case, so treat the list below as likely causes, not proven ones.

  • Sleep and wake. The VM is paused while the Mac sleeps. A bridged adapter depends on the Mac's Wi-Fi or Ethernet link, which drops and reconnects, so the guest may keep a stale address or route.
  • Stale guest lease. The guest holds an address the Mac's side no longer knows about.
  • Lost host route. The VM has internet, but the Mac has no route back to the VM's subnet.
  • DNS only. Pings to an IP address work, names don't resolve.
  • VPN or network filter on the Mac. These can interfere with VM traffic.
  • Duplicate MAC address. Usually after copying a VM's files by hand.
  • OS update on the host or guest. The macOS report above started after an update window; the cause was not identified in what we found.

Work out where the break is

Start inside the VM and work outward.

CheckResultLikely problemGo to
Does the VM have an IP address?None, or 169.254.x.xThe VM never got an addressFix 1, then 3 or 4
Can the VM ping its gateway?NoLink between VM and Mac is brokenFix 1, then 2
Ping 1.1.1.1 works, example.com failsYes, then noDNS onlyFix 3 or 4
Can the Mac ping the VM's IP?No, while the VM has internetThe Mac lost its route to the VMFix 2
Fails only on a bridged adapterYesBridged depends on the Mac's physical linkFix 5

Step-by-step fixes

Fix 1: shut down and start again

A restart from inside the guest can leave the virtual network device in the state it was in. A full shut down boots the guest from scratch.

  1. Shut the VM down from the VM app.
  2. If it won't shut down, force it off. Unsaved work in the VM is lost.
  3. Start it again and give it about 30 seconds to get an address.

If several VMs are running, close them all first, then start one. That matches the workaround in the reports.

Fix 2: reset the Mac's side

  1. Turn Wi-Fi off and on, or unplug and replug Ethernet.
  2. If you use a VPN or network filter, turn it off and test again. If the VM works, the filter is interfering.
  3. Restart the Mac to reset the host's network state.

To check whether the Mac can reach the VM, replace VM_IP with the VM's address:

bash
ping -c 3 VM_IP

This sends three pings and changes nothing. To see the Mac's routes:

bash
netstat -rn -f inet

This only prints the routing table. Look for an entry covering the VM's subnet. If the VM has internet but the Mac has no route to it, restart the Mac.

Fix 3: renew the address inside a Linux guest

bash
ip addr
ip route

These only display addresses and routes. You want an address on the adapter and a default via ... line. Then test each hop, using the gateway from that line:

bash
ping -c 3 GATEWAY
ping -c 3 1.1.1.1
ping -c 3 example.com

If the first two work and the third fails, it's DNS. If there's no address or no default route, reapply the configuration on Ubuntu:

bash
sudo netplan apply

This reloads Ubuntu's network configuration and changes nothing permanent. On Ubuntu Desktop you can instead restart NetworkManager:

bash
sudo systemctl restart NetworkManager

Fix 4: renew the address inside a macOS guest

  1. In the VM, open System Settings and search for "Network".
  2. Select the active connection, then Details….
  3. Open the TCP/IP tab and click Renew DHCP Lease.
  4. Check that Configure IPv4 is Using DHCP and that no manual proxy is set. Labels vary a little between macOS versions.

If that doesn't help, do Fix 1, then Fix 2.

Fix 5: switch from bridged to NAT

A bridged adapter puts the VM on your real network, so it depends on the Mac's Wi-Fi or Ethernet link, which changes when the Mac sleeps. A NAT adapter puts the VM on a private network behind the Mac, so your router isn't involved.

Open the VM's network settings in your VM app and choose shared/NAT mode. This won't cure every case, since the macOS report also saw the problem in shared mode. But it's cheap to try, and NAT is enough for internet access and for reaching the VM from the Mac by IP. Keep bridged only if other devices on your network must reach the VM directly.

Fix 6: check for a duplicate MAC address

Two VMs with the same MAC address on one network can confuse address assignment, which can happen if you copied a VM's files by hand. Give the copy a new MAC address in its network settings, then start it again.

Keep the VM reachable across sleep

While the Mac sleeps, the VM isn't running, so a session to it stalls until wake. If the VM must stay reachable, keep the Mac from sleeping rather than repairing the network afterward. In Terminal, caffeinate -i prevents idle sleep for as long as it runs; press Control-C to stop it. Closing the lid still sleeps the Mac. The caffeinate guide covers the flags, and Glowmoth is the MacSuite keep-awake app.

Checklist before you try again

  • The VM was fully shut down and started, not only restarted inside the guest.
  • The VM has an address that isn't 169.254.x.x.
  • A default via route (Linux) or a DHCP lease (macOS) exists.
  • ping 1.1.1.1 works from inside the VM.
  • VPN and network filters on the Mac are off for the test.
  • No two VMs share a MAC address.

What Hermitbox covers, and what it doesn't

We make Hermitbox, so check this against your own setup.

  • NAT only. Every Hermitbox VM uses Apple's NAT, shown as "Shared with this Mac (NAT)". That is the Fix 5 setup, and it is the only mode. There is no bridged networking.
  • Finding the address. With the VM running, the inspector's Connect section shows IP Address and Copy IP Address. It says "Waiting for an address…" until the VM has one; trying too early gives "No IP Address Yet". If you installed the command-line tool, hermitbox ip NAME prints the same address.
  • Duplicate MACs. In VM Settings ▸ Network, MAC address has a Regenerate button, with the VM shut down. Clones get a new MAC automatically.
  • Clean restart. Machine ▸ Shut Down (⌘.) asks the guest to shut down; Machine ▸ Force Stop (⌥⌘.) is "like pulling the plug"; start again with Start (⌘R). If a suspended VM misbehaves after resuming, Discard Saved State… makes it start fresh and loses unsaved work in the VM.
  • Linux restart. A restart from inside a Linux guest stops the VM in Hermitbox. Start it again from the library.
  • Sleep recovery is unverified. Hermitbox pauses running VMs when the Mac sleeps and resumes them on wake. We haven't verified that a guest's network recovers afterward. If it doesn't, use Fixes 1 to 4.

Hermitbox is part of MacSuite; you can try it free for 7 days. See the VM Settings reference, the automation page and Hermitbox troubleshooting.

If nothing works

Try the same VM on another network, such as a phone hotspot. If it works there, the cause is your router or Wi-Fi. Check whether other VMs on the Mac fail too; if all do, the cause is on the host. Then contact your VM app's developer, or MacSuite support for Hermitbox, with this:

text
Subject: VM has no network on my Mac

Host: macOS (version), Mac model
Guest: (OS and version)
VM app and version:
Network mode: NAT / bridged
When it started: (after sleep / after an update / always)
Exact alert title and message, if any:
Output of ip addr and ip route (Linux), or the TCP/IP tab (macOS):
Tried: full shut down and start, Mac restart, Wi-Fi off/on, VPN off

Common questions

Why does my VM lose its network only after sleep?

The reports we found involve a bridged adapter, which depends on the Mac's Wi-Fi or Ethernet link, and that link changes across sleep and wake. That is a likely explanation, not a confirmed one for every case. A full shut down and start is the fix people report.

Is bridged networking the cause?

Not always. The macOS report saw the problem in both bridged and shared modes. Bridged adds a dependency on the Mac's physical connection, so NAT is the simpler setup to test.

Does Hermitbox fix this automatically?

We can't promise that. It pauses and resumes VMs around sleep, but we haven't verified that guest networking recovers, so use the fixes above if it doesn't.

Can I use bridged networking in Hermitbox?

No. Hermitbox supports NAT only. If you need your VM to appear directly on your network, you need a VM app that offers bridged mode.

Every app.
One purchase.