.xz
file would work seamlessly is ambiguous./bin/bash -c "$(curl -fsSL [<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>](<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>))"
brew install podman
Next, you will need to download the Ubuntu 22.04 ISO file from the official Ubuntu website. Make sure to select the X86 version of the operating system.
make sure your QEMU is running the latest version by running this command:
brew upgrade qemu
Issue the command qemu-system-x86_64 --version
to verify the QEMU emulator is version 7.0.0 or higher.
Now you are ready to create a podman VM using the x86_64 image use this command:
podman machine init --image-path <https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/36.20220703.3.1/x86_64/fedora-coreos-36.20220703.3.1-qemu.x86_64.qcow2.xz> intel
Don't start your VM yet, it won't work!
Now, you have a podman VM called intel
which is set to use the x86_64 image. Next, you need to configure the machine JSON file because podman assumes you're running the Arch64 image rather than the x86_64 image.
Navigate to the ~/.config/containers/podman/machine/qemu
directory. Open the file called ubuntu.json
in an editor to change the QEMU command line options. Before making any changes to this file, back up this file.
Near the top of the file, to launch the correct QEMU for your X86_64 container image, change
/opt/homebrew/bin/qemu-system-aarch64
to
/opt/homebrew/bin/qemu-system-x86_64
Then, remove the following properties, which aren't valid with qemu-system-x86_64:
"-accel",
"hvf",
"-accel",
"tcg",
"-cpu",
"host",
"-M",
"virt,highmem=on",
Next, change (DONT DELETE)
"-drive",
"file=/opt/homebrew/Cellar/qemu/7.2.0/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on",
to
"-drive",
"file=/opt/homebrew/Cellar/qemu/7.2.0/share/qemu/edk2-x86_64-code.fd,if=pflash,format=raw,readonly=on",
Also remove
"-drive",
"file=/Users/woensug/.local/share/containers/podman/machine/qemu/intel_ovmf_vars.fd,if=pflash,format=raw",
The podman configuration file is now correctly set up to launch the podman VM.
Reboot the machine