KVM Virtual Machine Common commands

Source: Internet
Author: User

Create a virtual machine

Virt-install \

--name centos \ #虚拟机名字

--ram \ #内存大小

--vcpus=2 \ #CPU的数量

--disk path=/kvm/vm1.img,size=8 \ #硬盘文件

--network bridge=br0 \ #网卡接口

--OS-VARIANT=RHEL6 \ #操作系统类型

--cdrom/iso/centos-6.6-x86_64-minimal.iso \ #安装光盘镜像文件

--vnclisten=10.24.24.25 \ #vnc监听ip

--vncport=6900 \ #vnc监听端口

--vnc

My configuration file is as follows:

Virt-install--name centos01--ram 1024x768--vcpus=1--disk path=/kvm/centos01.img,size=60--network bridge=br0 \

--os-variant=rhel6--cdrom/iso/centos-6.6-x86_64-bin-dvd1.iso--vnclisten=192.168.0.185--vncport=6900--vnc

Virsh List List of running virtual machines

Virsh start CentOS launch CentOS virtual machine

Virsh shutdown CentOS off CentOS virtual machine

Virsh destroy CentOS forced shutdown of CentOS virtual machine

Virsh autostart CentOS Setup CentOS Auto Start

Virsh undefine CentOS Delete CentOS virtual machine

Virsh suspend CentOS suspended CentOS virtual machine

Virsh Resume CentOS Recovery CentOS virtual machine


This article is from the "Linux operations self-cultivation" blog, please be sure to keep this source http://ywliyq.blog.51cto.com/11433965/1765546

KVM virtual Machine common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.