Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

KVM virtual machine basic operation command

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

KVM virtual machine basic operation command 1) View virtual machine list virsh list2) View running virtual machine list virsh list-- all3) View all virtual machines virsh list-- all4) View virtual machine details domain virsh dominfo virtual machine name 5) switch operation virsh start virtual machine name of virtual machine domain (boot) Virsh shutdown virtual machine name (gentle shutdown) virsh shutdown ID number (shutdown) virsh destroy virtual machine name (forced shutdown 6) Export configuration file: virsh dumpxml test01 > test01.xml7) Delete virtual machine virsh undefine test01 * * disk file is still in * * 8) restore virtual machine according to configuration file virsh define test01.xml * * undefine virtual machine The configuration file will go back to / etc/libvirt/qemu * * 9) modify the profile virsh edit virtual machine name (with syntax check) 10) modify the virtual machine name (not supported before version 7.2) virsh domrename virtual machine old name virtual machine new name 11) View the corresponding vnc port of the virtual machine: virsh vncdisplay virtual machine name: 0: 0 suspend virtual machine virsh suspend virtual machine name 13) restore suspended virtual machine virsh resume virtual machine name 14) Boot self-boot virsh autostart virtual machine name 15) cancel boot self-boot virsh autostart-- disable virtual machine name * * a full kvm domain There will be two files after generation: * * 1) disk file, which has been specified after deployment. 2) Xml configuration file, which is under / ect/libvirt/qemu/ by default

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report