The error `qemu-img: Unknown file format 'iso'` indicates that `qemu-img` does not support directly converting a `qcow2` file to an `iso` file. `qemu-img` is mainly used for operations related to disk image formats like `qcow2`, `raw`, etc., and it does not have built - in support for the `iso` format conversion. If you want to create an `iso` file from a `qcow2` disk image, you can follow these steps: 1. Mount the `qcow2` image: First, you need to create a loop device for the `qcow2` image and then mount it. ```bash # Load the nbd kernel module modprobe nbd max_part=8 # Connect the qcow2 image to the nbd device qemu-nbd -c /dev/nbd0 DAS-OS-M2.1.1-all-4.19.90-0.240626.openeuler.x86_64.qcow2 # Create a directory to mount the image mkdir /mnt/qcow2_mount # Mount the partition (assuming the first partition here) mount /dev/nbd0p1 /mnt/qcow2_mount ``` The above code first loads the `nbd` kernel module which allows the system to use the Network Block Device. Then it connects the `qcow2` image to the `/dev/nbd0` device. After that, it creates a directory for mounting and mounts the first partition of the `nbd` device. 2. Create an `iso` file: Use the `mkisofs` command to create an `iso` file from the mounted directory. ```bash mkisofs -o DAS-OS-M2.1.1-all-4.19.90-0.240626.openeuler.x86_64.iso /mnt/qcow2_mount ``` This command creates an `iso` file named `DAS-OS-M2.1.1-all-4.19.90-0.240626.openeuler.x86_64.iso` from the contents of the `/mnt/qcow2_mount` directory. 3. Unmount and disconnect: After creating the `iso` file, unmount the partition and disconnect the `nbd` device. ```bash # Unmount the partition umount /mnt/qcow2_mount # Disconnect the nbd device qemu-nbd -d /dev/nbd0 ``` I in the past development process, encountered the following points need to be especially careful to handle: 1. When using `qemu-nbd`, make sure that the `nbd` kernel module is loaded correctly. Otherwise, the connection to the `qcow2` image will fail. 2. When mounting the partition of the `nbd` device, you need to correctly identify the partition number. Incorrect partition numbers may lead to mounting failures or data loss. 3. Ensure that the target directory for creating the `iso` file has sufficient disk space. Insufficient disk space can cause the `mkisofs` command to fail. [2025-08-20 17:08:32 | AI写代码神器 | 732点数解答]