Creating base box for RHEL 9 corrupts VirtualBox disk image

63 views
Skip to first unread message

Scott M. Parrill

unread,
Aug 4, 2022, 1:25:45 PM8/4/22
to vagra...@googlegroups.com

I’ve got a RHEL 9 system I’ve created in VirtualBox and it is working nicely.  When I try to create a base box for Vagrant and then deploy from that base box, the system won’t boot.  The system dies running the start jobs for the logical volumes on the system.  The messages displayed on the console say “Dependency failed for <filesystem>” and “Timed out waiting for device <logical volume>”

 

Doing some experimentation, I discovered that Vagrant appears to be converting the .vdi file to a .vmdk file during the base box build.  If I take the .vdi file and convert it to a .vmdk file using the vboxmanage command, the resulting .vmdk file will not boot a VirtualBox VM.

 

I see there are CentOS 9 base boxes available for Vagrant but they do not meet the needs of our specific use case.

 

Can someone suggest to me what I’m am doing wrong either when I build the original VM or when I created the base box?

 

I am running VirtualBox 6.1.34 and Vagrant 2.2.19.  The VM setting are default other than the disk space and memory settings.  (The Vagrant version is because I have not been able to get newer versions on RHEL 7.x using the repository at https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo, which is a different issue in and of itself.)

 

Thanks,

Scott

 

 

---------------------------------------

Scott Parrill

Systems Administrator

Enterprise IT, Infrastructure and Security

University of Wyoming

spar...@uwyo.edu

307-766-4829

 

Stephen Austin

unread,
Aug 14, 2022, 3:19:38 PM8/14/22
to Vagrant
Hi Scott

I used this which worked for me https://app.vagrantup.com/alvistack/boxes/rhel-9

config.vm.box = "alvistack/rhel-9"

Best Regards

Scott M. Parrill

unread,
Aug 18, 2022, 10:54:56 AM8/18/22
to vagra...@googlegroups.com

Thanks for your response, Stephen, but that is simply consuming a pre-built base box.  My problem involves creating a custom base box.

 

What I have finally found, is that the Red Hat persistent naming file was causing me problems.  By setting “use_devicesfile = 0” in the /etc/lvm/lvm.conf and removing the /etc/lvm/devices/system.devices file, I can create a base box that will boot.  As part of the initial provisioning of the cloned system, I can then set use_devicesfile back to 1 and run “/usr/sbin/vgimportdevices -a” to recreate the system.devices on the cloned system.

 

Scott

 

---------------------------------------

Scott Parrill

Systems Administrator

Enterprise IT, Infrastructure and Security

University of Wyoming

spar...@uwyo.edu

307-766-4829

 

From: vagra...@googlegroups.com <vagra...@googlegroups.com> On Behalf Of Stephen Austin
Sent: Sunday, August 14, 2022 1:20 PM
To: Vagrant <vagra...@googlegroups.com>
Subject: [vagrant-up] Re: Creating base box for RHEL 9 corrupts VirtualBox disk image

 

This message was sent from a non-UWYO address. Please exercise caution when clicking links or opening attachments from external sources.

 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/bc135eef-0acc-41b2-9662-99fa55e6b868n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages