1

I want to convert vmdk to dvi but i have a trouble

  VBoxManage convertfromraw --format VDI 'OWASP BWA-cl1.vmdk' OWASPBWA.vdi
  
  Converting from raw image file="OWASP BWA-cl1.vmdk" to file="OWASPBWA.vdi"...
  Creating dynamic image with size 780 bytes (1MB)...
  VBoxManage: error: VD: The given disk size 780 is not aligned on a sector boundary (512 bytes)
  VBoxManage: error: Error code VERR_VD_INVALID_SIZE at /home/vbox/vbox-6.1.32/src/VBox/Storage/VD.cpp(6242) in function int VDCreateBase(PVDISK, const char*, const char*, uint64_t, unsigned int, const char*, PCVDGEOMETRY, PCVDGEOMETRY, PCRTUUID, unsigned int, PVDINTERFACE, PVDINTERFACE)

3VBoxManage: error: Cannot create the disk image "OWASPBWA.vdi": VERR_VD_INVALID_SIZE

Arbsalto
  • 11
  • 2
  • `convertfromraw` suggests that it expects to read either a "raw" partition, or a raw disk image created using a tool such as `dd`. By comparison `vmdk` is an "intelligent" container file format used for virtual disks, it is pretty far from being a "raw disk". – Mokubai Mar 18 '22 at 14:13

1 Answers1

2

The convertfromraw command in VirtualBox can't convert from VMDK files. As its name says, it only converts from "raw" image files (i.e. ones which aren't in any special format yet).

(Sector boundary isn't the problem; this error message shows up because convertfromraw just doesn't understand the input image format and thinks the virtual disk is smaller than it's supposed to be.)

VirtualBox should actually be able to use VMDK images directly – it doesn't require VDI.

Use the qemu-img command from QEMU to convert between VMDK and VDI (and other formats):

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966