diff --git a/README.md b/README.md index 3eae0f77..9d6d3d9a 100644 --- a/README.md +++ b/README.md @@ -200,16 +200,10 @@ RUN echo "root:root" | chpasswd 2. **Build the disk image:** -> Build the disk image, this takes approximatley 2-5 minutes depending on the performance of your machine. +> Build the disk image, this takes approximately 2-5 minutes depending on the performance of your machine. ![](https://raw.githubusercontent.com/podman-desktop/podman-desktop-extension-bootc/main/docs/img/bootc_building.gif) -3. **Launching the VM:** - -> See our [Virtual Machine Guide](https://github.com/containers/podman-desktop-extension-bootc/blob/main/docs/vm_guide.md) on how to launch the image! - -![](https://raw.githubusercontent.com/podman-desktop/podman-desktop-extension-bootc/main/docs/img/os_booting.gif) - ## Preferences Preferences such as the default `bootc-builder-image` as well as timeouts can be adjusted within the **Preferences** section of Podman Desktop. diff --git a/docs/vm_guide.md b/docs/vm_guide.md deleted file mode 100644 index cef4113d..00000000 --- a/docs/vm_guide.md +++ /dev/null @@ -1,131 +0,0 @@ -# Disk Image Guide - -## Introduction - -Below is information on how you can deploy your image after building. - -There are **many** solutions to deploy a virtual machine image and this document does not encompass all of them. - -## General Solutions - -- `qcow`: QEMU is the primary software that utilizes both the QCOW and QCOW2 formats. These formats allow you to create, manage, and run virtual machines with features like better performance and snapshot capabilities. [QEMU](https://www.qemu.org/). -- `raw`: The raw image format is widely supported across many virtualization tools and cloud server providers. Software like KVM, VMware, and cloud platforms including AWS and Azure can utilize raw images. Libvirt, often used with KVM, also supports raw images extensively. [Libvirt](https://libvirt.org/). -- `anaconda-iso`: BalenaEtcher is recommended for writing unattended ISO installer files to storage devices to create bootable media. It's user-friendly and cross-platform. [Download balenaEtcher](https://www.balena.io/etcher/). -- `vmdk`: VMware Workstation and VMware ESXi are two prominent platforms that support the VMDK format. They provide comprehensive tools for running and managing virtual machines. [VMware Workstation](https://www.vmware.com/products/workstation-pro.html), [VMware ESXi](https://www.vmware.com/products/esxi-and-esx.html). -- `ami`: Amazon EC2 uses the AMI format to launch new virtual servers. You can manage AMIs using Amazon's own tools like AWS Management Console. [Amazon EC2](https://aws.amazon.com/ec2/). -- `vhd`: Usable on multiple applications such as Microsoft Hyper-V and Azure. -- `gce`: Image format used on Google Cloud Engine. - -## Recommended Development & Testing - -## Development on macOS (Silicon) - -### ARM64 (qemu) - -[qemu](https://www.qemu.org/) which emulates the architecture. - -**Installation:** - -``` -brew install qemu -``` - -**Usage:** - -**Important note:** Assuming you are running the example application, the command will port forward local port 8080 to 80. This can be changed in the below `qemu` command. - -1. Build a RAW image -2. Run the following command: - -```sh -# Change to your VM image location -export DISK_IMAGE=/Users/myusername/bootc/image/disk.raw - -# Run the qemu command -# note the 8080:80 port forwarding -qemu-system-aarch64 \ - -m 8G \ - -M virt \ - -accel hvf \ - -cpu host \ - -smp 4 \ - -serial mon:stdio \ - -nographic \ - -netdev user,id=usernet,hostfwd=tcp::8080-:80 \ - -device virtio-net,netdev=usernet \ - -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,format=raw,if=pflash,readonly=on \ - -drive file=$DISK_IMAGE,if=virtio,cache=writethrough,format=raw -``` - -3. `curl` your local port to check VM access `curl localhost:8080` -4. To exit the terminal, type: `Ctrl+a` then `x` - -### ARM64 (vfkit) - -[vfkit](https://github.com/crc-org/vfkit) which uses the native Apple hypervisor framework. - -NOTE: This will only run NATIVE architecture images. Your image must use the ARM64 output. - -**Installation:** - -``` -brew tap cfergeau/crc -brew install vfkit -``` - -**Usage:** - -1. Build a RAW image -2. Run the following command: - -```sh -# Change to your VM image location -export DISK_IMAGE=/Users/myusername/bootc/image/disk.raw - -# Launch VFkit -vfkit --cpus 2 --memory 2048 \ - --bootloader efi,variable-store=./efi-variable-store,create \ - --device virtio-blk,path=$DISK_IMAGE \ - --device virtio-serial,stdio \ - --device virtio-net,nat,mac=72:20:43:d4:38:62 \ - --device virtio-rng \ - --device virtio-input,keyboard \ - --device virtio-input,pointing \ - --device virtio-gpu,width=1920,height=1080 \ - --gui -``` - -### x86_64 / AMD64 (qemu) - -[qemu](https://www.qemu.org/) which emulates the architecture. - -**Installation:** - -``` -brew install qemu -``` - -**Usage:** - -**Important note:** Assuming you are running the example application, the command will port forward local port 8080 to 80. This can be changed in the below `qemu` command. - -1. Build a RAW image -2. Run the following command: - -```sh -# Change to your VM image location -export DISK_IMAGE=/Users/myusername/bootc/image/disk.raw - -# Run the qemu command -# note the 8080:80 port forwarding -qemu-system-x86_64 \ - -m 8G \ - -cpu Broadwell-v4 \ - -nographic \ - -netdev user,id=usernet,hostfwd=tcp::8080-:80 \ - -device virtio-net,netdev=usernet \ - -snapshot $DISK_IMAGE -``` - -3. `curl` your local port to check VM access `curl localhost:8080` -4. To exit the terminal, type: `Ctrl+a` then `x` diff --git a/docs/vm_launcher.md b/docs/vm_launcher.md deleted file mode 100644 index a58c2904..00000000 --- a/docs/vm_launcher.md +++ /dev/null @@ -1,26 +0,0 @@ -# Virtual Machine Launcher - -Virtual Machine support is **experimental** and is only meant to run _one VM at a time_ within the BootC extension. - -We launch the virtual machine by using QEMU. - -There are some caveats however: - -- The virtual machine is booted as a snapshot and writes data to a /tmp file. The .raw file will remain unmodified. All changes are discarded on shut down. -- VM is shutdown when changing to another page. -- Port 22 is forwarded to 2222 locally for SSH testing. The VM may be accessed by using ssh localhost -p 2222 on an external terminal. -- VM uses 4GB of RAM by default. - -## Installation - -### macOS - -Install QEMU on macOS by running the following with `brew`: - -```sh -brew install qemu -``` - -### Linux - -Install QEMU by [following the QEMU guide for your distribution](https://www.qemu.org/download/#linux).