正在尝试从.img转换为.vdi:VERR_VD_INVALID_SIZE

问题描述 投票:0回答:1

[尝试将.img文件转换为.vdi文件时,出现以下错误。

VBoxManage convertfromraw file.img file.vdi
Converting from raw image file="file.img" to file="file.vdi"...
Creating dynamic image with size 814188811483 bytes (776471MB)...
VBoxManage: error: VD: The given disk size 814188811483 is not aligned on a sector boundary (512 bytes)
VBoxManage: error: Error code VERR_VD_INVALID_SIZE at /home/vbox/vbox-6.0.10/src/VBox/Storage/VD.cpp(6231) in function int VDCreateBase(PVDISK, const char*, const char*, uint64_t, unsigned int, const char*, PCVDGEOMETRY, PCVDGEOMETRY, PCRTUUID, unsigned int, PVDINTERFACE, PVDINTERFACE)
VBoxManage: error: Cannot create the disk image "file.vdi": VERR_VD_INVALID_SIZE

我使用“ dd”命令获取了.img。

我在Ubuntu 14.04上使用VB 6.0.10。

virtualbox
1个回答
0
投票

根据此链接,https://forum.openwrt.org/t/error-convert-img-to-vdi/1521。我终于找到了解决方案

您需要使用类似dd if=original.squashfs.combined.img of=padded.img bs=100m conv=sync在将其转换为vm映像之前。

© www.soinside.com 2019 - 2024. All rights reserved.