• 虚拟机冷迁移


    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

     

  • 相关阅读:
    dva实用的学习笔记
    上传图片到七牛云
    Lodash学习笔记
    Ant Design Pro 脚手架+umiJS 实践总结
    SVN的安装和使用手册
    判断数据类型的5种方法
    常见react面试题汇总(适合中级前端)
    Es6 类class的关键 super、static、constructor、new.target
    ES2019 新特性简介
    通用正则实战200
  • 原文地址:https://www.cnblogs.com/itzhao/p/11319138.html
Copyright © 2020-2023  润新知