我正在尝试使用virt-builder自动创建云映像。
我在Centos 7中使用了以下命令,它一直失败。这件事背后有什么线索吗?
# virt-builder debian-9 -o /var/lib/libvirt/images/DB9-20G.qcow2 --format qcow2 --hostname ip.com --update --root-password password:root123 --firstboot-command 'dhclient ens3' --size 20G
这是输出:
[ 2.3] Downloading: http://libguestfs.org/download/builder/debian-9.xz
[ 3.3] Planning how to build this image
[ 3.3] Uncompressing
[ 6.2] Resizing (using virt-resize) to expand the disk to 20.0G
virt-resize: error: libguestfs error: resize2fs: e2fsck 1.42.9
(28-Dec-2013)
/dev/sda1 has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!
If reporting bugs, run virt-resize with debugging enabled and include the
complete output:
virt-resize -v -x [...]更新-01:似乎e2fsprogs在Centos 7中处理这个问题已经很久了。有没有其他方法可以更好地处理从命令行动态创建云映像的问题?
发布于 2018-01-25 19:39:16
与e2fsprogs 7一起提供的CentOS有点太老了,无法理解构建磁盘映像所用的ext4文件系统特性元数据_csum。用户支持出现在1.43中(就像过时的wiki所暗示的那样)。
wiki还指出,不理解该特性的旧工具与它一起使用并不安全。
因此,建议您:“获取e2fsck的更新版本!”
在我理想的世界里,Red会把这个部分移植到e2fsprogs中,或者只是重新建立它的基础,但我不会指望它。
由于您正在构建较新的操作系统映像,因此应该考虑使用更现代的操作系统作为工作站。我使用Fedora (目前27,偶尔贝塔)用于类似的目的。
https://serverfault.com/questions/894024
复制相似问题