Linux命令行管理KVM虚拟机【一】
Linux命令行管理KVM虚拟机,几个常见的Linux-KVM虚拟机 管理命令,保存备用,方便快速部署搭建Linux开发环境,搞来搞去还是Linux下虚拟化好使,方便Linux和Win!
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]
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.cn