Page 1 of 1

Can't access guest's console (#17350)

Posted: 17. Nov 2017, 19:00
by foreveryoung

[ModEdit; related ticket: #17350: use of serial port crashes VM w/ non-mainstream OS]
When I start my guest OS in VirtualBox, it shows the grub menu and then attempted to boot my OS. However, the console of the OS never showed up. The VM status does show as running in VirtualBox. I then tried enabling a serial port with TCP mode, the system would go in Guru Meditation state soon after the grub menu but before any output from my guest OS.

The same guest OS works fine in KVM or ESXi.

Any idea what could I have missed?

Thanks!

Re: Can't access guest's console

Posted: 18. Nov 2017, 10:46
by mpack
That's a guest OS problem. I say probably you cloned the VM and the UUID change broke the grub script.

Re: Can't access guest's console

Posted: 20. Nov 2017, 18:28
by foreveryoung
It's not a cloned VM. I created it from scratch. So I don't think it has anything to do with UUID. Besides, if I don't config serial port, the VM appears to be running OK although I have no access to its console. It went into Guru Meditation state only if I config a serial in an attempt to access the console.

If it's guest OS' problem, how to troubleshoot it? The same vmdk works perfectly on KVM and ESXi. But once loaded on VirtualBox there is no output I can get from the guest OS.

Re: Can't access guest's console

Posted: 30. Nov 2017, 17:55
by rschmied
The issue here is that the guest OS (which is a network device OS) has its console on the first serial port / ttyS0. The OS boots fine as long as the console UART is 'disconnected'

e.g. like here, port present but disconnected for UART 2:
UART 1: I/O base: 0x03f8, IRQ: 4, attached to pipe (server) '/tmp/foo'
UART 2: I/O base: 0x02f8, IRQ: 3, disconnected

if it's connected (like shown for UART 1) then the system goes straight into a Guru Meditation:

Code: Select all

00:00:01.191002 ******************** End of CPUID dump **********************
00:00:01.195441 VMEmt: Halt method global1 (5)
00:00:01.195475 VMEmt: HaltedGlobal1 config: cNsSpinBlockThresholdCfg=2000
00:00:01.195478 Changing the VM state from 'CREATING' to 'CREATED'
00:00:01.197891 Changing the VM state from 'CREATED' to 'POWERING_ON'
00:00:01.198241 Changing the VM state from 'POWERING_ON' to 'RUNNING'
00:00:01.198257 Console: Machine state changed to 'Running'
00:00:01.201923 VMMDev: Guest Log: BIOS: VirtualBox 5.1.30
00:00:01.204038 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:01.216352 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:01.216422 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:01.216888 VMMDev: Guest Log: BIOS: ata0-0: PCHS=4161/16/63 LCHS=520/128/63
00:00:01.217433 PIIX3 ATA: Ctl#0: RESET, DevSel=1 AIOIf=0 CmdIf0=0xec (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:01.217819 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:01.226370 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:01.228315 Display::handleDisplayResize: uScreenId=0 pvVRAM=000000011c6b0000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0
00:00:01.228405 GUI: UIFrameBufferPrivate::NotifyChange: Screen=0, Origin=0x0, Size=640x480, Sending to async-handler
00:00:01.228475 GUI: UIMachineView::sltHandleNotifyChange: Screen=0, Size=640x480
00:00:01.228481 GUI: UIFrameBufferPrivate::handleNotifyChange: Size=640x480
00:00:01.228484 GUI: UIFrameBufferPrivate::performResize: Size=640x480, Directly using source bitmap content
00:00:01.304699 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
00:00:01.305233 VMMDev: SetVideoModeHint: Got a video mode hint (800x600x32)@(0x0),(1;0) at 0
00:00:01.310704 GUI: 2D video acceleration is disabled
00:00:01.310730 GUI: HID LEDs sync is enabled
00:00:01.315852 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
00:00:03.703690 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:03.703904 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0002
00:00:03.706036 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:03.706291 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0xc4 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:03.706324 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:03.718515 Display::handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0
00:00:03.718566 GUI: UIFrameBufferPrivate::NotifyChange: Screen=0, Origin=0x0, Size=720x400, Sending to async-handler
00:00:03.718624 GUI: UIMachineView::sltHandleNotifyChange: Screen=0, Size=720x400
00:00:03.718629 GUI: UIFrameBufferPrivate::handleNotifyChange: Size=720x400
00:00:03.718637 GUI: UIFrameBufferPrivate::performResize: Size=720x400, Directly using source bitmap content
00:00:07.679782 Changing the VM state from 'RUNNING' to 'GURU_MEDITATION'
00:00:07.679828 Console: Machine state changed to 'GuruMeditation'
00:00:07.680238 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00:00:07.680239 !!
00:00:07.680240 !!         VCPU0: Guru Meditation 1155 (VINF_EM_TRIPLE_FAULT)
00:00:07.680267 !!
00:00:07.680288 !! Skipping ring-0 registers and stack, rcErr=VINF_EM_TRIPLE_FAULT
00:00:07.680294 !!

It seems to be something weird that is done in the serial line initialization... but then again this works without a hitch on both KVM and ESXi / Fusion / ... Just not on VB (tested with both, 5.2.2 and 5.1.30)

Re: Can't access guest's console

Posted: 4. Dec 2017, 11:06
by rschmied
bump. is there anything that we can do to debug this further? provide the logs? run with special start up parms or a special VM config...?

Re: Can't access guest's console

Posted: 4. Dec 2017, 11:17
by Martin
Is there already a serial pipe 'server' listening on '/tmp/foo' when you try to start the guest?

Re: Can't access guest's console

Posted: 4. Dec 2017, 11:17
by socratis
For Guru Meditation errors, you should head to the bug tracker and either search for an appropriate bug, or open a new bug report where you'll attach your logs and other vital information.

Re: Can't access guest's console

Posted: 4. Dec 2017, 12:52
by rschmied
Martin wrote:Is there already a serial pipe 'server' listening on '/tmp/foo' when you try to start the guest?
no. The crash is also independent of the serial connection type. Anything other than 'disconnected' causes the crash. When trying this very often then it works occasionally. E.g. 1 out of 10 or 20. As stated, never a problem with other hypervisors.

Re: Can't access guest's console

Posted: 4. Dec 2017, 12:53
by rschmied
socratis wrote:For Guru Meditation errors, you should head to the bug tracker and either search for an appropriate bug, or open a new bug report where you'll attach your logs and other vital information.
thanks. Will do.

Re: Can't access guest's console

Posted: 6. Dec 2017, 14:18
by rschmied

Re: Can't access guest's console (#17350)

Posted: 7. Dec 2017, 04:48
by socratis
Thank you for that. I added the ticket related information in the first post and the title of the thread to make it easier to reference.