Detailed explanation of KVM simple commands

#virsh list displays the currently running virtual machines 
#virsh list --all displays all currently running virtual machines 
#virsh dumpxml node1 | grep vcpu displays the cpu resources of the node1 virtual machine 
#virsh vcpuinfo node2 Views the cpu resources and status of the current host 
#virsh cpu -stats node2 Display the CPU status of the currently running host 
#virsh dominfo node2 View the configuration information of the node2 host 
#virsh domiflist node2 View the network interface information of the node2 host 
#virsh domifstat node2 vnet0 View the node2 host network interface information 




#virsh dumpxml node1 | grep '[ m|M]em' Display the memory information of the current virtual machine (system memory and currently 
available memory) 


############################# ####################################################################################################################################################################################################################################################################################################################################################################### 
_ The destory command, but it seems to have canceled the function 
#virsh destory node2 stop virtual machine node2 (should be equivalent to force off) 
#virsh shutdown node2 friendly shutdown 
Strange: using shutdown can not shut down, use destroy to show that the command does not exist?

#virsh maxvcpus Display the maximum linkable cpu 
#virsh reset node2 Reset node2 (actually reboot but the difference between the two) 

#virsh save node2 node2-bak Save node2 information to node2-bak file and shut down 
#virsh restore node2-bak restores from the state saved above, and it is the final state directly after restoration 
(as long as the disk volume is not deleted, it is possible). Note: Only the current state can be saved. If it is shut down, it will 
not be  used. The existence of the virtual machine will no longer be displayed.


View the relevant information of VMM (Hypervisor): 
#virsh hostname View the information of the host 
#virsh nodeinfo View the information of the Hypervisor 
# virsh sysinfo View system information 
#virsh version View the version that the system uses virtualization The 
libvirtd program is used, and the qemu process is turned on. 
The I/O of the virtualized virtual machine is virtualized by the qemu process. The 
cpu is hosted by the (Hypervisor) host The memory of the virtual machine supported by 
the CPU is virtualized by the program. 
The advent of virtualization introduced a third mode: guest mode (kernel/user mode)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326827726&siteId=291194637