I previously had my vm as a vmdk and I converted it to vdi with this command:
after which I had a vdi file as well as a vmdk file in my vm folder. Is this the way it's supposed to work? This is the first time I've ever tried to convert a vmdk so I don't know what to expect.VBoxManage clonehd --format VDI centos6-disk1.vmdk centos6-disk1.vdi
I then booted the vm and ran zerofree in it to prepare for the compact. However when I ran the compact command it throws the error. The console doesn't give any reason for this error, this is the full output:
What's the solution to this?# VBoxManage modifyhd "centos6" --compact
VBoxManage: error: The medium '/root/VirtualBox VMs/centos6' can't be used as the requested device type
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp