Not able to import .vmdk images exported from Oracle Virtualbox to GCP

1,353 views
Skip to first unread message

RVP RVP

unread,
May 25, 2018, 9:19:38 AM5/25/18
to gce-discussion
Since it requires image in the .tar.gz file 
Tried to convert this image to RAW format but failed to do so.

Creating image "image-1" failed. Error: Invalid value for field 'resource.id': '0'. The provided source location is not a .tar.gz file

C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd PGT_Trial_VM-disk1.vmdk DSGnewimage.raw --format RAW
VBoxManage.exe: error: Could not get the storage format of the medium 'C:\Program Files\Oracle\VirtualBox\PGT_Trial_VM-disk1.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp


C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifymedium --resize 60000 "PGT_Trial_VM-disk1.vmdk"
VBoxManage.exe: error: Could not get the storage format of the medium 'C:\Program Files\Oracle\VirtualBox\PGT_Trial_VM-disk1.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp

















RVP RVP

unread,
May 25, 2018, 9:41:18 AM5/25/18
to gce-discussion


Sent from my iPhone
--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/23b84c90-72d2-4ff5-937d-9fb97a206a94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fady (Google Cloud Platform)

unread,
May 25, 2018, 2:26:46 PM5/25/18
to gce-dis...@googlegroups.com

As you mentioned, and per this document, when exporting a disk image to Google Cloud platform, it must be in RAW format. Therefore, if it is not, it should be converted to this format first before you start the export (import from the point of view of GCE). In your case, you seem to have attempted to convert your Oracle Virtualbox disk image using their (VBoxManage) tool and encountered the error message above. I am not an expert on Virtualbox, but it seems that the tool can only convert VDI format to RAW and not from VMDK. I found this third party article that may help, that is suggesting using qemu-img to convert VMDK to RAW as follows :


$ qemu-img convert -f vmdk -O raw image.vmdk image.img


If that did not work, and since the question is more related to converting VMDK to RAW, I suggest posting your question at serverfault.com or superuser.com where you have access to a large community of enthusiasts and experts to share ideas with and get support from.


Reply all
Reply to author
Forward
0 new messages