Ubuntu Server Guide
Virtual Machine Management
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
Virtual Machine Management
The following section covers the command-line tools around virsh that are part of libvirt itself. But there are various options at different levels of complexities and feature-sets, like: • multipass • uvt • virt-* tools • openstack virsh There are several utilities available to manage virtual machines and libvirt. The virsh utility can be used from the command line. Some examples: • To list running virtual machines: v i r s h l i s t • To start a virtual machine: v i r s h s t a r t • Similarly, to start a virtual machine at boot: v i r s h a u t o s t a r t 102 • Reboot a virtual machine with: v i r s h r e b o o t • The state of virtual machines can be saved to a file in order to be restored later. The following will save the virtual machine state into a file named according to the date: v i r s h s a v e Once saved the virtual machine will no longer be running. • A saved virtual machine can be restored using: v i r s h r e s t o r e save−my . s t a t e • To shutdown a virtual machine do: v i r s h shutdown • A CDROM device can be mounted in a virtual machine by entering: v i r s h a t t a c h −d i s k • To change the definition of a guest virsh exposes the domain via v i r s h e d i t That will allow one to edit the XML representation that defines the guest and when saving it will apply format and integrity checks on these definitions. Editing the XML directly certainly is the most powerful way, but also the most complex one. Tools like Virtual Machine Manager / Viewer can help unexperienced users to do most of the common tasks. If virsh (or other vir* tools) shall connect to something else than the default qemu-kvm/system hypervisor one can find alternatives for the connect option in man virsh or libvirt doc Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling