起不來會遇到名字不同要修改的問題

 

    <interface type='bridge'>
      <mac address='52:54:00:c4:ef:96'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </interface>

 


如果配置配置文件中有selinux相关的配置,将其删除,期配置类似于:

<seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c625,c859</label>
    <p_w_picpathlabel>system_u:object_r:svirt_p_w_picpath_t:s0:c625,c859</p_w_picpathlabel>
</seclabel>

copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host
on the source host run virsh dumpxml VMNAME > domxml.xml and copy this xml to the destination host
on the destination host run virsh define domxml.xml

 

其他基本流程參考

on host1

 
1
2
3
4
5
6
7
8
 
$ sudo virsh shutdown web-test
$ sudo virsh dumpxml > /tmp/web-test.xml
$ scp /tmp/web-test.xml host2:/tmp/web-test.xml
$ sudo rsync -a -e "ssh" --rsync-path="sudo rsync" /image/qcow2/web-test.qcow2 sysadmin@host2:/image/qcow2
 
(optional)
$ sudo virsh undefine web-test
$ sudo rm -f /image/qcow2/web-test.qcow2

 

on host2

如果網路環境不一樣,要先修改 web-test.xml ,確定可以符合 host2

 
1
2
 
$ sudo virsh define /tmp/web-test.xml
$ sudo virsh start web-test
arrow
arrow
    全站熱搜

    阿貴貴 發表在 痞客邦 留言(0) 人氣()