Page MenuHomeVyOS Platform

Add qemu-guest-agent into VyOS ISO
Closed, ResolvedPublicFEATURE REQUEST

Description

Requested from the forums @ https://forum.vyos.io/t/add-kvm-qemu-guest-agent-to-vyos-iso/1731

Can be done by adding qemu-guest-agent to the ISO.

Details

Difficulty level
Easy (less than an hour)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

Will be in the next rolling version.

c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).

@c-po Looks like Debian has it for all platforms that support KVM, including ARM (though, oddly, not Aarch64). Perhaps we should move it from the x86 package list to vyos-world or another platform-independent place at some later point.

Sounds reasonable ... but I have nothing to test.

I confirmed qemu-ga works correctly on libvirt with vagrant-libvirt.

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "vyos/current"
  config.vm.provider :libvirt do |libvirt|
    libvirt.channel type: 'unix',
                    target_name: 'org.qemu.guest_agent.0',
                    target_type: 'virtio'
  end
end

Results

sudo virsh qemu-agent-command test_default '{"execute":"guest-info"}'
{"return":{"version":"2.1.2","supported_commands":[{"enabled":true,"name":"guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-get-vcpus","success-response":true},{"enabled":true,"name":"guest-network-get-interfaces","success-response":true},{"enabled":true,"name":"guest-suspend-hybrid","success-response":false},{"enabled":true,"name":"guest-suspend-ram","success-response":false},{"enabled":true,"name":"guest-suspend-disk","success-response":false},{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{"enabled":true,"name":"guest-file-flush","success-response":true},{"enabled":true,"name":"guest-file-seek","success-response":true},{"enabled":true,"name":"guest-file-write","success-response":true},{"enabled":true,"name":"guest-file-read","success-response":true},{"enabled":true,"name":"guest-file-close","success-response":true},{"enabled":true,"name":"guest-file-open","success-response":true},{"enabled":true,"name":"guest-shutdown","success-response":false},{"enabled":true,"name":"guest-info","success-response":true},{"enabled":true,"name":"guest-set-time","success-response":true},{"enabled":true,"name":"guest-get-time","success-response":true},{"enabled":true,"name":"guest-ping","success-response":true},{"enabled":true,"name":"guest-sync","success-response":true},{"enabled":true,"name":"guest-sync-delimited","success-response":true}]}}

sudo virsh qemu-agent-command test_default '{"execute":"guest-network-get-interfaces"}'
{"return":[{"name":"lo","ip-addresses":[{"ip-address-type":"ipv4","ip-address":"127.0.0.1","prefix":8},{"ip-address-type":"ipv6","ip-address":"::1","prefix":128}],"hardware-address":"00:00:00:00:00:00"},{"name":"eth0","ip-addresses":[{"ip-address-type":"ipv4","ip-address":"192.168.121.130","prefix":24},{"ip-address-type":"ipv6","ip-address":"fe80::5054:ff:fe58:47ae","prefix":64}],"hardware-address":"52:54:00:58:47:ae"}]}
syncer triaged this task as Low priority.
syncer moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.0-rc1) board.