I want to pipe my converted .vdi file into /dev/sda. My box.vdi is 2TB and my HDD is also 2TB, but the system I am doing the conversion from is only 128GB. All the resources (ref1 and ref2) I can find say I need to write it to an intermediate file and then dd that .img file into /dev/sda.
When I run: vboxmanage clonemedium box.vdi /dev/null --format=RAW; I get: VBoxManage: error: Cannot create destination file "/dev/null": VERR_ALREADY_EXISTS; Same with trying to write to /dev/sda.
This answer suggests I can use a pipe, but I get the error error: unknown option: - and that answer if from an old version of VirtualBox.
# vboxmanage clonemedium box.vdi - --format=RAW | dd of=/dev/null
Oracle VM VirtualBox Command Line Management Interface Version 7.0.12
Copyright (C) 2005-2023 Oracle and/or its affiliates
VBoxManage: error: unknown option: -
Usage - Create a clone of a medium:
VBoxManage clonemedium <uuid | source-medium> <uuid | target-medium> [disk | dvd | floppy] [--existing]
[--format= VDI | VMDK | VHD | RAW | other ] [--variant=Standard,Fixed,Split2G,Stream,ESX]
# vboxmanage clonemedium box.vdi --format=RAW | dd of=/dev/null
Oracle VM VirtualBox Command Line Management Interface Version 7.0.12
Copyright (C) 2005-2023 Oracle and/or its affiliates
VBoxManage: error: Mandatory output file parameter missing