前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >KVM命令

KVM命令

作者头像
全栈程序员站长
发布2022-11-16 17:44:31
4850
发布2022-11-16 17:44:31
举报

兄Die,写代码太累了?孤独寂寞冷?还没有女朋友吧? 关注微信公众号(瓠悠笑软件部落),送知识!送知识!送温暖!送工作!送女朋友!插科打诨哟!

KVM Command

##The command I used to create virtual machine

  1. Enter KVM GUI

virt-manager

  1. Enter command interface

virtsh

  1. Quit command interface

quit

  1. Start virtual machine

virsh start host-name & start host-name

eg: if the host-name is control-1 and you are in normal shell command interface, use command : virsh start control-1 if the host-name is control-1 and you are in KVM command interface, use command : start control-1

  1. Stop virtual machine

virsh stop host-name & virsh stop host-name

eg: if the host-name is control-1 and you are in normal shell command interface, use command : virsh shutdown control-1 if the host-name is control-1 and you are in KVM command interface, use command : shutdown control-1

  1. Make a snapshot of a virtual machine

snapshot-create-as domain-name create-snapshot-name

Before execute this command,Please make sure you have shutdown the virtual machine, if you haven’t shutdown this machine, the created snapshot’s status is running. the domain-name is the host name of your virtual machine, and the create-snapshot-name is the name your given to the created snapshot.

  1. See a KVM’s virtual machine list

virsh list & list

the list show all the domain of virtual machine.

  1. See virtual machine’s snapshot

virsh snapshot-list host-name & snapshot-list host-name

  1. Delete a snapshot of a virtual machine

virsh snapshot-delete host-name snapshot-name & snapshot-delete host-name snapshot-name

The host-name is the machine's domain name ,you can ssh this machine and click shell command **hostname**
to see the domain name.The snapshot-name is the machine's snapshot name if you have created the snapshot.

Jetbrains全家桶1年46,售后保障稳定

  • If you are in normal shell environment, use virsh snapshot-delete host-name snapshot-name
  • If you are in virsh shell environment,use snapshot-delete host-name snapshot-name
  1. Revert a snapshot to a machine

virsh snapshot-revert host-name snapshot-name & snapshot-revert host-name snapshot-name

  1. Undefin a virt machine

virsh undefine host-name & undefin host-name

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/234460.html原文链接:https://javaforall.cn

...

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2022年11月2日 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 兄Die,写代码太累了?孤独寂寞冷?还没有女朋友吧? 关注微信公众号(瓠悠笑软件部落),送知识!送知识!送温暖!送工作!送女朋友!插科打诨哟!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档