Re: Questions regarding migration from QEMU to libvirt

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

 



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

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:
https://github.com/rodrigosiqueira/kworkflow/pull/23/files#diff-70617d452b008bc71362804d54032f24R113

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:
https://github.com/rodrigosiqueira/kworkflow/pull/23/files#diff-70617d452b008bc71362804d54032f24R113
* The configuration file that we adopted as a default:
https://github.com/rodrigosiqueira/kworkflow/pull/23/files#diff-d8c16482496875afc0d37b181487ae46R1

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:
https://github.com/rodrigosiqueira/kworkflow/pull/23/files

Thanks
Best Regards

--
Rodrigo Siqueira
http://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo



_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

Attachment: signature.asc
Description: Digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux