Red Hat Bugzilla – Bug 858696
virt-sysprep reports Guestfs.Error("read_lines: fopen: /etc/sysconfig/network: No such file or directory") on some Fedora guests
Last modified: 2012-11-30 07:44:34 EST
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
Steps to Reproduce:
1. Install Fedora 18 alpha using text installer.
2. Run virt-sysprep on it.
Fails as above.
It turns out this is broken because of:
(read that ticket and weep).
I'm going to fix this by setting /etc/hostname if the
version of Fedora detected is >= 18.