diff --git a/README.md b/README.md index 7af2cd5..97acc6a 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ from the shared Windows 11 QCOW2 base image: It creates a persistent 64G disk at `vm/windows11/disk.qcow2` as a QCOW2 overlay on the base image and nothing else: the launcher only creates the differential disk and starts QEMU. The base image is generic and holds nothing -but Windows (see `vm-images/README.md`): no account, no SSH, no VirtIO or other +but Windows (see `vm-images/README.md`): no account, no SSH, no other hardware-specific drivers, no machine identity. Like a cloud image, each VM is configured on its first boot, from the seed ISO. @@ -186,9 +186,9 @@ turns off Windows Update and copies the numbered installer scripts (`seediso/windows11/NN-*.bat` and `.ps1`) to the desktop folder `Tools`. Later starts do not mount the seed ISO. -Because the image has no VirtIO drivers, the VM only uses devices that Windows -has inbox drivers for: an IDE disk and e1000e NIC on amd64, an NVMe disk, e1000e -NIC and ramfb display on arm64 (a fixed-size framebuffer there). The SPICE +The base image carries the VirtIO drivers (`build-windows-base.sh` installs them +from the virtio-win ISO before generalizing), so on arm64 the VM uses virtio-net and +virtio-gpu (2304x1440 on macOS); amd64 uses an IDE disk and an e1000e NIC. The SPICE vdagent and QEMU Guest Agent come with the VirtIO guest tools, so host/guest clipboard integration and the guest agent are not available unless you install those tools in the VM yourself. diff --git a/qemu/windows11/darwin-arm64.ini b/qemu/windows11/darwin-arm64.ini index 2304733..38bfc56 100644 --- a/qemu/windows11/darwin-arm64.ini +++ b/qemu/windows11/darwin-arm64.ini @@ -19,15 +19,20 @@ serial = "win11disk" bootindex = "1" -# Windows has no inbox driver for virtio-net or virtio-gpu, and the base image -# contains no VirtIO drivers, so the network card is an Intel e1000e and the -# display is ramfb (a fixed-size framebuffer). +# The base image carries the VirtIO drivers (build-windows-base.sh installs them +# from the virtio-win ISO), so the VM uses virtio-net and virtio-gpu. virtio-gpu +# is the only display, driven by viogpudo; ramfb is not added because Windows +# would then see a second adapter with a fixed-mode monitor. xres/yres set the +# preferred mode in the EDID (QEMU defaults to 1280x800); viogpudo accepted +# 1920x1200, 2048x1280 and 2304x1440 but not 2560x1440 or 2560x1600. [device "nic0"] - driver = "e1000e" + driver = "virtio-net-pci" netdev = "net0" [device "gpu0"] - driver = "ramfb" + driver = "virtio-gpu-pci" + xres = "2304" + yres = "1440" [device "kbd0"] driver = "usb-kbd" diff --git a/qemu/windows11/linux-arm64.ini b/qemu/windows11/linux-arm64.ini index 48f828d..9222d79 100644 --- a/qemu/windows11/linux-arm64.ini +++ b/qemu/windows11/linux-arm64.ini @@ -18,15 +18,20 @@ serial = "win11disk" bootindex = "1" -# Windows has no inbox driver for virtio-net or virtio-gpu, and the base image -# contains no VirtIO drivers, so the network card is an Intel e1000e and the -# display is ramfb (a fixed-size framebuffer). +# The base image carries the VirtIO drivers (build-windows-base.sh installs them +# from the virtio-win ISO), so the VM uses virtio-net and virtio-gpu. virtio-gpu +# is the only display, driven by viogpudo; ramfb is not added because Windows +# would then see a second adapter with a fixed-mode monitor. xres/yres set the +# preferred mode in the EDID (QEMU defaults to 1280x800); viogpudo accepted +# 1920x1200, 2048x1280 and 2304x1440 but not 2560x1440 or 2560x1600. [device "nic0"] - driver = "e1000e" + driver = "virtio-net-pci" netdev = "net0" [device "gpu0"] - driver = "ramfb" + driver = "virtio-gpu-pci" + xres = "2048" + yres = "1280" [device "kbd0"] driver = "usb-kbd" diff --git a/run-windows11.py b/run-windows11.py index d2400a7..576edef 100755 --- a/run-windows11.py +++ b/run-windows11.py @@ -97,8 +97,8 @@ scripts on the desktop). If the disk exists, start Windows normally, without the seed ISO. Make the base image once with vm-images/build-windows-base.sh; it installs Windows from the ISO and generalizes the result. The base image contains only -Windows (no account, no SSH, no VirtIO or other hardware-specific drivers), so -the devices in qemu/windows11 are ones Windows has inbox drivers for. +Windows plus the VirtIO drivers (no account, no SSH, no other +hardware-specific drivers). The VM hardware (accelerator, memory, CPUs, drives, devices) is defined in qemu/windows11/config.ini, which is rendered to qemu.ini in the state directory and loaded with QEMU's -readconfig, followed by qemu/windows11/-.ini (os is linux or darwin, arch is amd64 or arm64, chosen from the host system and diff --git a/vm-images b/vm-images index 91ae8cb..00695cd 160000 --- a/vm-images +++ b/vm-images @@ -1 +1 @@ -Subproject commit 91ae8cb1475d139de36c653daada09408496d390 +Subproject commit 00695cdddcdd6e1c11d34e67213ad6478ec92983