Score:0

GCP image import error: install_apt_packages failing

um flag

I was trying to import a debian-11 image (debian-11-genericcloud-amd64.raw) using gcloud compute images import command. However it was failing, and looking at the logs it seems that install_apt_packages is failing. What could be the reason for this? There's not much information given in the logs below to dissect it further.

Maybe it's unable to install the GCP guest environment packages due to some network issue? But there isn't much information given about it in the logs unfortunately.

Logs (newest entries first) :

ERROR
[import-image]: 2022-10-31T04:28:10Z step "translate-disk" run error: step "wait-for-translator" run error: WaitForInstancesSignal FailureMatch found for "inst-translator-translate-translate-disk-nh03g": "TranslateFailed: error: E: Sub-process /usr/bin/dpkg returned an error code (2)"
[translate]: 2022-10-31T04:28:10Z Workflow "translate" finished cleanup.
[translate]: 2022-10-31T04:27:54Z Workflow "translate" cleaning up (this may take up to 2 minutes).
[translate]: 2022-10-31T04:27:54Z Error running workflow: step "translate-disk" run error: step "wait-for-translator" run error: WaitForInstancesSignal FailureMatch found for "inst-translator-translate-translate-disk-nh03g": "TranslateFailed: error: E: Sub-process /usr/bin/dpkg returned an error code (2)"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:27:54Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Function <function install_apt_packages at 0x7fa49137a6a8> failed, waiting 1 seconds, retrying 1 ..."
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:27:54Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: E: Sub-process /usr/bin/dpkg returned an error code (2)"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:10:34Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Function <function update_apt at 0x7fa49137a7b8> executed in less then 36 sec, with 1 tentative(s)"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:09:24Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Function <function install_apt_packages at 0x7fa49137a6a8> executed in less then 47 sec, with 1 tentative(s)"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:08:34Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Function <function update_apt at 0x7fa49137a7b8> executed in less then 76 sec, with 1 tentative(s)"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:07:24Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Installing GCE packages."
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:06:44Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: /dev/sda"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:06:44Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": StatusMatch found: "TranslateStatus: Executing command: ['lsblk', '--noheadings', '--output=NAME', '--paths', '--list', '--nodeps', '-e7']"
[translate.translate-disk.wait-for-translator]: 2022-10-31T04:06:34Z WaitForInstancesSignal: Instance "inst-translator-translate-translate-disk-nh03g": watching serial port 1, SuccessMatch: "TranslateSuccess:", FailureMatch: ["TranslateFailed:" "Failed to download GCS path"] (this is not an error), StatusMatch: "TranslateStatus:".
[translate.translate-disk]: 2022-10-31T04:06:34Z Running step "wait-for-translator" (WaitForInstancesSignal)
Jeffrey D. avatar
cl flag
1.)You can also review this GCP public documentation for [importing virtual appliances](https://cloud.google.com/compute/docs/import/import-ovf-files) review all the prerequisite or all requirements. 2.) or try to import a data disk and attach it to an existing VM, try this if working.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.