Доки, маны, напоминалки


Posted on Июль 27, 2016

You should be able to image your disks from a snapshot:

First you wil need to make sure the Vm is not running:
virsh suspend vm
Now you can create a snapshot make sure to adjust the size 100M and the name vm-root-snapshot to your own needs.
lvcreate -L 100M -n vm-root-snapshot -s /dev/sysvg/vm-root
After this you can start the VM again.
virsh resume vm

Now that you have the snapshot you can create the image and delete the snapshot:
dd if=/dev/mapper/sysvg-vm--root--snapshot of=/tmp/vm-root.img bs=1M
lvremove /dev/mapper/sysvg-vm--root--snapshot

The image can be copied to the new server and imported to the LVM on the new server with dd
dd if=/tmp/vm-root.img of=/dev/mapper/sysvg-vm--root bs=1M

Also don't forget to import your XML file.
virsh define /path/to/vm.xml

Метки записи: , , Нет комментариев

virt-clone man по русски

Posted on Январь 10, 2011


Приведен вольный перевод man страницы virt-clone. Virt-clone это консольная утилита входящая в состав пакета Virtinst и предназначена для клонирования виртуальных машин.

virt-install man по русски

Posted on Январь 10, 2011


Приведен вольный перевод man страницы virt-install. Virt-install это консольная утилита входящая в состав пакета Virtinst и предназначена для создания виртуальных машин.

virsh man по русски

Posted on Январь 10, 2011


Приведен вольный перевод man-страницы virsh, дополненый переводом man’а идущего в дистрибутиве libvirt-0.7.6-r1 и данные из help’а самого virsh. Утилита virsh является основным интерфейсом для управления виртуальными окружениями и сетями, пулами хранения данных, сетевыми интерфесами и различными объектами виртуальной инфраструктуры.

man virt-install

Posted on Январь 10, 2011

virt-install(1) - Linux man page


virt-install - provision new virtual machines


virt-install [ OPTION ]...


virt-install is a command line tool for provisioning new virtual machines using the "libvirt" hypervisor management library. The tool supports both text based & graphical installations, using serial console, SDL graphics or a VNC client/server pair. The guest can be configured with one or more virtual disks and network interfaces plumbed through to the host.

man virsh

Posted on Январь 10, 2011

virsh(1) - Linux man page


virsh - management user interface


virsh <subcommand> [args]


The virsh program is the main interface for managing virsh guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains. Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aims at providing long term stable C API initially for Xen paravirtualization but should be able to integrate other virtualization mechanisms, it currently also supports QEmu and KVM .