virt-sysprep命令清理缓存文件时失败的解决方法

virt-sysprep命令清理缓存文件时失败的解决方法

清理虚拟机临时及缓存文件命令:

virt-sysprep -d 虚拟机名

如果显示没有此命令:

yum whatprovides */virt-sysprep
yum install libguestfs-tools -y

有时它会报错,信息如下:

[   0.0] Examining the guest ...
virt-sysprep: error: libguestfs error: could not create appliance through 
libvirt.

Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct

Original error from libvirt: \u4e0d\u652f\u6301\u7684\u914d\u7f6e\uff1ashared access for disk 
'sdb' requires use of supported storage format [code=67 int1=-1]

If reporting bugs, run virt-sysprep with debugging enabled and include the 
complete output:

  virt-sysprep -v -x [...]

在这里插入图片描述
解决:执行下面命令更新包即可

yum upgrade libguestfs-tools
virt-sysprep -d 虚拟机名

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值