Openstack

[Openstack] base(backing file) 파일 수정 rebase

plastic2113 2024. 6. 2. 09:11
728x90
반응형

1. qemu이미지 파일 확인

qemu-img info [DISK]

 

image: [DISK]
file format: qcow2
virtual size: [PROVISIONED_SIZE] GiB
disk size: [USAGE_SIZE] GiB
cluster_size: 65536
backing file: [ORI_BASE_PATH]
backing file format: raw
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: disk
    protocol type: file
    file length: 11.1 GiB (11923750912 bytes)
    disk size: 11.1 GiB
    Format specific information:
        extent size hint: 1048576

 

2. rebase로 backing_file 수정

qemu-img rebase -f [qcow2] -u -F [qcow2] -b [NEW_BASE_PATH] [DISK]

 options:

 -f : backing file's format
-F : root disk's file format
-b : new backing file's path
-u : unsafe mode (does not check similarity of base image and new base image)

728x90
반응형