Bug 1132652
| Summary: | virt-sysprep firstboot doesn't work with RHEL 7 guest | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | j.vandeville |
| Component: | libguestfs | Assignee: | Pino Toscano <ptoscano> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5 | CC: | huzhan, leiwang, mbooth, ptoscano, rjones, wshi |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-18 10:30:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
j.vandeville
2014-08-21 18:41:11 UTC
Pino, can you check if the updated virt-sysprep in RHEL 6.6 (bug 1037166) can successfully create a working firstboot script in a RHEL 7 guest? Can reproduce with libguestfs-tools-c-1.20.11-2.el6.x86_64 Steps to reproduce: 1. Create a RHEL7 VM on a RHEL6.6 host 2. Create a script used to test: #cat test.sh #!/bin/bash echo "Hello World" touch /hello_world 3. Use virt-sysprep with firstboot option #virt-sysprep --firstboot test.sh -a rhel77.img 4. Check in rhel7 guest: Can not find /hello_world2 There no such lines in /root/virt-sysprep-firstboot.log: "Hello World" 3. Check if the script is executed at first boot (In reply to Richard W.M. Jones from comment #2) > Pino, can you check if the updated virt-sysprep in RHEL 6.6 > (bug 1037166) can successfully create a working firstboot script > in a RHEL 7 guest? (In reply to Richard W.M. Jones from comment #2) > Pino, can you check if the updated virt-sysprep in RHEL 6.6 > (bug 1037166) can successfully create a working firstboot script > in a RHEL 7 guest? Hi Richard, I test with the latest libguestfs-1.20.11-10.el6, it works well with this package Steps: Steps to reproduce: 1. Create a RHEL7 VM on a RHEL6.6 host 2. Create a script used to test: #cat test.sh #!/bin/bash echo "Hello World2" touch /hello_world2 3. Use virt-sysprep with firstboot option #virt-sysprep --firstboot test.sh -a rhel77.img 4. Check in rhel7 guest: Can find file: /hello_world2 Can find the following line in /root/virt-sysprep-firstboot.log: "Hello World2" Looks good to me. (In reply to Richard W.M. Jones from comment #5) > Looks good to me. I'm sorry, there is some thing wrong with my browser when i paste my comment, maybe cause by network delay and this lead to Comment 4 looks confusion. The actual result is 'virt-sysprep --firstboot' works well with rhel7 in libguestfs-1.20.11-10.el6. :-) There is another bug with libguestfs-tools-1.20.11-11.el6.x86_64 and RHEL 7 I use a very simple script to update the guest at first boot : yum clean all yum -y update reboot It’s working well with RHEL 6.X but with RHEL 7, the script is never deleted and the guest is stuck in a infinity loop of reboot Should I create a new bug for this ? Thanks (In reply to j.vandeville from comment #7) > There is another bug with libguestfs-tools-1.20.11-11.el6.x86_64 and RHEL 7 RHEL 7 guest? Anyway, yes, please file new bugs for any issues you find. So it seems like firstboot scripts work with RHEL 7 guests, right? The problem reported in comment 7 is bug 1159651, which has just been fixed upstream (and affects only scripts which cause the virt-sysprep firstboot sequence to not complete). (In reply to Lingfei Kong from comment #3) > There no such lines in /root/virt-sysprep-firstboot.log: > "Hello World" There's a related issue, i.e. that the /root/virt-sysprep-firstboot.log log file will contain only the output of the last script run. A patch fixing this has been sent to the mailing list: https://www.redhat.com/archives/libguestfs/2014-November/msg00009.html Not reproduced with libguestfs-tools-c-1.20.11-14.el6.x86_64 on rhel 6.7. Steps: Steps to reproduce: 1. Create a RHEL7.1 VM on a RHEL6.7 host 2. Create a script used to test: #cat test.sh #!/bin/bash echo "Hello World2" touch /hello_world2 3. Use virt-sysprep with firstboot option #virt-sysprep --firstboot test.sh -a rhel7.1.img 4. Check in rhel7.1 guest: Can find file: /hello_world2 Can find the following line in /root/virt-sysprep-firstboot.log: "Hello World2" Thanks Hu Zhang for testing this. I confirm that this was fixed by the updates for the virt-sysprep addition in RHEL 6.6. Regarding the issue mentioned in comment #7, it is bug #1159651, fixed in RHEL 6.7. |