Skip to content

Commit

Permalink
tests/conversion: Disable SELinux before exporting CenotOS image
Browse files Browse the repository at this point in the history
Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Sep 19, 2024
1 parent 2b843bb commit 649decc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/conversion
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,13 @@ if hasNeededAPIExtension instance_import_conversion; then
# Afterwards, rebuild the initramfs image and stop the instance.
lxc exec v1 -- rm /etc/dracut.conf.d/lxd.conf
lxc exec v1 -- dracut --force --omit-drivers virtio_scsi
lxc stop v1

# XXX: Disable SELinux before exporting the instance, as it will block lxd-agent
# when re-imported.
lxc exec v1 -- sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config

# Export instance.
lxc stop v1
lxc export v1 "${tmpdir}/vm.tar.gz"

# Ensure instance does not boot without virtio_scsi drivers.
Expand Down

0 comments on commit 649decc

Please sign in to comment.