Commits
rhel-7.3
Name already in use
Commits on May 19, 2017
-
v2v: -o glance: set all properties during creation (RHBZ#1374405)
The glance client v1.0.0 defaults to the Image v2 API: this means that an image can be referenced only by its UUID, and not anymore by the name as well (which does not need to be unique). This caused our glance invocation to set the properties for the newly created image to fail, since we are using the name as identifier. Instead of first creating the image and then setting all the properties for it, set all the properties when creating the image: other than being simpler, it also avoid parsing the output of the 'glance image-create' command for the UUID ('id') of the image. (cherry picked from commit 1497a9f)
Commits on Dec 22, 2016
-
v2v: -i ova: Derive the name from the OVA filename.
If the guest has no <Name> element in the OVF, previously we chose "default" as the name. This changes that so it uses a name derived from the basename of the OVA file instead. For example: virt-v2v -i ova /path/to/myguest.ova [...] would use "myguest" as the name (assuming no <Name> was present). Modifies the behaviour of commit 1ae4252. (cherry picked from commit 98619f9)
-
v2v: -i disk: Move code that creates name from disk to separate module.
Simple code motion. (cherry picked from commit 312379c)
-
virt-v2v: Support for ova exported from AWS (RHBZ#1371843).
1. AWS the name tag is not mandatory - using default as a name 2. AWD doesn't prefix 'ovf:' as prefix to disk path There is an open bug for oVirt: https://bugzilla.redhat.com/show_bug.cgi?id=1371843 Signed-off-by: Shahar Havivi <shaharh@redhat.com> (cherry picked from commit 1ae4252)
Commits on Dec 21, 2016
-
v2v: -o vdsm: Add --vdsm-compat flag. -o rhev: Drop support for RHV <…
… 4.1 (RHBZ#1400205). Support for RHEV with RHEL 6 nodes required us to output the old style qcow2 compat=0.10 images. Since RHEV 3.6 GA, RHEL 6 has not been supported as a RHEV node type. Since RHV 4.1, compat=1.1 is supported. (Support for compat=1.1 is uncertain in RHV 4.0 even on RHEL 7 nodes.) There are significant downsides to using qcow2 compat=0.10 instead of the modern default (compat=1.1). Therefore this patch does two things: For -o rhev, it drops support for compat=0.10 completely. You must use RHV 4.1. For -o vdsm, it adds an interim flag (--vdsm-compat=0.10 or --vdsm-compat=1.1) which controls the compat level of the qcow2 output file. VDSM should use --vdsm-compat=1.1 when it is known that modern qemu is available. We can make this the default later when all RHV instances have moved to 4.1. It also adds: vdsm-compat-option to the `virt-v2v --machine-readable' output to indicate that this flag can be used. Thanks: Yaniv Kaul, Michal Skrivanek. (cherry picked from commit bdaeeb4)
-
appliance: Disable EDD (edd=off) (RHBZ#1404287).
EDD (https://en.wikipedia.org/wiki/Enhanced_Disk_Drive) is a BIOS INT 13h subcall for communicating the extended size of the boot disk over 8GB to the OS. Since libguestfs doesn't use a boot disk, and the appliance disk is limited to 4GB, and we use virtio-scsi, this is all useless. EDD is also broken currently on RHEL 7.3, see: https://bugzilla.redhat.com/show_bug.cgi?id=1404287 Also the EDD probing takes significant extra time (about 80ms on my laptop), and using edd=off reduces this time although doesn't entirely eliminate it. (cherry picked from commit 764fd3f)
Commits on Dec 16, 2016
-
inspect: gather info from /usr filesystems as well (RHBZ#1401474)
Flag the filesystems for Linux /usr properly as USR role, and detect some data out of it, like the distro information from an os-release (if present), and the architecture (since the binaries used for our architecture check will be available there only). Later on, collect the results in a way similar to what is done for CoreOS: for each non-CoreOS root, try to find its /usr filesystem, and if found then merge what is missing from root; in the last case, also override the distro inspection data (version, product name) if available in /usr. (cherry picked from commit 1d86b37)
-
inspect: fix existance check of /dev/mapper devices
When checking for the existance of /dev/mapper devices found in the fstab of a filesystem, using guestfs_exists means they are checked as files in the guest, while they really appear as devices on the appliance. Instead, try the lvm name resolution anyway, and ignore them when they are reported as missing. Thanks to: Richard W.M. Jones. Fixes commit 96b6504. (cherry picked from commit dad35e5)
-
inspect: mark CoreOS /usr partitions with own USR role
Add a new inspect role for "/usr" partitions, and use that to mark the /usr partition in CoreOS: this additional role allows to ease its lookup later on, when merging its results into those of the root. (cherry picked from commit e77e1ef)
-
inspect: change is_root flag into enum
Introduce a new enum to classify the role of a filesystem, if available. This will help later on when doing operations on non-root filesystems, like detecting particular mountpoints such as /usr. The new enum has only "root" as known role, which replaces the is_root flag. (cherry picked from commit 0c4edce)
Commits on Aug 30, 2016
-
-
tests: Add a regression test for RHBZ#1370424.
Regression test for previous commit which just tests that guestfs_add_domain doesn't assert-fail on guests with no port attribute. (cherry picked from commit 98aa78f)
-
lib: Don't assert fail if port is missing in XML (RHBZ#1370424).
Thanks: Xiaodai Wang (cherry picked from commit 9e7b564)
Commits on Aug 18, 2016
-
-
-
v2v: Use OVMF secure boot file (RHBZ#1367615).
From RHEL 7.3, Red Hat have decided to only compile the secure boot version of OVMF on x86-64, with flags -D SECURE_BOOT_ENABLE -D SMM_REQUIRE. The filename has also changed to reflect this - it is now /usr/share/OVMF/OVMF_CODE.secboot.fd. The old file /usr/share/OVMF/OVMF_CODE.fd is no longer shipped. However switching to using this variant of OVMF for UEFI guests is not just a matter of changing the filename. The new OVMF variant won't run unless we also change: - The qemu machine model, from the default ("pc" == "pc-i440fx-rhel7.3.0" or later) to Q35 ("q35" == "pc-q35-rhel7.3.0" or later). - Add <smm> under <features>. - Set <loader ... secure="yes">. NB: On RHEL the changes requires qemu-kvm-rhev. It is no longer possible to convert UEFI guests using the basic qemu-kvm. Thanks: Laszlo Ersek, Ming Xie. (cherry picked from commit ba5c5a8713c4418c861edecacff761f4d3720508) -
Generate the lists of UEFI firmware paths.
Previously we had a list of UEFI paths in src/uefi.c, which was accessed in virt-v2v using a private (guestfs_int_*) API and some C binding code. This was clumsy and required the paths to be replicated in the virt-v2v unit tests. Instead just generate the list of paths from the generator, creating src/uefi.c and v2v/uefi.ml with the same content. Remove the C bindings and the virt-v2v unit tests associated with UEFI paths. Cherry picked from commit 04fc67775e27851ce9b6c7a082ff80f1e1793365. For this complex cherry pick I had to take into account earlier RHEL-only patches where we removed several sets of firmware.
-
v2v: OVMF is now fully open source, fix the man page.
(cherry picked from commit 5c03a2c)
-
v2v: Add -o discard option when fstrimming.
This *may* be required by some filesystems in order for fstrim to work. I'm not actually sure if this is true, but it's what virt-sparsify --in-place does, and that utility has been tested a lot more in regards to trimming. (cherry picked from commit dd22e37)
-
v2v: Make fstrim warning clearer (RHBZ#1366456).
This reverts the change made for RHBZ#1168144. The warning is now always displayed. It would be nice to make the warning actionable, but there is not a lot that end users can do since fstrim is such a complex topic interacting with all filesystem and storage layers. (cherry picked from commit 66816e1)
-
p2v: Fix s/is/are/ in GUI message.
I reordered the 'and' clause to make it sound a bit more natural. Thanks: Junqin Zhou. (cherry picked from commit d33e28c)
Commits on Aug 8, 2016
-
sparsify: Add a regression test for RHBZ#1364347.
Add a regression test for the previous commit. (cherry picked from commit 71de3d4) Conflicts: sparsify/Makefile.am
-
sparsify: Warn instead of error if a filesystem cannot be fstrimmed (…
…RHBZ#1364347). Thanks: Xianghua Chen (cherry picked from commit 4d5335a)
-
daemon: fstrim: Turn "discard operation is not supported" into ENOTSUP.
Because we run the external fstrim command we don't have access to the kernel errno when it fails. However in the case where it prints this specific error message, turn that into errno ENOTSUP. (cherry picked from commit 116a41d)
-
sparsify: Exit with error code 3 if fstrim is not supported by the ap…
-
-
dib: rework run of extra-data.d hooks (RHBZ#1362354)
Instead of running them before lanching the appliance with the disks and then uploading the result after root.d hooks run, mount the root in the local temporary directory using FUSE and then run the hooks on the guest. Other than being closer to what diskimage-builder does, it also avoids issues with the extra-data.d scripts assuming to find things already, and we don't error out while trying to unpack files on the guest. Since virt-dib requires FUSE now, build it only if FUSE is supported. (cherry picked from commit d12be66)
-
mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module. Just code motion, adapting v2v in the process. (cherry picked from commit 5077c02)
-
podcheck: Check tool --help output.
For OCaml tools this does essentially nothing useful because the --help output is automatically generated from the options, and so cannot be wrong. However for C tools this is a useful check. It would be nice to generate C tools --help output, but there isn't enough information in the getopt data to do that. This commit also includes fixes to the --help output for a few tools. (cherry picked from commit 5e65da0)
-
mllib: check for executable existance in run_command (RHBZ#1362357)
run_command uses Unix.create_process which forks a child process, and executes execve: the latter fails when the executable does not exist, triggering the exit which, in older OCaml versions [1], also runs the at_exit handlers. Since there is not much that can be done to avoid this on the OCaml side, to keep run_command working also in older OCaml version then manually search for the existance of the given executable, exiting with code 127 (as a shell does) in this case. [1] http://caml.inria.fr/mantis/view.php?id=7209 (cherry picked from commit 2cb053d)
-
mllib: move which and its exception from dib
Rename it from "tool" to "executable" in the process, but otherwise it is just code motion (with minimal adjustments in dib). (cherry picked from commit 398b940)
-
Revert "p2v: Disable SELinux in virt-p2v-make-disk."
The commit claimed that SELinux was disabled in the virt-p2v-make-kickstart script, and so this was just making things consistent. However this is not true. SELinux *is* enabled in the kickstart version. There is some code to disable it, but it is commented out (admittedly it's hard to tell because the code is buried in a multi-line sed expression). The commit message also claimed (this time correctly) that the '--selinux-relabel' step caused an extra reboot each time virt-p2v is run from the ISO. However we have recently fixed this so it can usually do the relabelling during the build, not at boot time, so this is no longer a problem. This reverts commit 25ffcc7. (cherry picked from commit fcce1f6)
-
v2v: linux: Use new SELinux_relabel module to relabel Linux guests.
(cherry picked from commit fc11490)
-
lib: Deprecate old SELinux APIs, rewrite SELinux documentation (RHBZ#…
…1152825). Also turns the --selinux option of guestfish, guestmount and virt-rescue into a no-op -- it didn't work before so this is effectively no change. (cherry picked from commit 35bac3a)
-
builder: Use virt-sysprep --selinux-relabel when preparing templates.
Don't need to be clever now. (cherry picked from commit b6e92b1)