Error Importing AlmaLinux 9 OVA with Systemd-Networkd to GCP

Hello Community,

I am attempting to import an OVA file built on AlmaLinux 9, which uses systemd-networkd for network management and adheres to the predictable network interface naming convention. The import process fails during the step where the disk is being made bootable on Google Compute Engine. Below are the details of the commands used:

Command Used:

gcloud compute images import "$image_name" \ --source-file "gs://${gcp_bucket}/${ova_file_name}" \ --os "rhel-9" \ --zone "us-central1-c"

I've also tried using --os "rocky-9" with similar results.

Error Message:

 

[import-image]: Inspecting disk for OS and bootloader
[import-image]: Making disk bootable on Google Compute Engine
[import-image]: step "translate-disk" run error: WaitForInstancesSignal FailureMatch found for "inst-translator-translate-translate-disk-y5v91": "TranslateFailed: error: internal_write: open: /etc/sysconfig/network-scripts/ifcfg-eth0: No such file or directory"
ERROR: build step 0 "us-central1-docker.pkg.dev/compute-image-import/wrappers/gce_vm_image_import:release" failed: step exited with non-zero status: 1
ERROR: (gcloud.compute.images.import) build 6b390135-6d86-4797-b571-05c72ddab3bf completed with status "FAILURE"

 

The system uses systemd-networkd instead of traditional ifcfg scripts, which seems to be causing issues during the import process, as the tool expects network configuration scripts at /etc/sysconfig/network-scripts/ifcfg-eth0.

Questions:

  1. How can I successfully import an AlmaLinux 9 OVA that uses systemd-networkd into GCP?
  2. Is there a way to bypass or provide custom handling during the "translate-disk" step to accommodate systems using systemd-networkd?
  3. Are there specific settings or preparatory steps recommended for importing OVAs with non-standard network configurations to Google Cloud?

Any guidance or insights would be greatly appreciated! Cheers!

1 0 78