当前位置: > 虚拟化 Virtualization > oVirt >

vdsm(2)配置和启动

时间:2019-11-23 18:21来源:linux.it.net.cn 作者:IT
vdsm的配置文件是/etc/vdsm/vdsm.conf



1)配置vdsm关闭ssl

因为vdsm和ovirt-engine之间使用ssl通信配置比较复杂,因此先关闭它。

在vdsm.conf中修改

ssl = false
如果这个时候使用service vdsmd start尝试启动vdsm服务的话,会得到一个报错

[root@cg ~]# service vdsmd start
vdsm: Running mkdirs
vdsm: Running configure_coredump
vdsm: Running configure_vdsm_logs
vdsm: Running run_init_hooks
vdsm: Running gencerts
hostname: 未知的主机
vdsm: Running check_is_configured
libvirt is not configured for vdsm yet
Modules libvirt are not configured
 Traceback (most recent call last):
  File "/usr/bin/vdsm-tool", line 145, in <module>
    sys.exit(main())
  File "/usr/bin/vdsm-tool", line 142, in main
    return tool_command[cmd]["command"](*args[1:])
  File "/usr/lib64/python2.6/site-packages/vdsm/tool/configurator.py", line 283, in isconfigured
    raise RuntimeError(msg)
RuntimeError:

One of the modules is not configured to work with VDSM.
To configure the module use the following:
'vdsm-tool configure [module_name]'.
vdsm-tool configure --module libvirt
If all modules are not configured try to use:
'vdsm-tool configure --force'
(The force flag will stop the module's service and start it
afterwards automatically to load the new configuration.)

vdsm: stopped during execute check_is_configured task (task returned with error code 1).
vdsm start                                                 [失败]

为了解决这个问题,执行命令vdsm-tool configure --module libvirt并根据提示修改libvirtd.conf和qemu.conf。

libvirtd.conf: listen_tcp=1, auth_tcp="none",
qemu.conf: spice_tls=0.

然后重新执行vdsm-tool configure --module libvirt。


2)service vdsmd start启动VDSM服务

3)使用vdsClient localhost getVdsHardwareInfo命令测试vdsmd服务器是否正常运行

[root@cg vdsm]# vdsClient localhost getVdsHardwareInfo
    systemFamily = 'Zhaoyang E49L'
    systemManufacturer = 'LENOVO'
    systemProductName = '20178'
    systemSerialNumber = 'WB14807163'
    systemUUID = '14BDB781-53FD-11CB-A82B-86C3852A29B1'
    systemVersion = 'Zhaoyang E49L'

4)这里因为vdsClient和vdsmd都在同一台机器上,所以没有为vdsmd服务指定其rpc绑定的IP,而vdsClient直接使用localhost进行连接。

查询到此时vdsmd的   management_ip = '0.0.0.0'

lastClient = '127.0.0.1'
lastClientIface = 'lo'
management_ip = '0.0.0.0'

如果不再同一台设备上,可以在vdsm.conf中配置参数management_ip来指定vdsmd绑定的ip,并在vdsClient命令行指定此IP。

到这里,可以使用vdsClient来测试vdsm的所有特性了。





================================================



如果和engine配合使用,engine要求运行vdsm的host机器上,必须使用名为ovirtmgmt的桥接网卡,参考

http://wiki.centos.org/zh/HowTos/oVirt

中的桥接网卡配置脚本。在笔记本上测试,本地环回网卡lo和无线网卡wlan0都无法作为桥接网卡,最终使用独立的eth0配置了桥接网卡,网路配置如下。

[root@cg network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 54:EE:75:18:3F:2C  
          inet6 addr: fe80::56ee:75ff:fe18:3f2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2753 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3367 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2165372 (2.0 MiB)  TX bytes:523287 (511.0 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:13706 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13706 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10022647 (9.5 MiB)  TX bytes:10022647 (9.5 MiB)

ovirtmgmt Link encap:Ethernet  HWaddr 54:EE:75:18:3F:2C  
          inet addr:192.168.0.107  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::56ee:75ff:fe18:3f2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2049885 (1.9 MiB)  TX bytes:516474 (504.3 KiB)

wlan0     Link encap:Ethernet  HWaddr 18:CF:5E:02:8F:52  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::1acf:5eff:fe02:8f52/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1924 (1.8 KiB)  TX bytes:1576 (1.5 KiB)
          Interrupt:17 Memory:ffffc90005238000-ffffc90005238100 



(责任编辑:IT)
------分隔线----------------------------