[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] Questions regarding migration from QEMU to libvirt

On Wed, Oct 03, 2018 at 01:04:50PM -0300, Rodrigo Siqueira wrote:

My colleagues and I have a set of scripts that we use to automate our
daily tasks related to the Linux Kernel. As a result, most of our code
relies on the QEMU features; and recently we decided use libvirt instead
of QEMU. However, we have some questions, and I would like to know if
someone could help us. Follows:

Could you explain how much do you rely on the VM looking the same from the guest
perspective (Guest ABI stability)?

If you only need the disk to stay the same and you want to easily migrate
existing machines, then virt-v2v might be good to try.

1) Import our QEMU images with virsh

Currently, we import the QEMU VMs with virt-install.

Is it possible to automatically discover the distro variant of a QEMU
image in order to use it in the “--os-variant” option?

You might be able to get that info using libguestfs (virt-v2v should be able to
do that for you).

Here is how we register a VM:

2) The requirement of sudo to create a network

When we register our VM, we want to keep the ssh working well. However,
every time we register a VM we create a new network bridge as a result
it requires sudo. Is it possible to avoid this? Or at least make this a
single action?

You don't need to have a libvirt network for each VM, you can create a bridge
and use <interface type='bridge'/> or just use <interface type='direct'/>.  Or
you can have one network for multiple VMs.  What did you use with plain QEMU?

I'm not sure what the trouble is, also what the use cases are, so the answers
might not be fit for your needs.

Here is how we handled this:
* The code for register:
* The configuration file that we adopted as a default:

3) When using libvirt it changes the owner of our image

If we try to use libvirt, it changes the ownership of our QEMU images
(root). We fixed it by changing the file “/etc/libvirt/qemu.conf”, and
switch the option dynamic_ownership to “0”. What is the impact of that
change? Is it dangerous? There is a way to avoid this change?

dynamic_ownership=0 keeps the owners as they are, but libvirt cannot guarantee
that the VM will have access to all its resources.  If you are taking care of
that, then keeping that turned off should be OK.

Finally, here is the full code of the libvirt part:

Best Regards

Rodrigo Siqueira
Graduate Student
Department of Computer Science
University of São Paulo

libvirt-users mailing list
libvirt-users redhat com

Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]