KVM guests can be managed through virsh, the "virtual shell". To connect to the virtual shell, run
To start a stopped guest, run:
This is how the virtual shell looks:virsh --connect qemu:///system
[root@server1 ~]# virsh --connect qemu:///system
You can now type in commands on the virtual shell to manage your guests. RunWelcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
help to get a list of available commands:
virsh # help
shows all running guests;virsh #list
shows all guests, running and inactive:virsh #list --all
virsh # list --all
If you modify a guest's xml file (located in the /etc/libvirt/qemu/ directory), you must redefine the guest:Id Name State
----------------------------------
3 vm11 running
- vm10 shut of
Please note that whenever you modify the guest's xml file in /etc/libvirt/qemu/, you must run the define command again!define /etc/libvirt/qemu/vm10.xml
To start a stopped guest, run:
To stop a guest, runstart vm10
To immediately stop it (i.e., pull the power plug), runshutdown vm10
Suspend a guest:destroy vm10
Resume a guest:suspend vm10
These are the most important commands.Type :resume vm10
to leave the virtual shell.quit
No comments:
Post a Comment
Terima kasih atas komentarnya