Windows Guests

SwiftVM runs Windows 11 for Arm on Apple silicon. It can download Windows from Microsoft or use an Arm64 ISO you already have, then install Windows and set up your account automatically.

Creating#

Choose Windows in the Type dropdown, enter an account password, and choose Create. Installation can take about half an hour, depending on your Mac and internet connection. You can keep using your Mac while it runs.

To use your own installer, choose Choose ISO…. The ISO must be Windows 11 for Arm64; installers for Intel and AMD processors are not supported.

Graphics acceleration (experimental) is off by default. The display-only driver stays sharp at any window size but draws more slowly; see Graphics acceleration.

Under Advanced, you can change the account name, processors, memory, disk size, storage location, and whether to install your SSH key. Windows needs at least 4 GB of memory and a 64 GB disk. You can also keep the disk compressed.

From the command line:

swiftvm create windows --password 'your password'
swiftvm create windows --iso ~/Downloads/Win11_Arm64.iso --password 'your password' --memory 8
swiftvm create windows --password 'your password' --no-gpu

SwiftVM downloads the required drivers and caches downloads for reuse. If Microsoft blocks the automatic download, download the ISO from Microsoft's Windows 11 Arm64 page and select it with Choose ISO….

What gets installed#

  • Windows 11 Pro. You need your own license to activate it in Windows Settings.
  • Your administrator account, with automatic sign-in.
  • Device drivers and the guest tools, including clipboard sharing and display resizing.
  • SSH, when Windows Update is reachable. If you enabled Sign in over SSH with my key, SwiftVM installs your Mac's SSH key. SSH sessions use PowerShell.

The machine's window shows setup progress. Windows restarts when setup finishes, and SwiftVM removes the installation discs.

Graphics acceleration#

GPU acceleration is experimental and off by default for new Windows machines. Turn it on when creating the machine, or pass --gpu to swiftvm create windows, to install the signed 3D driver. Once the guest tools report that it is installed, the next cold boot uses your Mac's GPU. Windows Setup uses the firmware framebuffer before the driver is available.

Direct3D and OpenGL#

The 3D driver hands Windows' Direct3D to your Mac, which draws it with one of two backends:

DXMT D3DMetal
Direct3D 10 and 11 Yes Yes
Direct3D 12 No Yes
OpenGL Windows' own, version 1.1, in software 4.2, through Microsoft's compatibility pack, on Direct3D 12
What it takes Nothing: it comes with SwiftVM Apple's Game Porting Toolkit, and Rosetta

Machines use D3DMetal when it and Rosetta are installed, and DXMT otherwise. Settings → Graphics shows which one machines use. A machine picks up a change the next time it starts.

To use D3DMetal:

  1. Download the Game Porting Toolkit from Apple's developer site (an Apple Account is enough). Open its disk image, then the Evaluation environment for Windows games disk image inside it. SwiftVM can't include D3DMetal: Apple's licence covers it, and you accept that licence yourself.
  2. In SwiftVM, open Settings → Graphics, choose Choose… next to D3DMetal, and select the Evaluation environment for Windows games volume, or the D3DMetal.framework in its redist/lib/external folder. SwiftVM keeps a copy, so you can eject the images afterwards.
  3. If Rosetta isn't installed, choose Install… next to Rosetta. D3DMetal is x86-64 code, which SwiftVM runs under Rosetta.
  4. Shut the Windows machine down and start it again.

Shut Windows machines down before you remove or replace D3DMetal: a running machine loads it again for each app that starts drawing.

To keep every machine on DXMT, turn on Always use DXMT, for example if an app draws incorrectly with D3DMetal.

The 3D driver doesn't bring OpenGL. Machines that have it install Microsoft's OpenCL, OpenGL, and Vulkan Compatibility Pack from the Microsoft Store when the account first signs in, and try again at each sign-in until it is there. The pack draws OpenGL with Direct3D 12, and the version apps get depends on what that Direct3D 12 supports: with D3DMetal from Game Porting Toolkit 4.0 beta 3, it is OpenGL 4.2, in the core and the compatibility profile. Apps that need a later version don't start. With DXMT there is no Direct3D 12 for it to draw with, and apps get only Windows' own OpenGL 1.1, drawn in software.

