switch from virt-builder to virt-install (T813)
ClosedPublic

Authored by adamwill on Jul 1 2016, 12:33 AM.

Details

Summary

We've kinda been having too much trouble with virt-builder
lately, mainly SELinux related issues due to how it does image
customization. It also produces images that differ in notable
ways from what a 'typical' install would give. virt-install
solves both these problems, and also gives us more flexibility
for storage configuration and post-install customization should
we need them in future.

The change isn't really too drastic, and the design is similar:
instead of virt-builder commands files, each image type now has
a kickstart file where all its customizations can be done.
There's also a single extra image dict key, 'variant', which
specifies which install tree variant to use for running the
install. It defaults to 'Everything' (for F24+) and 'Server'
(for <F24, as Everything wasn't installable until F24) but we
set it to 'Server' for the server images and 'Workstation' for
the desktop images, so those installs will use the correct
variant install class.

We run the installs in VNC. You can do it with a serial console
and log the output, but then anaconda gets clever and changes
several things in the installed system based on the fact that
you did the install over a serial console: it twiddles with
the kernel args and doesn't set graphical.target as the default.
We don't want any of that mess, so we do a VNC install.

The 'size' value is just a number of gigabytes for virt-install
images (as that's how the virt-install 'size' argument works).

This also drops some unused 32-bit images (we don't do 32-bit
KDE or Server upgrade tests, so there's no need to build those
images).

Test Plan

Re-generate all affected images and re-run all tests
that use them, make sure they work. I am doing this on staging
at present. Note: this would render D911 unnecessary.

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to switch from virt-builder to virt-install (T813).Jul 1 2016, 12:33 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added a reviewer: garretraziel.
adamwill updated this revision to Diff 2332.Jul 1 2016, 6:33 AM

keep the imsettings-qt workaround for now, still needed

garretraziel accepted this revision.Jul 4 2016, 10:37 AM

I had some problems during image building - fair amount of F24 installations failed during boot and dropped to dracut console (although it worked fine on second try). Also mirrorlist returns "bad" URL for initrd download fairly often:

ERROR    Couldn't acquire file https://download.fedoraproject.org/pub/fedora/linux/releases/24/Everything/x86_64/os/images/pxeboot/initrd.img: 403 Client Error: Forbidden for url: http://mirror.onet.pl/pub/mirrors/fedora/linux/releases/24/Everything/x86_64/os/images/pxeboot/initrd.img

Finally, during one install, mirror returned 404 on one package, so it timed out.

But I guess that these are not problems with createhdds code and code looks OK otherwise.

Just mention in readme that libvirt-python3 package is required.

This revision is now accepted and ready to land.Jul 4 2016, 10:37 AM

Huh, not sure why you'd get failure during boot - I didn't see that once. As for mirror issues, that won't affect the official deployments as download.fedoraproject.org will always redirect to dl.phx2 for them. (it also doesn't affect me as it always redirects to my private mirror, for me. :>) if we think it's a problem for others we could change it to dl. , but I think it's probably OK.

and yeah, I'll update the readme, thanks.

This revision was automatically updated to reflect the committed changes.