如何使用命令行列出所有客户机的名称,
virt-install
类似这样,virt-install list-vms
可以吗?
答案1
您的意思是virsh list
哪个会列出所有正在运行的虚拟机?
# virsh list
Id Name State
----------------------------------------------------
2 IPA_DC2 running
3 test running
或者virsh list --all
显示正在运行和关闭的虚拟机?
# virsh list --all
Id Name State
----------------------------------------------------
2 IPA_DC2 running
3 test running
- Archlinux shut off
- Buildbox-EL6 shut off
- c5 shut off
- c6 shut off
- c7 shut off
- CentOS7 shut off
- Debian7 shut off
- Fedora-QEMU-A9-armhfp-20-1-sda shut off
- fedora20-ppc64 shut off
- FreeSWITCH shut off
- OpenStack_Juno shut off
- Puppet shut off
- Ubuntu1204 shut off
- Windows2008R2 shut off
- Windows2012R2 shut off
- Windows_8_1 shut off
- WindowsXP shut off
另请参阅man virsh
每个选项。
或者使用virt-manager
GUI 来管理您的 VM。