Install QEMU Guest Agent
The QEMU Guest Agent is a helper daemon, which is installed in the guest. It is used to exchange information between the host and guest, and to execute command in the guest. The agent uses QEMU's native guest agent. The official agent is a comprehensive and reliable choice in terms of security endorsement, maintenance, and stability.
Elastic Compute offers a high-level view of your instance metrics using the Performance tab in zenConsole. All instances have basic performance data available when they are created. However, installing the QEMU guest agent provides deeper insights into instance behavior including the following additional metrics:
System Load Average - Last 1 Minute
System Load Average - Last 5 Minutes
System Load Average - Last 15 Minutes
Memory Utilization
Disk Utilization
Uptime
For instances with Rocky, CentOS, AlmaLinux, Alpine and FreeBSD operating systems, you need to manually configure the agent on the instance to activate it by following the steps below.
Rocky/CentoS/AlmaLinux
The agent is disabled by default. You need to modify the /etc/sysconfig/qemu-ga file.
Open the file in a text editor:
sudo vi /etc/sysconfig/qemu-gaUpdate the
FILTER_RPC_ARGSto enable the desired RPCs. Add the following line or modify it if it already exists:FILTER_RPC_ARGS="--block-rpcs=guest-file-seek,guest-file-flush,guest-exec,guest-exec-status" # Guest agent command with comma-separated allowed RPCs to enable, # or empty list to disable all. # # You can get the list of RPC commands using "qemu-ga --allow-rpcs='?'". # There should be no spaces between commas and commands in the allow list. FILTER_RPC_ARGS="--allow-rpcs=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-sync-delimited,guest-sync,guest-ping,guest-get-time,guest-set-time,guest-info,guest-shutdown,guest-fsfreeze-status,guest-fsfreeze-freeze,guest-fsfreeze-freeze-list,guest-fsfreeze-thaw,guest-fstrim,guest-suspend-disk,guest-suspend-ram,guest-suspend-hybrid,guest-network-get-interfaces,guest-get-vcpus,guest-set-vcpus,guest-get-disks,guest-get-fsinfo,guest-set-user-password,guest-get-memory-blocks,guest-set-memory-blocks,guest-get-memory-block-info,guest-get-host-name,guest-get-users,guest-get-timezone,guest-get-osinfo,guest-get-devices,guest-ssh-get-authorized-keys,guest-ssh-add-authorized-keys,guest-ssh-remove-authorized-keys,guest-get-diskstats,guest-get-cpustats"Restart the QEMU guest agent service
sudo systemctl restart qemu-guest-agent
Alpine Linux
The agent is disabled by default.
Start the QEMU guest agent service:
Check the status of the QEMU guest agent service:
Edit the QEMU guest agent init script:
Open the init script in a text editor:
Find the
command_argsline and modify it to enable verbose logging:
Restart the QEMU guest agent service:
FreeBSD
The agent is disabled by default. You can view the official documentation for more details.
Modify
/etc/rc.confto enable the QEMU guest agent:Open
/etc/rc.confin a text editor:Add the following lines to enable and configure the QEMU guest agent:
Start the QEMU guest agent service:
Verify the status of the QEMU guest agent service:
Expected Outputs
Service status when not running:
Service start output:
Service status when running:
Last updated