Skip to content

qemu-guest-agent socket wrapper for provisioning command execution#26

Open
cyberd3ath wants to merge 3 commits intoEMCL-Research-ITSecLab:mainfrom
cyberd3ath:qemu-ga-fix-new-main
Open

qemu-guest-agent socket wrapper for provisioning command execution#26
cyberd3ath wants to merge 3 commits intoEMCL-Research-ITSecLab:mainfrom
cyberd3ath:qemu-ga-fix-new-main

Conversation

@cyberd3ath
Copy link
Copy Markdown
Collaborator

Description

Implements direct qemu-guest-agent socket communication to replace qm guest exec for all provisioning command execution.
Previously, provisioning commands were executed by using qm guest exec, which added Proxmox CLI overhead on every command and failed entirely on guest OSes not supported by the PVE toolchain. This PR introduces qemu_ga_wrapper.py, a purpose-built client that communicates directly with the QEMU guest agent over its AF_UNIX socket, and migrates all provisioning workflows to use it.
The wrapper is used across import_machine_templates.py, warmup_challenge.py, and launch_challenge.py for cloud-init completion waiting, guest agent readiness polling, and user-specific flag delivery to VMs.

Fixes #17

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Create Challenge
  • Launch challenge
  • Test currently unused functions read and write via the guest agent

Test Configuration:

  • OS: Ubuntu 22.04, VirtualBox 7.1.4
  • Proxmox Version: 9.1.1
  • Components affected: backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch from qm guest exec to raw qemu-guest-agent socket interaction for provisioning commands

1 participant