Skip to content

Instantly share code, notes, and snippets.

@mamonu
Last active April 22, 2024 09:39
Show Gist options
  • Save mamonu/671038b09f5ae9e034e8 to your computer and use it in GitHub Desktop.
Save mamonu/671038b09f5ae9e034e8 to your computer and use it in GitHub Desktop.
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI
@scothost
Copy link

that wont work, you need

qemu-img convert -f qcow2 gnome.qcow2 -O vdi gnome.vdi

@Exponential-Workload
Copy link

qemu-img convert -f qcow2 gnome.qcow2 -O vdi gnome.vdi

worked fine for me as shown in the README; the -O parameter is non-positional and -f is not required if the input file is not raw - if it is raw it's still not required if it ends in .raw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment