ovirt 4.2 为Centos linux虚拟机安装 guest agent

2.4.1. Red Hat Virtualization Guest Agents and Drivers

Oivrt guest agents 为Linux和Windows虚拟机提供了附加信息和功能,其中最核心的包括监控虚拟机资源使用和使用管理界面优雅的关闭或重启虚拟机

没有安装前虚拟机的IP地址无法获取

生产主要使用CentOS7.6的系统(其它CentOS系列基本相同),安装如下:

1
2
[root@dns01 ~]# yum install centos-release-ovirt42
[root@dns01 ~]# yum install -y ovirt-guest-agent-common

启动服务

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[root@dns01 ~]# systemctl start ovirt-guest-agent.service 
[root@dns01 ~]# systemctl enable ovirt-guest-agent.service
[root@dns01 ~]# systemctl status ovirt-guest-agent.service
● ovirt-guest-agent.service - oVirt Guest Agent
Loaded: loaded (/usr/lib/systemd/system/ovirt-guest-agent.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2019-02-02 22:38:38 CST; 2s ago
Process: 12089 ExecStartPre=/bin/chown ovirtagent:ovirtagent /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 12086 ExecStartPre=/bin/touch /run/ovirt-guest-agent.pid (code=exited, status=0/SUCCESS)
Process: 12083 ExecStartPre=/sbin/modprobe virtio_console (code=exited, status=0/SUCCESS)
Main PID: 12093 (python)
CGroup: /system.slice/ovirt-guest-agent.service
└─12093 /usr/bin/python /usr/share/ovirt-guest-agent/ovirt-guest-agent.py

Feb 02 22:38:38 dns01.talen.iot systemd[1]: Starting oVirt Guest Agent...
Feb 02 22:38:38 dns01.talen.iot systemd[1]: Started oVirt Guest Agent.
Feb 02 22:38:38 dns01.talen.iot userhelper[12101]: pam_succeed_if(ovirt-container-list:auth): requirement "user = ovirtagent" was met by user "ovirtagent"
Feb 02 22:38:38 dns01.talen.iot userhelper[12101]: running '/usr/share/ovirt-guest-agent/container-list' with root privileges on behalf of 'ovirtagent'
Feb 02 22:38:39 dns01.talen.iot userhelper[12103]: pam_succeed_if(ovirt-container-list:auth): requirement "user = ovirtagent" was met by user "ovirtagent"
Feb 02 22:38:39 dns01.talen.iot userhelper[12103]: running '/usr/share/ovirt-guest-agent/container-list' with root privileges on behalf of 'ovirtagent'

[root@dns01 ~]# systemctl start qemu-guest-agent.service
[root@dns01 ~]# systemctl enable qemu-guest-agent.service
[root@dns01 ~]# systemctl status qemu-guest-agent.service
● qemu-guest-agent.service - QEMU Guest Agent
Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-02-02 22:38:38 CST; 20min ago
Main PID: 12082 (qemu-ga)
CGroup: /system.slice/qemu-guest-agent.service
└─12082 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-ports/org.qemu.guest_agent.0 --blacklist=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,gue...

Feb 02 22:38:38 dns01.talen.iot systemd[1]: Started QEMU Guest Agent.

服务启动后提示消失,并能获取到虚拟机IP等信息.

坚持原创技术分享,您的支持将鼓励我继续创作!