[ovirt-devel] [VDSM] Correct implementation of virt-sysprep job
Yaniv Kaul
ykaul at redhat.com
Sun Dec 4 20:39:29 UTC 2016
On Dec 4, 2016 8:50 PM, "Shmuel Melamud" <smelamud at redhat.com> wrote:
Hi!
I'm currently working on integration of virt-sysprep into oVirt.
Usually, if user creates a template from a regular VM, and then creates new
VMs from this template, these new VMs inherit all configuration of the
original VM, including SSH keys, UDEV rules, MAC addresses, system ID,
hostname etc. It is unfortunate, because you cannot have two network
devices with the same MAC address in the same network, for example.
To avoid this, user must clean all machine-specific configuration from the
original VM before creating a template from it. You can do this manually,
but there is virt-sysprep utility that does this automatically.
Ideally, virt-sysprep should be seamlessly integrated into template
creation process. But the first step is to create a simple button: user
selects a VM, clicks the button and oVirt executes virt-sysprep on the VM.
User selects a VM or a template disk?
virt-sysprep works directly on VM's filesystem. It accepts list of all
disks of the VM as parameters:
virt-sysprep -a disk1.img -a disk2.img -a disk3.img
I would suggest for the 1st phase implementing it on the boot device only.
Yes, theoretically it may have to do some work on other disks (swap may be
on a separate disk, etc.). Practically, I think we can live with the
limitation.
Y.
The architecture is as follows: command on the Engine side runs a job on
VDSM side and tracks its success/failure. The job on VDSM side runs
virt-sysprep.
The question is how to implement the job correctly?
I thought about using storage jobs, but they are designed to work only with
a single volume, correct? Is is possible to use them with operation that is
performed on multiple volumes?
Or, alternatively, is it possible to use some kind of 'VM jobs' - that work
on VM at whole? How v2v solves this problem?
Any ideas?
Shmuel
_______________________________________________
Devel mailing list
Devel at ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20161204/cd892b16/attachment-0001.html>
More information about the Devel
mailing list