Operating-system: add support for qemu-guest-agent

Created on 17 Sep 2019  路  12Comments  路  Source: home-assistant/operating-system

Please add support in hassio for the qemu-guest-agent

https://wiki.qemu.org/Features/GuestAgent

Most helpful comment

For everyone else struggling with this - make sure to enable the Qemu agent support on the host node first so that the appropriate device is created in the guest. You likely need to shut down and restart the guest. Then the qemu-ga should run fine in the guest.

All 12 comments

I use hassos in Proxmox VE, qemu-guest-agent could be used for:

1-Properly shutdown the guest, instead of relying on ACPI commands
2-Freeze the guest file system when making a backup
3-Fix high memory usage report due to the way QEMU reports VM resources to Proxmox without guest tools installed

I don't block this, make sure that the guest agent is only started on the correct virtualisation like vmware tools.

@pvizeli I am not sure what you are trying to say.

There doesn't seem to be a straight forward way to install qemu-guest-agent or anything to hassos. This can't be installed as a container.

It's buildroot on that repository, not containers. You need learn how buildroot work and you are able to create an PR with this feature. You can look at it as hacktoberfest chellange

I searched to find how it is possible to determine the virtualisation technology being used and found:

https://unix.stackexchange.com/questions/89714/easy-way-to-determine-virtualization-technology

It seems dmidecode would be a really useful command to determine the virtualisation technology being used:

dmidecode -s system-product-name
VMware Virtual Platform

dmidecode -s system-product-name
VirtualBox

root@router:~# dmidecode -s system-product-name
KVM

Would it be reasonable to include it in Hassos for this purpose?

Regards,
Michal

Because we use systemd, you can easy say which service should start on which virtualization. We do that for vmware tools.

However, I do not add or work on this feature. If someone implement it and make a PR, I'm fine to merge this.

That's way over my head for now.

I was not able to figure out how VMware was detected and then I couldn't figure out how to build (or if it's possible) the qemu-guest-agent without also building the entirety of Qemu.

Maybe someone else is a bit more capable? I should be able to test patches if that helps.

https://buildroot.org/downloads/manual/manual.html

We simplify some steps with make script and docker but to contribute to this project, you need understand how buildroot work. For small things like detect the virtualisation, I can help you on the PR.

FYI: As I am maintaining a similar buildroot-based operating system project (see https://github.com/jens-maus/RaspberryMatic) and just introduced virtual/ova support in the latest version, I also stumbled over the missing qemu-guest-agent in buildroot and just developed an adequate buildroot package myself.

See here for more information:
https://github.com/jens-maus/RaspberryMatic/tree/master/buildroot-external/package/qemu-guest-agent

Feel free to grab that for your own purposes here in hass-os

@jens-maus cool, thanks

Sorry, I'm really dumb when it comes to tracing github merges. Is this supposed to now be in HassOS? I'm on HassOS 3.9 with the beta Supervisor (199) and I still get an error about qemu guest agent not starting when I watch HassOS load up. Cheers!

For everyone else struggling with this - make sure to enable the Qemu agent support on the host node first so that the appropriate device is created in the guest. You likely need to shut down and restart the guest. Then the qemu-ga should run fine in the guest.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergiofraiman picture sergiofraiman  路  15Comments

Meph79 picture Meph79  路  5Comments

tboyce021 picture tboyce021  路  13Comments

pvizeli picture pvizeli  路  4Comments

rradar picture rradar  路  10Comments