我想扩展win7虚拟机的磁盘容量,但是它提示我有快照,不能展开,但是快照不能删除。
[root@jwf home]# qemu-img resize win7.qcow2 +30G
qemu-img: Can't resize an image which has snapshots
qemu-img: This image does not support resize
[root@jwf home]#
使用qemu命令查看快照信息。
[root@jwf home]# qemu-img info win7.qcow2
image: win7.qcow2
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 64G
cluster_size: 65536
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
1 clean 0 2019-10-18 14:41:10 00:00:00.000
Format specific information:
compat: 1.1
lazy refcounts: true
但是我无法使用virsh命令看到快照信息。
[root@jwf home]# virsh snapshot-list win7
Name Creation Time State
------------------------------------------------------------
[root@jwf home]#
无法删除快照
[root@jwf home]# virsh snapshot-delete --domain win7 --snapshotname clean
error: Domain snapshot not found: no domain snapshot with matching name 'clean'
error: Domain snapshot not found: no domain snapshot with matching name 'clean'
[root@jwf home]# virsh snapshot-delete --domain win7 --snapshotname 1
error: Domain snapshot not found: no domain snapshot with matching name '1'
error: Domain snapshot not found: no domain snapshot with matching name '1'
在virt-manager.在这里输入图像描述中没有显示快照信息。
此虚拟机由我导入,没有快照配置文件。
[root@jwf home]#
[root@jwf home]# ls /var/lib/libvirt/qemu/snapshot/win7/
[root@jwf home]#
发布于 2020-11-21 19:23:23
有时virsh和qemu会看到不同的东西。这是偶然的,因为他们中的一个是盲人,而不那么频繁,因为他们中的一个是幻觉。在这种情况下,我相信virsh是盲目的。试试这个:
qemu-img info disk_image
qemu-img snapshot -d snapshot_id disk_image
qemu-img info disk_image
https://stackoverflow.com/questions/64841322
复制