Direct3D 12 through D3DMetal is newer and less tested than Direct3D 11.

The first time a machine uses D3DMetal, macOS may say that SwiftVM includes a component that won't open in macOS 28. That component is the part of SwiftVM that runs D3DMetal under Rosetta: D3DMetal's code is for Intel processors. If a later macOS doesn't run it, machines use DXMT, with Direct3D 11.

Machines whose 3D driver came with guest tools older than 1.8 need their guest tools updated: the driver and SwiftVM have to match, and an older driver may draw without acceleration, or not at all, until then.

Window size and sharpness#

SwiftVM requests the window's size in your Mac's pixels and sets Windows' scale separately (200% on a Retina display), rather than enlarging a smaller desktop. Machines without graphics acceleration use the display-only driver's resizing. With graphics acceleration, guest tools 1.9 or newer enable live resizing once they confirm the bundled v0.5 3D driver is active. After updating the tools, shut Windows down and start it again to finish any driver changes.

Older or unrecognized 3D drivers keep the pixel-for-pixel startup size instead. A new machine's window is sized to fit your screen, and the window takes Windows' size when it opens. If you resize that window, Windows keeps its size and the window shows it scaled. Sharpen Display then appears in the title bar:

  • Restart at This Size restarts Windows, which then starts at the window's new size. Open apps close, as in any restart.
  • Return to Sharp Size gives the window back the size Windows is sharp at.

For a fixed 5K desktop, turn off Resize to Fit Window in the machine's Hardware settings and choose 5120 × 2880 under Resolution, then restart Windows. SwiftVM requests that resolution and its configured scale with either driver. A fixed desktop is only shown pixel for pixel when the window's backing size matches it; shrinking the window still scales the picture.

After updating SwiftVM, shut Windows down and start it again before switching to 5K. Resuming a suspended machine keeps its previous display-device settings.

Refresh rate#

With graphics acceleration, Windows draws as many frames a second as your Mac's screen shows: 120 on a ProMotion display, 60 on most others. Settings → System → Display → Advanced display in Windows shows the rate.

Windows takes the rate when it starts or restarts, from the fastest screen connected to your Mac then, up to 120 Hz, and keeps it until the next time. A machine started with only a 60 Hz screen connected stays at 60 on a ProMotion display you connect or open later, until you restart Windows.

This needs the bundled v0.5 3D driver, which guest tools 1.9 or newer install. Machines without graphics acceleration draw at up to 60 frames a second.

The experimental graphics stack can produce missing text, rendering failures, hangs, Windows crashes, or unexpected VM stops, including during shutdown. Use a disposable guest, not a machine you rely on, and keep important files backed up. GPU acceleration does not yet guarantee reliable window resizing or Retina quality at every resolution.

A machine keeps the display driver it was created with. Updating the guest tools updates that driver and doesn't switch between the display-only and the 3D one.

Custom builds can leave Direct3D out with SWIFTVM_QEMU_DIRECT3D=0. They install the display-only driver for new machines. A machine that already has the 3D driver falls back to the firmware framebuffer when opened in a build without Direct3D. This is a build setting, not a per-VM switch.

Accelerated machines cannot suspend or save running graphics state. Shut Windows down before taking a snapshot or quitting SwiftVM.

Mouse pointer#

SwiftVM draws Windows' pointer as the Mac's own: the same shapes Windows uses, including the text, hand and resize pointers that apps give it, moved by the Mac at the speed of the Mac's pointer. Windows' display drivers draw the pointer into the desktop themselves, a frame or more behind the mouse, so the pointer in a machine without current guest tools can feel less immediate, with or without graphics acceleration.

Windows keeps drawing the pointer on its lock screen and on the questions it asks over the desktop, such as the one an elevation asks. Cursors that invert the background, or are larger than 128 × 128 guest pixels, also stay Windows-drawn rather than losing their appearance or accessibility size. These fallback pointers still move with Windows' display updates.

The guest tools draw it this way from 1.10 on. Install Guest Tools… updates them in a machine that has older ones.

Seamless Mode#

