zoukankan      html  css  js  c++  java
  • 【Linux】【Services】【KVM】virsh命令详解

    1. virsh的常用命令

    help:获取帮助

      virsh help KEYWORD

    list:列出域

    dumpxml:导出指定域的xml格式的配置文件;

    create:创建并启动域;

    define:创建域;

    domid:获取域ID;

    domuuid:获取域的uuid

    dominfo:域信息

    reboot:重启域

    destroy:关闭域

    shutdown:关闭域

    undefine:删除域;

    save:保存状态至某文件中;

    restore:从保存文件中恢复域状态;

    pause:暂停域;

    resume:恢复暂停的域

    管理域资源:

    setmem:改变内存大小;不能超出最大值;

    setmaxmem:设定内存最大值;

    setvcpus:修改域的vcpu数量;

    vcpuinfo:获取域的vcpu信息;

    domblkstat:

    domiflist:域的接口列表;

    domifstat:域的接口统计信息;

    ip link add name VETH#.0 type veth peer name VETH#.1

    动态增删disk:

      qemu-img create

      virsh attach-disk

      virsh detach-disk

    动态增删interface

      virsh attach-interface <domain><type><source>

        type:bridge

        source:某桥的名称;

      virsh detach-interface <domain><type> -mac MAC

  • 相关阅读:
    变色龙
    生在北极圈内的“瑞典之声”Sofia Jannok
    “清一色”数列1,11,111,1111,...
    1100 10100 PAGE ERROR
    The Lazarus Project
    数字“黑洞”495
    don't you forget the EXIF~!
    行和列
    小谈奇数平方与偶数平方
    “码农”的得力工具math
  • 原文地址:https://www.cnblogs.com/demonzk/p/7850252.html
Copyright © 2011-2022 走看看