通过virt-manager 利用NFS创建、迁移虚拟机2
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920182920918-874888662.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920182935246-265471453.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183001293-1037297136.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183011465-1054590431.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183108918-785316461.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183122027-1582240824.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183246496-15550263.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183300668-2048177788.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183320731-348861834.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183343231-143414285.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183403606-1263633455.png)
![](https://images2015.cnblogs.com/blog/758933/201609/758933-20160920183439887-1001781831.png)
Question1:
unable to migrate guest: internal error: Attempt to migrate guest to the same host domain
Solution1:
1、在/etc/hosts中添加$(target IP) domain
2、重启网络服务
Question2:
internal error: hostname on destination resolved to localhost, but migration requires an FQDN
solution2:
1、在对方运行hostname domain
Question3:
internal error: process exited while connecting to monitor: 2016-09-04T06:11:21.526046Z qemu-kvm: -drive file=/nfsFile/images/ubuntu12.04.qcow2,if=none,id=drive-ide0-0-0,format=qcow2: could not open disk image /nfsFile/images/ubuntu12.04.qcow2: Could not open '/nfsFile/images/ubuntu12.04.qcow2': Permission denied。
Solution3:
1、应该是在对方或者本地没有开启virt_nfs_use
2、运行setsebool virt_nfs_use on
Question4:
问题1和问题2每次执行迁移时都会遇见,不晓得为何!
Solution:
想了许久终于明白,这里需要在source主机添加目的主机的域名,即修改source主机的/etc/hosts文件添加:
源IP targetname
//targetname 为目标主机的hosname,如果不清楚可以在目标主机执///行hostname查看下。
但是默认情况下,hostname是localhost.localdomain,而这个会被libvirt认为是本地,所以会拒绝,那么就只能给目标机器修改一个hostname,然后在源主机上配置DNS解析即可。