Bug 858696

Summary: virt-sysprep reports Guestfs.Error("read_lines: fopen: /etc/sysconfig/network: No such file or directory") on some Fedora guests
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, mbooth
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-30 07:44:34 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Richard W.M. Jones 2012-09-19 08:49:23 EDT
Description of problem:

If you install a Fedora 18 guest using the new anaconda, then
/etc/sysconfig/network is not always created.  I don't know why
this doesn't happen -- possibly because the text based installer
doesn't set the hostname?  Anyway, this breaks virt-sysprep:

# virt-sysprep -d F18Alpha
sysprep operation failed: exception: Guestfs.Error("read_lines: fopen: /etc/sysconfig/network: No such file or directory")

Version-Release number of selected component (if applicable):

libguestfs 1.18, also probably occurs in development branch

How reproducible:

100%

Steps to Reproduce:
1. Install Fedora 18 alpha using text installer.
2. Run virt-sysprep on it.

Actual results:

Fails as above.
Comment 2 Richard W.M. Jones 2012-11-30 07:27:00 EST
Reopening.

It turns out this is broken because of:
https://fedorahosted.org/fesco/ticket/963
(read that ticket and weep).

I'm going to fix this by setting /etc/hostname if the
version of Fedora detected is >= 18.