Updated rockylinux/8 Vagrant box hangs on "Waiting for domain to get an IP address..."

I cannot find a GitHub repo or issue tracker for the Rocky Linux Vagrant boxes, so I’m posting here. Let me know if there is a place more appropriate to post this issue.

I just updated my Vagrant boxes and my rockylinux/8 box now hangs on “Waiting for domain to get an IP address…”. I use the libvirt provider. https://app.vagrantup.com/rockylinux/boxes/8

The old version that works is 5.0.0. The new version that does not is 7.0.0. If I set server.vm.box_version = "5.0.0" in my Vagrantfile, the VM provisions as expected.

I can reproduce the problem on two completely different hosts, so I’m pretty sure it’s not something related to my environment.

Host 1:
Ubuntu 22.04
Linux 5.15.0-56-generic
Vagrant 2.2.19
vagrant-libvirt (0.7.0, system)

Host 2:
Arch Linux
Linux 6.1.1-arch1-1
Vagrant 2.3.4
vagrant-libvirt (0.11.2, global)

To perform additional sanity checks, I also made sure I can provision rockylinux/9 and centos/7. Both of these boxes provision on both of my hosts without issue. This issue appears to only exist with rockylinux/8 box version 7.0.0 with the libvirt provider.

Apologies for the delay in responding… i just re-found this tab hiding in my browser :slight_smile:

So, I think this is due to the image on vagrantup not having BIOS boot support. I am going to rebuild the image this week and attempt to fix this issue.

Thank you for your patience. I’ll update you when I have an image you can test out.

1 Like

Hey, @neil , just checking in to see if you got a chance to rebuild this image yet.

Hi,

Yep I managed to build them last week. Please give this a test.

Rocky 8: https://s3.us-east-2.amazonaws.com/resf-empanadas/buildimage-8.7-x86_64/Rocky-8-Vagrant-Libvirt-8.7-20230126.0.x86_64/1674749238/Rocky-8-Vagrant-Libvirt-8.7-20230126.0.x86_64.box

Rocky 9: https://s3.us-east-2.amazonaws.com/resf-empanadas/buildimage-9.1-x86_64/Rocky-9-Vagrant-Libvirt-9.1-20230126.0.x86_64/1674749578/Rocky-9-Vagrant-Libvirt-9.1-20230126.0.x86_64.box

I’m getting the other images tested, too. Thank you for your patience!

Best,
Neil

Thanks Neil. Still having the same issue with this one. This is how I’m testing:

Add the box and name it: vagrant box add --name rockylinux8_test https://s3.us-east-2.amazonaws.com/resf-empanadas/buildimage-8.7-x86_64/Rocky-8-Vagrant-Libvirt-8.7-20230126.0.x86_64/1674749238/Rocky-8-Vagrant-Libvirt-8.7-20230126.0.x86_64.box

Reference the box in Vagrantfile by the aforementioned name config.vm.box = "rockylinux8_test"

Running vagrant up produces the same symptoms as my original post, where it hangs at “Waiting for domain to get an IP address…”

Hey, @neil

Just wanted to check in on this issue again. Have you had a chance to take another stab at this? Let me know if there’s anything I can do to help.

Hey @neil

I saw version 8 of the rockylinux/8 box was uploaded a few days after I posted my last response. This new box still hangs on “Waiting for domain to get an IP address…”. Do you have any recommendations?

1 Like

Hello @resuni, I encountered the same issue.
I did my own Rocky Linux 8 so feel free to use it : https://app.vagrantup.com/ArnaudLecomte/boxes/RockyLinux8/

I’m having the same problem. The other Rocky 8 images are far too large for my needs. I’m using 5.0 because it works, but it’s frustrating that 7.0 and 8.0 are still broken. And unfortunately 5.0 is only 5GB out of the box so I have to resize it to get it fully updated to Rocky 8.8. The new 10GB size seems ideal if it would get past the GRUB and boot.

And unfortunately 5.0 is only 5GB out of the box so I have to resize it to get it fully updated to Rocky 8.8.

I do the exact same thing. Here’s a function I have in my Vagrantfile to do this, in case it helps anyone. Disclaimer: I haven’t used this for Rocky 9 in a long time, so you may have to mess with the partition number/size in the case statement to get that to work. However, I still spin up Rocky 8 boxes quite frequently and I know that works.

  # The below function assumes you've grown your libvirt disk to 10 GB, i.e.
  config.vm.provider :libvirt do |libvirt|
    libvirt.machine_virtual_size = 10
  end

  # Function to grow guest partition and file system.
  def growfs (server)

    # Values are slightly different depending on the box
    # rockylinux/8: Partition number = 1, Final size = 10G
    # rockylinux/9: Partition number = 5, Final size = 9.0G
    case server.vm.box
    when "rockylinux/8"
      n = "1"
      s = "10G"
    when "rockylinux/9"
      n = "5"
      s = "9.0G"
    else
      puts "Failed to resize root. Exiting."
      exit 1
    end

    # Use shell provisioner to grow root partition and file system.
    #
    # Use if statement to check partition size so it
    # doesn't run on every `vagrant provision`.
    #
    # Parted's script interface (-s) breaks if parted asks for user
    # confirmation, but it does have "---pretend-input-tty":
    # https://stackoverflow.com/a/68546843/6491246
    server.vm.provision "shell", inline: <<-SCRIPT
      if [\
        "$(echo $(df -h --output=size /dev/vda#{n} | grep -v Size))" != "#{s}" \
      ]; then
        echo -e "resizepart\n#{n}\nYes\n100%\nquit" |
          parted /dev/vda ---pretend-input-tty
        xfs_growfs /dev/vda#{n}
      fi
    SCRIPT
  end

The growfs function is called where the VM is defined:

  config.vm.define "whatever" do |server|
    server.vm.box = "rockylinux/8"
    server.vm.box_version = "5.0.0"
    
    # Grow the partition and file system
    growfs server
  end
1 Like