命令行管理 KVM 虚拟主机

 

命令行管理 KVM 虚拟主机 编辑 删除

2013 - 03 - 27
    博客分类: 
  • 系统运维
netkiller 虚拟机 kvm centos 

 

 

virsh

$ sudo virsh -c qemu:///system list
 Id Name                 State
----------------------------------
  1 Ubuntu               running
  2 Ubuntu-Server        running
		
# virsh

显示虚拟机列表:
virsh # list --all

启动虚拟机:
virsh # start [name]

关闭虚拟机:
virsh # shutdown [name]

重启虚拟机:
virsh # reboot [name]
		

例 29.1. virsh

virsh # list --all
 Id    Name                           State
----------------------------------------------------
 -     CentOS6.4                      shut off
 -     FreeBSD                        shut off
 -     Test                           shut off
 -     Ubuntu                         shut off
 -     www                            shut off

virsh # start Ubuntu
Domain Ubuntu started

virsh # list --all
 Id    Name                           State
----------------------------------------------------
 1     Ubuntu                         running
 -     CentOS6.4                      shut off
 -     FreeBSD                        shut off
 -     Test                           shut off
 -     www                            shut off

virsh # quit

 

本文出自 “Netkiller 手札” 博客,谢绝转载!

你可能感兴趣的:(kvm,qemu,netkiller,virsh)