0

I have a vmdk file for a windows server boot disk that I received from our partners. I have loaded it up in a google GCS bucket with intention of creating a GCP disk "image" and thereafter using that "image" to create a boot disk for new GCP compute engine instance

When I try to "import" the VMDK to create the "image" it fails after a very long time - ( 1 hour 59 minutes)

I do the import from GCP console ; The equivalent gcloud command is

gcloud compute images import my-bootable-disk --source-file=gs://partner-image-stage/MyImageOfBootDisk.vmdk --guest-environment

note that I have not specified the "--os=windows-XXX " option as I am not sure which specific windows version is on the disk. Instead I used "Detect Operating system " option

The log of import run in gcp looks as follows

[translate.import]: 2022-02-03T16:48:39Z Running step "wait-for-translate (WaitForInstancesSignal)
[translate.import.wait-for-translate]: 2022-02-03T16:48:39Z WaitForInstancesSignal: Waiting for instance "inst-translate-translate-import-6xjvv" to stop.
[translate.import.wait-for-translate]: 2022-02-03T16:48:39Z WaitForInstancesSignal: Instance "inst-translate-translate-import-6xjvv": watching serial port 1, SuccessMatch: "Translate complete", FailureMatch: ["TranslateFailed:" "Failed to download GCS path"] (this is not an error), StatusMatch: "Translate:".
[translate.import]: 2022-02-03T18:34:46Z Step "wait-for-translate" (WaitForInstancesSignal) timed-out.
[translate]: 2022-02-03T18:34:46Z Error running workflow: step "import" run error: Step "wait for-translate" (WaitForInstancesSignal) timed-out.
[translate]: 2022-02-03T18:34:46Z Workflow "translate" cleaning up (this may take up to 2 minutes).
[translate]: 2022-02-03T18:37:04Z Workflow "translate" finished cleanup.
[import-image]: 2022-02-03T18:37:05Z Import did not complete within the specified timeout of 1h56m24s
ERROR
ERROR: build step 0 "gcr.io/compute-image-tools/gce_vm_image_import:release" failed: step 

Another interesting point to note is that when I import the same image without specifying it as a "bootable image" but rather caling it a "data disk" then the import succeeds ! The equivalent gcloud command in that case (when import succeeds as a "data disk") is as follows

gcloud compute images import my-data-disk --source-file=gs://partner-image-stage/MyImageOfBootDisk.vmdk --data-disk

So, this seems to be a problem owing to some kind of restrictions google cloud has with bootable images

I did look at Google documentation that spells out the requirements that the source VM needs to meet https://cloud.google.com/compute/docs/import/import-ovf-files#source_vm_requirements

And another one for importing boot disks https://cloud.google.com/compute/docs/import/import-existing-image

However problem is, since this image is shared by our partners I am expected to specify what exact problem does their image have

I did look at Timeout error when creating an image in Google Cloud from a .vmdk file - and I did verify I have appropriate permissions. DO note that I can import the same file if I refrain from treating it as boot disk

And do you think I could use the disk imported as data disk and convert it to a bootable disk ?

Your inputs are solicited

Many thanks

Yogesh

4
  • 1
    How is the disk formatted (MBR or UEFI)? cloud.google.com/compute/docs/import/… Commented Feb 4, 2022 at 19:17
  • 1
    Have you run the Image Import Precheck Tool as seen in the documentation Commented Feb 7, 2022 at 8:53
  • @JohnHanley The link cloud.google.com/compute/docs/import/… seems to be concerning import of an OVA file to create a VM. In my case I am trying to create a disk image from a VMDK. Does the disk image creation command has an equivalant option like "--guest-os--features =UEFI_COMPATIBLE " ? The gcloud compute images import command for creating a disk image gives an error as follows ERROR: (gcloud.compute.images.import) unrecognized arguments: --guest-os-features =UEFI_COMPATIBLE Commented Feb 7, 2022 at 9:15
  • 2
    Try the next command to import the disk: gcloud alpha compute images create <MY_IMAGE_NAME> --source-image=<SOURCE_IMAGE_NAME> --source-image-project=<SOURCE_IMAGE_PROJECT> --guest-os-features=UEFI_COMPATIBLE Commented Feb 24, 2022 at 14:26

1 Answer 1

0

Use the next command to import the data disk and convert it to a bootable disk:

gcloud alpha compute images create <MY_IMAGE_NAME> --source-image=<SOURCE_IMAGE_NAME> --source-image-project=<SOURCE_IMAGE_PROJECT> --guest-os-features=UEFI_COMPATIBLE
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.