Since I just hit this issue and found this thread amazingly useful, I
thought it might help if I post a theory about what's going on here.

The official ubuntu/bionic64 box was configured, as a default, to log
console output to a file in the Vagrantfile directory. The embedded
Vagrantfile (on my system, currently this is `~/.vagrant.d/boxes/ubuntu-
VAGRANTSLASH-bionic64/20200701.0.0/virtualbox/Vagrantfile`) contains the
following:

  config.vm.provider "virtualbox" do |vb|
     vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
     vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, 
"ubuntu-bionic-18.04-cloudimg-console.log") ]
  end

When an instance of this box boots, the kernel command line contains
`console=ttyS0` so console output is sent to ttyS0 which is virtualbox
serial port 1, connected to the file specified. Everything works fine.

The official ubuntu/eoan64 and ubuntu/focal64 boxes, on the other hand,
have this:

  config.vm.provider "virtualbox" do |vb|
     vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
# Creating a console log file is not an expected behavior for vagrant boxes. LP 
#1777827
#     vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, 
"ubuntu-focal-20.04-cloudimg-console.log") ]
  end

So someone decided not to log console output at some point. Makes sense
- vagrant boxes don't tend to do that by default.

Problem is, when the change was made to the Vagrantfile the kernel
command prompt wasn't also changed to reflect that console -> ttyS0 was
no longer required. In fact, since virtualbox was not even configuring a
serial port on the machine this configuration appears to be massively
detrimental to boot performance (I guess because every line the kernel
tries to send to the kernel errors). This explains, I think, why the
workaround given by @nigam214 works - it creates a dummy serial port so
at least the kernel is happy.

I think these boxes should be configured at build-time not to include
`console=ttyS0` in the kernel command line.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874453

Title:
  ubuntu/focal64 very slow to boot and reboots once

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1874453/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to