zoukankan      html  css  js  c++  java
  • 虚拟机冷迁移

    192.168.126.6虚拟机迁移到192.168.168.66

    192.168.126.6
    [root@zxw6 qemu]# virsh list --all
    Id 名称 状态
    ----------------------------------------------------
    - centos7.0 关闭

    192.168.126.66
    [root@zxw66 images]# virsh list --all
    Id 名称 状态
    ----------------------------------------------------


    第一步:发送配置文件
    [root@zxw6 qemu]# scp centos7.0.xml 192.168.126.66:/root

    第二步:查看磁盘所在路径
    [root@zxw6 qemu]# virsh edit centos7.0
    <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
    <driver name='qemu' type='qcow2'/>
    <source file='/var/lib/libvirt/images/centos7.0.qcow2'/>
    <target dev='vda' bus='virtio'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

    第三步:发送磁盘
    [root@zxw6 images]# scp centos7.0.qcow2 192.168.126.66:/root

    第四步:登录到192.168.126.66
    [root@zxw6 ~]# ssh 192.168.126.66


    第五步:移动磁盘
    [root@zxw66 ~]# mv centos7.0.qcow2 /var/lib/libvirt/images/

    第六步:回复虚拟机
    [root@zxw66 ~]# virsh define centos7.0.xml
    定义域 centos7.0(从 centos7.0.xml)

    [root@zxw66 ~]# virsh list --all
    Id 名称 状态
    ----------------------------------------------------
    - centos7.0 关闭
    第七步:查看使用
    [root@zxw66 ~]# virsh start centos7.0
    域 centos7.0 已开始

    [root@zxw66 ~]# virsh list --all
    Id 名称 状态
    ----------------------------------------------------
    1 centos7.0 running

     

  • 相关阅读:
    深入分析 Python 的垃圾回收机制
    9.26
    Web安全之ML--构建机器学习工具箱
    第八节--图的数据结构及其算法
    第七节--树形结构及其算法
    第六节--堆栈与队列算法
    第四节--查找与哈希算法
    第三节--排序算法
    第二节--常用数据结构
    第一节--走入算法的世界
  • 原文地址:https://www.cnblogs.com/itzhao/p/11319138.html
Copyright © 2011-2022 走看看