您当前的位置:首页 > 计算机 > 软件应用 > 其它软件

qemu-img 重定向 backing file

时间:07-17来源:作者:点击数:

直接用qemu-img rebase  这样拷贝虚拟机的就可以不会因为backing file路径折腾半天了,比如我这个nfs的,就不用真去架设一个nfs来提供backing file了。

root@xxx-PC:/var/lib/libvirt/images# qemu-img info  vm-disk-1.qcow2.abcde6f1bc874f2dbfee21ce591d8634 
image: vm-disk-1.qcow2.abcde6f1bc874f2dbfee21ce591d8634
file format: qcow2
virtual size: 200G (214748364800 bytes)
disk size: 14G
cluster_size: 65536
backing file: nfs://abcde_vs_vol_rep2/abcde_vs_vol_rep2/template/6551127500485/vm-disk-1.qcow2.abcde4ca676543088de597c8d2ccfbb8
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         abcdef1bc874f2dbfee21ce591d8634_base_image_snapshot      0 2021-12-29 16:31:19   00:00:00.000
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

root@xxx-PC:/var/lib/libvirt/images# qemu-img rebase -u -b vm-disk-1.qcow2.abcde4ca676543088de597c8d2ccfbb8 vm-disk-1.qcow2.abcde6f1bc874f2dbfee21ce591d8634
root@actionchen-PC:/var/lib/libvirt/images# qemu-img info  vm-disk-1.qcow2.abcde6f1bc874f2dbfee21ce591d8634 
image: vm-disk-1.qcow2.abcde6f1bc874f2dbfee21ce591d8634
file format: qcow2
virtual size: 200G (214748364800 bytes)
disk size: 14G
cluster_size: 65536
backing file: vm-disk-1.qcow2.abcde4ca676543088de597c8d2ccfbb8
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         abcde6f1bc874f2dbfee21ce591d8634_base_image_snapshot      0 2021-12-29 16:31:19   00:00:00.000
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门