[Libguestfs] virt-customize fail to inject firstboot script when running it from script.

Richard W.M. Jones rjones at redhat.com
Tue Mar 14 14:14:16 UTC 2017


On Tue, Mar 14, 2017 at 03:45:34PM +0200, Keresztes Péter-Zoltán wrote:
> I am running libguestfs version 1.34.2

As far as I know, this version should contain all the fixes for Debian
firstboot issues, in particular the ones related to
https://bugzilla.redhat.com/1019388

> The issue is the following. When I start the vm with virt-log I see this:
> 
> Mar 13 17:33:30 multi6 firstboot.sh[358]: /usr/lib/virt-sysprep/firstboot.sh start
> Mar 13 17:33:30 multi6 cron[359]: (CRON) INFO (Running @reboot jobs)
> Mar 13 17:33:30 multi6 firstboot.sh[358]: Scripts dir: /usr/lib/virt-sysprep/scripts
> Mar 13 17:33:30 multi6 firstboot.sh[358]: === Running /usr/lib/virt-sysprep/scripts/0001--utilities-1041-startup-sh ===
> Mar 13 17:33:30 multi6 firstboot.sh[358]: /usr/lib/virt-sysprep/firstboot.sh: 35: /usr/lib/virt-sysprep/firstboot.sh: /usr/lib/virt-sysprep/scripts-done/0001--utilities-1041-startup-sh: not found

I wonder if it's because the script contains a hash-bang path to a
non-existing interpreter.  IOW if the script starts with `#!/bin/bash'
then you would have to install bash in the guest.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list