Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Discussions about using Linux guests in VirtualBox.
Post Reply
Frits Hoogland
Posts: 5
Joined: 4. Jul 2021, 16:50

Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by Frits Hoogland »

Host OS: OSX 11.4
Virtualbox: 6.1.22r144080

Installing Centos 8.4 and Rocky 8.4 via packer, which uses kickstart, gets the virtual machine that is started as part of the installation into running state, but the windows doesn't respond (and gives the infamous rotating beachball for that window only). Normally the kickstart installation is visible in the virtual machine window, but that gets stuck (and doesn't respond).
When waiting on packer, it seems to proceed, because eventually ssh becomes available and it can execute the scripts.
But for example the script to insert the vagrant insecure secret key doesn't insert the insecure secret key, and thus later usage fails.

I have done a full manual installation (going through the installation screens myself), and much to my surprise, that seems to work.

Also anything up to Centos 8.3 seems to work fine (?)
I do find the following lines in the VBox.log file with errors that do not seem to happen with my other VMs:

Code: Select all

00:00:02.820959 PCI: Setting up resources and interrupts
00:00:02.821118 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.822746 GUI: UIMediumEnumerator: Medium-enumeration finished!
00:00:02.837210 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:02.837562 VMMDev: Guest Log: CPUID EDX: 0x178bfbff
00:00:02.837703 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:02.837778 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:02.838526 AHCI#0: Reset the HBA
00:00:02.838535 VD#0: Cancelling all active requests
00:00:02.838575 AHCI#0: Port 0 reset
00:00:02.838608 VD#0: Cancelling all active requests
00:00:02.839541 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=16383/16/63 LCHS=1024/255/63 0x0000000004e20000 sectors
00:00:02.841033 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:02.857902 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:02.857943 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000017d171000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:03.320785 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
00:00:03.325294 GUI: 2D video acceleration is disabled
00:00:03.325374 GUI: HID LEDs sync is enabled
00:00:03.343419 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
00:00:05.319545 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:05.320030 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0032
00:00:05.320618 VMMDev: Guest Log: BIOS: Boot from Hard Disk 0 failed
00:00:05.321063 VMMDev: Guest Log: BIOS: Boot : bseqnr=2, bootseq=0003
00:00:05.328417 VMMDev: Guest Log: BIOS: Booting from CD-ROM...
00:00:05.578633 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:05.695195 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000017d171000 w=640 h=480 bpp=24 cbLine=0x780 flags=0x0 origin=0,0
00:00:14.437883 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:14.452128 VMMDev: Guest Log: BIOS: KBD: unsupported int 16h function 03
00:00:14.452543 VMMDev: Guest Log: BIOS: AX=0305 BX=0000 CX=0000 DX=0000
00:00:14.453264 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=81
00:00:14.453833 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=81
00:00:14.454441 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=82
00:00:14.455007 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=82
00:00:14.455611 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=83
00:00:14.456177 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=83
00:00:14.456784 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=84
00:00:14.457351 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=84
00:00:14.457955 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=85
00:00:14.458521 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=85
00:00:14.459124 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=86
00:00:14.459690 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=86
00:00:14.460325 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=87
00:00:14.460893 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=87
00:00:14.461499 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=88
00:00:14.462068 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=88
00:00:14.462676 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=89
00:00:14.463243 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=89
00:00:14.463851 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8a
00:00:14.464417 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8a
00:00:14.465126 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8b
00:00:14.465742 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8b
00:00:14.466364 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8c
00:00:14.466940 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8c
00:00:14.467555 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8d
00:00:14.468130 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8d
00:00:14.468741 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8e
00:00:14.469316 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8e
00:00:14.469952 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8f
00:00:14.470526 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8f
00:00:14.665348 GIM: KVM: VCPU  0: Enabled system-time struct. at 0x000000001a201000 - u32TscScale=0xde38e394 i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x65add19a3 uVirtNanoTS=0x2c21aa168 TscKHz=2303998
00:00:14.665407 TM: Switching TSC mode from 'VirtTscEmulated' to 'RealTscOffset'
00:00:14.892756 GIM: KVM: Enabled wall-clock struct. at 0x000000001a200000 - u32Sec=1625410155 u32Nano=575391000 uVersion=2
Does anyone know if and how I can make packer function normally and build a virtual machine with Centos/Rocky 8.4 again?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by mpack »

Provide a VM log file. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
Frits Hoogland
Posts: 5
Joined: 4. Jul 2021, 16:50

Re: Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by Frits Hoogland »

Here is the logfile after packer started it, which made the VM window not responding, and provisioned it.
Attachments
rocky_84_yb-2021-07-04-19-48-02.log.zip
The VM log file
(35.59 KiB) Downloaded 12 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by mpack »

I'm not sure I can help you further. I'm seeing mention of lots of things we don't support here, including Packer, KickStart, and Vagrant. At least some of those have their own support forums.

The only unusual thing I see in the log is that the VM process isn't being terminated properly - it just seems to go into an endless loop of requesting a COM interface to a background process it has just terminated.

To receive support here you should use the officially provided installer (and nothing else), and ideally create your own VM as well.
Frits Hoogland
Posts: 5
Joined: 4. Jul 2021, 16:50

Re: Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by Frits Hoogland »

I understand your point of view. I know and understand that you cannot support tools that are totally outside of virtualbox, that is completely understandable.
However, with specific use of virtualbox, the Window that shows the console gets stuck during installation, and gets truly stuck.
The unattended installation does continue in the VM, despite the console window being stuck, and the changing machine state is visible in the console screen display in the VirtualBox main manager application.
The console window getting stuck seems like a virtualbox issue, although the root cause must be changed behavior in RHEL/Centos/Rocky/Alma (probably) linux.
The stuck screen is not that much of an issue, although CLI commands stop working too, but the virtual machine itself is behaving weird too, in the sense that certain changes are not made on disk, whilst others are. Obviously that lies totally outside of virtualbox, but these are all indicators of changed behavior somewhere.
I would sincerely appreciate help on how to investigate this further.
A colleague reproduced the unexpected behavior on Windows too.
This means that I suspect more people are running or will be running into this issue, significantly limiting the usefulness of virtualbox.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing Centos 8.4 (+rocky 8.4) via packer/kickstart weird behavior

Post by mpack »

Frits Hoogland wrote:However, with specific use of virtualbox, the Window that shows the console gets stuck during installation, and gets truly stuck.
Agreed, however I believe that window is being created and destroyed by a third party manager of some kind, and I believe the bug is in that manager, i.e. it doesn't seem to understand that it has already killed the child process it is trying to communicate with. Nor does it seem to time out the attempt.

If you can demonstrate this problem in a scenario that does not involve third party managers then I'd be more inclined to suspect a VirtualBox bug - but in that case it would be a surprise that other VirtualBox users aren't seeing the same issue.
Post Reply