Files
harmony/examples/example_linux_vm
Jean-Gabriel Gill-Couture 65ef540b97
Some checks are pending
Run Check Script / check (pull_request) Waiting to run
feat: scaffold IoT walking skeleton — podman module, operator, and agent
- Add PodmanV0Score/IotScore (adjacent-tagged serde) and PodmanV0Interpret stub
- Gate virt behind kvm feature and podman-api behind podman feature
- Scaffold iot-operator-v0 (kube-rs operator stub) and iot-agent-v0 (NATS KV watch)
- Add PodmanV0 to InterpretName enum
- Fix aarch64 cross-compilation by making kvm/podman optional features
- Align async-nats across workspace, add workspace deps for tracing/toml/tracing-subscriber
- Remove unused deps (serde_yaml from agent, schemars from operator)
- Add Send+Sync to CredentialSource, fix &PathBuf → &Path, remove dead_code allow
- Update 5 KVM example Cargo.tomls with explicit features = ["kvm"]
2026-04-17 20:15:10 -04:00
..

Example: Linux VM from ISO

This example deploys a simple Linux virtual machine from an ISO URL.

What it creates

  • One isolated virtual network (linuxvm-net, 192.168.101.0/24)
  • One Ubuntu Server VM with the ISO attached as a CD-ROM
  • The VM is configured to boot from the CD-ROM first, allowing installation
  • After installation, the VM can be rebooted to boot from disk

Prerequisites

  • A running KVM hypervisor (local or remote)
  • HARMONY_KVM_URI environment variable pointing to the hypervisor (defaults to qemu:///system)
  • HARMONY_KVM_IMAGE_DIR environment variable for storing VM images (defaults to harmony data dir)

Usage

cargo run -p example_linux_vm

After deployment

Once the VM is running, you can connect to its console:

virsh -c qemu:///system console linux-vm

To access the VM via SSH after installation, you'll need to configure a bridged network or port forwarding.

Clean up

To remove the VM and network:

virsh -c qemu:///system destroy linux-vm
virsh -c qemu:///system undefine linux-vm
virsh -c qemu:///system net-destroy linuxvm-net
virsh -c qemu:///system net-undefine linuxvm-net