我正在使用 libvirt、qemu 和 python 实现一个实时迁移管理工具。在我的原始设置中,包括两个 Debian 盒子,我可以毫无问题地迁移和监控迁移,但是,在我使用 CentOS 6.4 的生产设置中,我必须将 qemu 和 libvirt 重新编译到更新版本以支持压缩迁移。问题是,即使迁移似乎正常工作,监控也会返回错误:
libvirt: XML-RPC error : Too many job stats '19' for limit '16'
Traceback (most recent call last):
File "./migrate_monitor_migration.py", line 27, in <module>
remaining = vm.vm_status()
File "/software/test/VMMigration.py", line 70, in vm_status
return self.__update_migration_status()
File "/software/test/VMMigration.py", line 40, in __update_migration_status
dictionary = self.vm_job_stats()
File "/software/test/VMMigration.py", line 37, in vm_job_stats
return self.local_dom.jobStats()
File "/usr/local/libvirt/lib64/python2.6/site-packages/libvirt.py", line 2045, in jobStats
if ret is None: raise libvirtError ('virDomainGetJobStats() failed', dom=self)
libvirt.libvirtError: Too many job stats '19' for limit '16'
可以观察到,访问域的 jobStats 函数时会引发错误。
奇怪的问题是,虽然没有正在进行的迁移,但监控正确地访问了监控。
为了补充信息,我附上了 libvirtd.log 的一部分:
2013-09-22 07:02:22.806+0000: 2652: error : qemuMonitorIO:616 : internal error: End of file from monitor
2013-09-22 07:05:34.120+0000: 2654: warning : qemuOpenVhostNet:495 : Unable to open vhost-net. Opened so far 0, requested 1
2013-09-22 07:05:34.120+0000: 2654: warning : qemuDomainObjTaint:1558 : Domain id=11 name='TESTVM' uuid=348ba295-7665-b7f2-020c-04303c5896a1 is tainted: high-privileges
2013-09-22 07:05:34.154+0000: 2654: error : virDBusCallMethod:1156 : The name org.freedesktop.machine1 was not provided by any .service files
2013-09-22 07:06:16.177+0000: 2655: warning : qemuMigrationCancelDriveMirror:1383 : Unable to stop block job on drive-virtio-disk0
2013-09-22 07:10:41.637+0000: 2653: warning : qemuMigrationCancelDriveMirror:1383 : Unable to stop block job on drive-virtio-disk0
2013-09-22 07:12:00.657+0000: 2657: warning : qemuMigrationCancelDriveMirror:1383 : Unable to stop block job on drive-virtio-disk0
提前感谢任何指针。