Seamless Mode puts each Windows app in a window of its own on your Mac's desktop, instead of showing the whole Windows desktop in the machine's window. Windows apps sit alongside your Mac apps, switch with Command-`, and appear in Mission Control.

To turn it on for a running machine, choose Enter Seamless Mode in the machine's menu in the menu bar, in the window toolbar's Power menu, or in the Virtual Machine menu. The machine's window closes and its open apps appear on your desktop. To open the Start menu, click SwiftVM in the Dock or choose Show Start Menu. The Start menu opens above the Dock, and apps you start from it open as windows of their own.

Drag a window by its title bar to move it, as you would a Mac window. Windows moves its own window there when you let go. Resize a window by dragging its edges or corners, as you would a Mac window. You can grab an edge from just outside it, and the pointer shows when you can. Windows resizes its own window as you drag. Windows' own buttons minimize, maximize, and close windows, and double-clicking a title bar maximizes the window.

To leave, choose Exit Seamless Mode in the machine's menu. The machine's window opens again with the whole desktop. Seamless Mode also ends when the machine shuts down or is suspended.

Seamless Mode requires guest tools 1.4 or newer. If Enter Seamless Mode is unavailable, choose Install Guest Tools… to update them.

  • Windows' screen is laid over the area between the menu bar and the Dock on your Mac's main display. Its taskbar is not shown, and maximized windows fill that area. Windows' screen is resized to fit that area when its driver supports live resizing. With an older or unrecognized 3D driver, Windows keeps its startup size and its windows are scaled to fit; see Window size and sharpness.
  • Windows appear on the main display only, and stay in the area between the menu bar and the Dock.
  • Menus and the Start menu close when you switch to another app.
  • Windows' animation effects are off during Seamless Mode, so the Start menu and windows appear without sliding or fading. They come back when you leave.
  • Each app's window belongs to SwiftVM, so Windows apps do not get their own Dock icons.
  • Like the machine's window, Seamless Mode sends Command shortcuts to Windows when Send System Shortcuts to the Guest is on.

Guest tools and automation#

The guest tools are installed automatically. To install or update them in an existing Windows guest, follow the Windows guest tools instructions.

With the tools, swiftvm exec runs commands and swiftvm cp copies files. Commands run as the configured account while it is logged in, or as SYSTEM with --root. Screenshots, mouse actions, and keyboard input work without the tools. See Automation.

Shared folders#

Folders you share from your Mac appear on drive Z: in File Explorer. This requires the guest tools and a connection to SwiftVM's virtual network. Changes to the shared-folder list apply while the machine runs. See Shared folders.

TPM#

Windows machines have a TPM 2.0, which Windows 11 and apps that keep their keys in a TPM look for. Turn it off in the machine's Startup settings while it is shut down.

The TPM's contents, its keys among them, are kept in the machine as tpm-state.bin. They go with its snapshots, duplicates, and templates.

BitLocker can't use the TPM yet: that needs Secure Boot, which Windows machines don't have. Windows that SwiftVM installs doesn't encrypt its disk by itself.

Machines made before SwiftVM had a TPM get one the next time they start up fresh. A machine resuming saved memory continues with the hardware it was saved with.

Remote Desktop#

Enable Settings > System > Remote Desktop in Windows, then connect to the machine's address from a Remote Desktop app on your Mac. Use the Windows account name and password you chose during creation.

Limitations#

  • Windows uses QEMU, included with SwiftVM, with hardware acceleration for the processor. GPU acceleration is experimental; graphics compatibility and performance vary. See Graphics acceleration.
  • Physical USB devices and microphone input are not supported. Disc and disk images can still be attached as removable drives.
  • Display resizing requires someone to be logged in. The sign-in screen keeps its previous size.
  • Seamless Mode supports Windows guests only, on your Mac's main display.
  • Secure Boot is unavailable; software that requires it will not work, and BitLocker can't use the TPM.
  • The TPM has no manufacturer's certificate, so services that check one, such as device attestation, do not accept it. Get-Tpm in PowerShell reports an error, although Windows and apps use the TPM.
  • Attached disk images must be raw or ISO; ASIF is unsupported.
  • Duplicates and machines made from a template keep the original Windows computer name. Rename them in Windows Settings if they will run together.

Edit this page on GitHub