virsh使用
发布日期:2021-08-11 20:02:36 浏览次数:2 分类:技术文章

本文共 935 字,大约阅读时间需要 3 分钟。

virsh

管理kvm虚拟机

  1. list Prints information about existing domains. If no options are specified it prints out information about running domains.

    virsh list[--inactive | --all] [--managed-save] [--title] { [--table] | --name | --uuid } [--persistent] [--transient] [--with-managed-save] [--without-managed-save] [--autostart] [--no-autostart] [--with-snapshot] [--without-snapshot] [--state-running] [--state-paused] [--state-shutoff] [--state-other]
  2. 创建虚拟机

    virt-install \--virt-type=kvm \ --name=testLink_164 \ --vcpus=4 --memory=4096 \ --cdrom=/home/iso/CentOS-7-x86_64-DVD-1810.iso \ --disk path=/home/vm/testLink_164.img,size=100 \ --network bridge=br0 \ --vnc --vncport=5920 --vnclisten=0.0.0.0  \ --force
  3. 管理虚拟机状态

    virsh start|destory|shutdown|suspend|resume machineName
  4. 查看虚拟机的vnc端口

    virsh vncdisplay machineName
  5. 设置/取消虚拟机随物理机自启

    virsh autostart [--disable]
  6. 编辑虚拟机

    virsh edit machineNmae

转载于:https://www.cnblogs.com/QQ-1615160629/p/virsh.html

转载地址:https://blog.csdn.net/weixin_30633949/article/details/97062424 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:PHP7 网络编程(二)daemon守护进程
下一篇:源码编译搭建LAMP

发表评论

最新留言

表示我来过!
[***.240.166.169]2024年03月30日 13时15分20秒