KVM迁移时遇到的一些问题

KVM迁移有两种方式,一种是动态迁移,一种为静态迁移。
kvm静态迁移就是虚拟机在关机状态下,拷贝虚拟机虚拟磁盘文件与配置文件到目标虚拟主机中,实现的迁移。
kvm动态迁移无需拷贝虚拟磁盘文件,需要目的主机和源主机有相同的目录结构虚拟机磁盘文件(依赖共享存储)。

1
2
error:no hypervisor options were found ofr this connection
this usually means that qemu or kvm is not installed on your machine,or the kvm kernel modules are not loaded.

解决方法:开启bios虚拟化并加载modprobe kvm以及kvm_intel.

Unable to migrate guest: unsupported configuration: Domain requires KVM, but it is not  available. Check that virtualization is enabled in the host BIOS, and host configuration is setup  to load the kvm modules.

解决方法:方法同上.

Unable to migrate guest: Unable to allow access for disk path /img/musf-clone1-2-clone.img: No such file or directory

解决方法:迁移与被迁移主机的需要相同名称的磁盘映像文件
qemu-img create -f raw(磁盘硬件文件格式) /home/kvm-disk/test.img(路径) 100G(大小)

Unable to migrate guest: unable to connect to server at 'kvm3:49153': Connection refused

解决方法:1.开启防火墙上端口或关闭防火墙.
2.在virt-manager的迁移中添加迁移端口.

在ovirt-engine中添加data/nfs作为存储域时并不能成功。
解决方法:重点查看一下将要共享的文件夹权限是否是vdsm:kvm。若不是使用chown -R命令即可。

部分主机创建虚拟机成功,开启虚拟机时出现error…

VM CentOS6.3T is down. Exit message: internal error Process exited while reading console log      output: bind(unix:/var/lib/libvirt/qemu/channels/CentOS6.3T.com.redhat.rhevm.vdsm): Permission    denied chardev: opening backend "socket" failed

由于../channels这个文件夹的权限是vdsm qemu。root用户可能不能读取并创建其中的文件。我采用的方法是手动在qemu.conf中注释掉.user = root 以及 group = root并重启libvirtd。
之后出现错误:

VM CentOS6.3T is down. Exit message: internal error client socket is closed.
VM test is down. Exit message: cannot open file '/rhev/data-center/78e07dee-36bc-439b-b71e-72cfd87a2bb3/f84e3679-281e-41d4-9ea9-b8221085fa7b/images/2e93290e-f1b5-42b2-bdf6-fad695de2ccb/ef334a97-e01b-4d7c-afb0-814ffbe537f0': Permission denied.

这两个错误都是由于libvirt设置问题才报错的,我这里直接覆盖libvirtd.conf qemu.conf以及vdsm.conf文件

火柴 wechat
扫描上方二维码关注我的博客!
0%