From 728d2a901f34e9d8b5924b64cad6ad2ce841319d Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 13 Nov 2023 06:54:19 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=BA=E2=80=9C#=E2=80=9C?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo --- ...5\277\347\224\250\347\216\257\345\242\203.md" | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git "a/docs/zh/docs/Virtualization/\345\207\206\345\244\207\344\275\277\347\224\250\347\216\257\345\242\203.md" "b/docs/zh/docs/Virtualization/\345\207\206\345\244\207\344\275\277\347\224\250\347\216\257\345\242\203.md" index 204bf678f..a718a36e5 100644 --- "a/docs/zh/docs/Virtualization/\345\207\206\345\244\207\344\275\277\347\224\250\347\216\257\345\242\203.md" +++ "b/docs/zh/docs/Virtualization/\345\207\206\345\244\207\344\275\277\347\224\250\347\216\257\345\242\203.md" @@ -27,7 +27,7 @@ 2. 使用qemu-img工具的create命令,创建镜像文件,命令格式为: ``` - $ qemu-img create -f -o + # qemu-img create -f -o ``` 其中,各参数含义如下: @@ -40,7 +40,7 @@ 例如,创建一个磁盘设备大小为4GB、格式为qcow2的镜像文件openEuler-image.qcow2,命令和回显如下: ``` - $ qemu-img create -f qcow2 openEuler-image.qcow2 4G + # qemu-img create -f qcow2 openEuler-image.qcow2 4G Formatting 'openEuler-image.qcow2', fmt=qcow2 size=4294967296 cluster_size=65536 lazy_refcounts=off refcount_bits=16 ``` @@ -52,13 +52,13 @@ 1. 查询当前虚拟机镜像磁盘空间大小,命令如下: ``` - $ qemu-img info + # qemu-img info ``` 例如,查询openEuler-image.qcow2镜像磁盘空间大小的命令和回显如下,说明该镜像磁盘空间大小为4GiB。 ``` - $ qemu-img info openEuler-image.qcow2 + # qemu-img info openEuler-image.qcow2 image: openEuler-image.qcow2 file format: qcow2 virtual size: 4.0G (4294967296 bytes) @@ -74,26 +74,26 @@ 2. 修改镜像磁盘空间大小,命令如下,其中_imgFiLeName_为镜像名称,“+”和“-”分别表示需要增加或减小的镜像磁盘空间大小,单位为K、M、G、T,代表KiB、MiB、GiB、TiB。 ``` - $ qemu-img resize [+|-] + # qemu-img resize [+|-] ``` 例如,将上述openEuler-image.qcow2镜像磁盘空间大小扩展到24GiB,即在原来4GiB基础上增加20GiB,命令和回显如下: ``` - $ qemu-img resize openEuler-image.qcow2 +20G + # qemu-img resize openEuler-image.qcow2 +20G Image resized. ``` 3. 查询修改后的镜像磁盘空间大小,确认是否修改成功,命令如下: ``` - $ qemu-img info + # qemu-img info ``` 例如,上述openEuler-image.qcow2镜像磁盘空间已扩展到24GiB,命令和回显如下: ``` - $ qemu-img info openEuler-image.qcow2 + # qemu-img info openEuler-image.qcow2 image: openEuler-image.qcow2 file format: qcow2 virtual size: 24G (25769803776 bytes) -- Gitee