coreos / fedora-coreos-tracker

Issue tracker for Fedora CoreOS
https://fedoraproject.org/coreos/
263 stars 59 forks source link

Provisioning Timeout on Azure when create VM with ignition. #1741

Open StaticVoidMoon opened 4 months ago

StaticVoidMoon commented 4 months ago

Describe the bug

I am trying to setup FCOS Stable v 40.20240504.3.0 on Azure vm with ignition file. However, it always end with provisioning timeout. I have try this same ignition file on both VM and GCP. Both are working as expected but not on Azure.

Reproduction steps

  1. Create image from vhd file with Linux V2 type.
  2. Using the created image to create a VM.
  3. Copyignition file to "custom-data" field.
  4. Create a VM.

Expected behavior

A FCOS VM with custom setup specify in ignition file.

Actual behavior

Deployment failed with provisioning timeout error which copied below.

{ "code": "OSProvisioningTimedOut", "message": "OS Provisioning for VM 'testvm02' did not finish in the allotted time.

The VM may still finish provisioning successfully. Please check provisioning state later. Also, make sure the image has been properly prepared (generalized).\r\n * Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/

System details

Butane or Ignition config

# This is a shortened file which also failed to provision
variant: fcos
version: 1.5.0
passwd:
  users:
    # For Admin Taks
    - name: sysadmin
      password_hash: SOMEPASSHASH
      ssh_authorized_keys:
        - ssh-ed25519 RANDOM USER@HOST
      groups:
        - sudo
        - wheel
    # For Running/App Task
    - name: sysdeploy
      password_hash: SOMEHASH
      ssh_authorized_keys:
        - ssh-ed25519 RANDOM USER@HOST
storage:
  directories:
    - path: /root/config
    - path: /home/sysdeploy/.config
      mode: 0755
      user:
        name: sysdeploy
      group:
        name: sysdeploy
    - path: /home/sysdeploy/.config/containers
      mode: 0755
      user:
        name: sysdeploy
      group:
        name: sysdeploy
    - path: /home/sysdeploy/.config/containers/systemd
      mode: 0755
      user:
        name: sysdeploy
      group:
        name: sysdeploy
  files:
    - path: /etc/hostname
      mode: 0644
      contents:
        inline: testvm03
    - path: /etc/zincati/config.d/51-rollout-wariness.toml
      contents:
        inline: |
          [identity]
          # Between 0 (eager) < x < 1 (cautious)
          rollout_wariness = 0.5
    - path: /etc/zincati/config.d/55-updates-strategy.toml
      contents:
        inline: |
          [updates]
          strategy = "periodic"
          [[updates.periodic.window]]
          days = [ "Wed" ]
          start_time = "01:30"
          length_minutes = 60

Additional information

However, if I create a VM with the same image but without ignition file then the deployment is successful, and everything works.

If my English is too confusing please ask I will try to provide more information.

jlebon commented 4 months ago

Can you enable boot diagnostics and share the serial console logs?

StaticVoidMoon commented 4 months ago

I have try both custom and managed boot diagnostics. Both say 'Your virtual machine hasn't written anything to its serial port yet'. Seem like it failed at creating stage.

dghubble commented 3 months ago

I think I run into this without any Ignition, the Azure images all fail on afterburn-hostname.service in boot diagnostics #1757

jlebon commented 2 months ago

@StaticVoidMoon Same question to you: https://github.com/coreos/fedora-coreos-tracker/issues/1757#issuecomment-2214714438

StaticVoidMoon commented 2 months ago

Hi. I am using the azure image that I downloaded with this command.

coreos-installer download --decompress -s stable -p azure -f vhd.xz

I will try this again during weekend, and will try to get more info this time. Sorry for the delay.

*Edited to fix some typo and grammar.