zoukankan      html  css  js  c++  java
  • virsh命令

    查看虚拟机:

    [root@super67 ~]# virsh list

     Id    Name                           State

    ----------------------------------------------------

     4     ubuntu16                      running

    开启虚拟机:

    vish start ubuntu16 

    关机需要借助acpid

    [root@super67 ~]# yum install -y acpid

    [root@super67 ~]# reboot

    [root@super67 ~]# /etc/init.d/acpid start

    [root@super67 ~]# chkconfig acpid on

    关机:

    [root@super67 ~]# virsh shutdown ubuntu16

    Domain ubuntu16 is being shutdown

    断电:

    [root@super67 ~]# virsh destroy ubuntu16

    Domain unbuntu16 destroyed

    挂起:

    [root@super67 ~]# virsh suspend ubuntu16

    恢复:

    [root@super67 ~]# virsh resume ubuntu16

    通过配置文件启动虚拟机:

    [root@super67 ~]# virsh create /etc/libvirt/qemu/ubuntu16.xml

    Domain ubuntu16 created from /etc/libvirt/qemu/ubuntu16.xml

    开机启动:

    [root@super67 ~]# virsh autostart ubuntu16

    Domain ubuntu16 marked as autostarted

    查看开机启动:

    [root@super67 autostart]# pwd

    /etc/libvirt/qemu/autostart

    [root@super67 autostart]# ls

    ubuntu16.xml

    --------------------------------------

    看看别人总结的:

    虚拟机名字为redhat:

  • 相关阅读:
    VUE的生命周期
    ID生成算法(二)
    ID生成算法(一)——雪花算法
    HTTP状态码和支持的方法
    水平居中/垂直居中/水平垂直居中总结
    判断数组类型的4种方法
    WebSocket浅谈
    vue中使用定时器时this指向
    银行转账业务梳理
    支付那些事儿
  • 原文地址:https://www.cnblogs.com/fanxuanhui-linux/p/5839182.html
Copyright © 2011-2022 走看看