Execute virt-customize with LIBGUESTFS_BACKEND=direct

When tobiko is executed from some virtual machines, the customization of
ubuntu images fails unless LIBGUESTFS_BACKEND=direct is used.

Change-Id: Ib5f8eca1f9107ee6c2f412a1948eeffc56d5aa45
This commit is contained in:
Eduardo Olivares 2024-02-16 11:52:32 +01:00
parent 197da7188d
commit c54cf94c76
1 changed files with 4 additions and 1 deletions

View File

@ -459,7 +459,10 @@ class CustomizedGlanceImageFixture(FileGlanceImageFixture):
options = self.get_virt_customize_options()
if options:
command = sh.shell_command(['virt-customize', '-a', work_file])
command = sh.shell_command(['LIBGUESTFS_BACKEND=direct',
'virt-customize',
'-a',
work_file])
sh.execute(command + options)
sh.get_file(work_file, customized_file)