Thanks a lot, Rich, for your quick response!
I installed libguestfs-tools into one VM instance that has the same kernel version as the
guest VM to be modified by virt-sysprep, I verified that it indeed worked ok for
virt-sysprep on the guest VM instance.
However, I noticed that my host kernel is with version 3.10.101, and the guest is using
kernel version 3.10.0.
It appears that the host has even newer version of the kernel.
But it indeed resolved my issue by using the exact same kernel version.
Regards,
Alan
-----Original Message-----
From: Richard W.M. Jones [mailto:rjones@redhat.com]
Sent: 2017年8月23日 16:54
To: Tang, Alan (NSB - CN/Qingdao)
Cc: libguestfs(a)redhat.com
Subject: Re: [Libguestfs] virt-sysprep: error: no operating systems were found in the
guest image on libguestfs-1.36.5
On Wed, Aug 23, 2017 at 06:25:17AM +0000, Tang, Alan (NSB - CN/Qingdao) wrote:
[ 0.000000] Linux version 3.10.101 (root@ci092133) (gcc version
4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Mon Apr 11 16:22:43 ULAT 2016
...
commandrvf: mount -o ro /dev/sda1 /sysroot/
[ 2.333550] SGI XFS with ACLs, security attributes, large block/inode numbers, no
debug enabled
[ 2.339803] XFS (sda1): Version 5 superblock detected. This kernel has EXPERIMENTAL
support enabled!
[ 2.339803] Use of these features in this kernel is at your own risk!
[ 2.342254] XFS (sda1): Superblock has unknown incompatible features (0x1) enabled.
[ 2.342254] Filesystem can not be safely mounted by this kernel.
[ 2.344366] ffff88001c25a000: 58 46 53 42 00 00 10 00 00 00 00 00 00 1f ff 00
XFSB............
[ 2.345719] ffff88001c25a010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
[ 2.347074] ffff88001c25a020: e3 51 03 f0 80 28 40 84 b7 5a 98 69 a8 46 b6 46
.Q...(@..Z.i.F.F
[ 2.348416] ffff88001c25a030: 00 00 00 00 00 10 00 04 00 00 00 00 00 00 00 40
...............@
[ 2.349765] XFS (sda1): Internal error xfs_sb_read_verify at line 730 of file
fs/xfs/xfs_mount.c. Caller 0xffffffffa01faf35
The problem is that the XFS module in this old kernel does not know how to read new
features in the XFS filesystem from the CentOS 7 kernel (and instead of giving a useful
error, panics).
Unfortunately in general it's not possible to read an XFS filesystem from a newer
machine with an older kernel. You will have to upgrade the host to a new version, or
install or use a newer kernel by setting various environment variables:
http://libguestfs.org/guestfs-faq.1.html#broken-kernel-or-trying-a-differ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones Read my
programming and virtualization blog:
http://rwmj.wordpress.com virt-top is 'top'
for virtual machines. Tiny program with many powerful monitoring features, net stats,
disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top