Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add QEMU Guest Agent #6152

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add QEMU Guest Agent #6152

wants to merge 2 commits into from

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Jun 19, 2024

Description

  • initial version of qemu-ga, builds for arch-x64-7.1 only

Fixes #6019

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • New Package

- initial version, builds for arch-x64-7.1 only
@hgy59
Copy link
Contributor Author

hgy59 commented Jun 19, 2024

@sgelineau17 can you please try, whether this works with proxmox?

@tofuHero
Copy link

this qemu-ga build is not work on my DSM vm.

this is DSM vm setting:
图片

and this vm status:
图片

qemu-ga is installed on this vm:
图片

qemu-ga command output:

root@a300-DS920plus:~# qemu-ga 
1720684752.201439: critical: failed to write persistent state to /var/packages/qemu-ga/var/run/qga.state: Failed to create file “/var/packages/qemu-ga/var/run/qga.state.TI8LQ2”: No such file or directory
1720684752.201478: critical: unable to create state file at path /var/packages/qemu-ga/var/run/qga.state
1720684752.201488: critical: failed to load persistent state
1720684752.201495: critical: error initializing guest agent

@hgy59
Copy link
Contributor Author

hgy59 commented Jul 11, 2024

@tofuHero did you try to add the missing folder /var/packages/qemu/var/run ?

after creating the run folder, I get a different error (not running under qemu/proxmox):

$ sudo qemu-ga
1720716108.104297: critical: error opening channel '/dev/virtio-ports/org.qemu.guest_agent.0': No such file or directory
1720716108.104594: critical: failed to create guest agent channel
1720716108.104675: critical: failed to initialize guest agent channel

@r0bb10
Copy link

r0bb10 commented Jul 11, 2024

@tofuHero did you try to add the missing folder /var/packages/qemu/var/run ?

after creating the run folder, I get a different error (not running under qemu/proxmox):

$ sudo qemu-ga
1720716108.104297: critical: error opening channel '/dev/virtio-ports/org.qemu.guest_agent.0': No such file or directory
1720716108.104594: critical: failed to create guest agent channel
1720716108.104675: critical: failed to initialize guest agent channel

i've done that and also got this error.

@hgy59
Copy link
Contributor Author

hgy59 commented Jul 11, 2024

@r0bb10 I did some analysis on the qemu-ga package of https://spk7.imnks.com/

  1. qemu-ga runs as a service
  2. the service must run as root, so you have to patch the privilege file after installation and each update (to replace package by root) and then restart the package
  3. the package installs the var/run folder
  4. the package includes two kernel modules for console (hvc_console.ko and virtio_console.ko)
  5. before service start:
    • the package loads the console modules on demand with insmod
    • the package creates the virtio-ports device on demand (and binds /dev/vport1p1 to /dev/virtio-ports/org.qemu.guest_agent.0)
    • the package creates the folder /var/local/run on demand

We could clone the functions of the implementation by imnks.com/jim.plus, but I doubt that it will be more stable.

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.

Qemu Guest Agent for Synology VM on Proxmox
3 participants