Skip to content

bug: macOS VM fails to start: bundled OVMF_CODE.fd is invalid size (297980 bytes) causing QEMU pflash0 error #1867

@Jvr2022

Description

@Jvr2022

I confirm this bug has not already been reported

  • I have searched the issues and this bug has not been reported previously

Describe the bug
On Kali (Debian-based) with QEMU 10.2.0 and Quickemu 4.9.8, starting a macOS VM fails because Quickemu/quickget provides an OVMF_CODE.fd in the VM directory that is not a non-zero multiple of 0x1000 bytes. QEMU errors with:

system firmware block device pflash0 has invalid size 297984

This prevents macOS VMs from starting.

To Reproduce
Run quickemu --vm macos-tahoe.conf

quickemu --vm macos-tahoe.conf

Quickemu 4.9.8 using /usr/bin/qemu-system-x86_64 v10.2.0
 - Host:     Kali GNU/Linux Rolling running Linux 6.17.10+kali-amd64 pc-363
 - CPU:      Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz 
 - CPU VM:   host, 1 Socket(s), 4 Core(s), 1 Thread(s)
 - MSR:      WARNING! Ignoring unhandled Model-Specific Registers is disabled.

             echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs

             If you are unable to run macOS or Windows VMs then run the above 👆
             This will enable ignoring of unhandled MSRs until you reboot the host.
             You can make this change permanent by running: 'quickemu --ignore-msrs-always'
 - RAM VM:   8G RAM
 - BOOT:     EFI (macOS), OVMF (OVMF_CODE.fd), SecureBoot (off).
 - Disk:     macos-tahoe/disk.qcow2 (128G)
             Looks unused, booting from macos-tahoe/RecoveryImage.img
 - Recovery: macos-tahoe/RecoveryImage.img
 - Display:  SDL, VGA, GL (on), VirGL (off) @ (1280 x 800)
 - Sound:    intel-hda (hda-micro)
 - ssh:      On host:  ssh user@localhost -p 22220
 - 9P:       On guest: sudo mount_9p Public-joshua
 - 9P:       On host:  chmod 777 /home/joshua/Public
             Required for macOS integration 👆
 - smbd:     On guest: smb://10.0.2.4/qemu
 - Network:  User (virtio-net-pci)
 - Monitor:  On host:  socat -,echo=0,icanon=0 unix-connect:macos-tahoe/macos-tahoe-monitor.socket
 - Serial:   On host:  socat -,echo=0,icanon=0 unix-connect:macos-tahoe/macos-tahoe-serial.socket
 - Process:  ERROR! Failed to start macos-tahoe.conf as macos-tahoe

qemu-system-x86_64: system firmware block device pflash0 has invalid size 297984
qemu-system-x86_64: info: its size must be a non-zero multiple of 0x1000

Expected behaviour
The vm should start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions