Red Hat Bugzilla – Bug 988862
virt-sysprep --firstboot option writes incorrect "99" (instead of "S99") sysv-init-style start up script
Last modified: 2014-06-17 22:00:30 EDT
+++ This bug was initially created as a clone of Bug #988860 +++
Description of problem:
When you use virt-sysprep on a pre-systemd guest (eg. RHEL 6 guest),
with the --firstboot option, it writes a start-up script called
This is of course wrong. The file should be called
As a result of the incorrect name, the firstboot script does not run.
Version-Release number of selected component (if applicable):
libguestfs 1.20.9, 1.22.4, 1.23.10
Note I have fixed this upstream already:
This bug exists so that I can check the fix goes into RHEL 6 & RHEL 7.
Steps to Reproduce:
Create a small shell script that "does something useful". eg.
It could touch a file at a known location.
virt-sysprep --firstboot ./some-script.sh -a RHEL6.guest
Try to boot the guest.
Observe whether or not the firstboot script ran when the
guest booted (eg. was the file touched?)
The bug was found by Nick Strugnell.
Can reproduce with libguestfs-1.22.4-2.el7.x86_64
[root]# cat some-script.sh
[root]# virt-sysprep --firstboot ./some-script.sh -a RHEL-Server-6.4-64-hvm.raw
then, boot up the rhel6.4 guest, and there is no /home/usefulfile
Verified with libguestfs-1.22.6-15.el7
1. Create test script:
[root@rhel7libguestfs ~]# cat test.sh
echo "Hello World!"
2. [root@rhel7libguestfs ~]# virt-sysprep --firstboot ./test.sh -a RHEL-Server-6.5-64-20131024.1-hvm.qcow
3. Check in the guest:
In the guest
=== Running /usr/lib/virt-sysprep/scripts/1384656116-azw3p6uu-test-sh ===
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.