mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-04 16:01:24 +00:00
ubuntu-cpc: Vagrant Serial to Null (LP: #1874453)
Original fix proposed by Stanislav German-Evtushenko (giner) CPC Ubuntu cloud images default to enabling a serial console connection via the kernel commandline option `console=ttyS0`. Many clouds support the serial connection, and utilize it for debugging purposes. Virtualbox supports the serial connection as well. In Bionic and earlier images, Vagrant boxes created a serial log file in the directory of the Vagrantfile by default. However this is not standard behaviour for Vagrant images, and so it was removed in Eoan onwards. Starting in Eoan, there were reports of image booting slowdown (1874453 is a single example). After testing, it was determined that the serial connection starting, without a device attached, was the cause of the slow down. However, we did not want to revert to the old functionality of creating a file. Much thanks to <giner> for providing the Ruby syntax for sending to File::NULL. This option will not create a local file, however, the default Vagrantfile configuration is overwritable via a users Vagrantfile. The original syntax for creating a file local to the users Vagrantfile has been included as an example.
This commit is contained in:
parent
b0144d3018
commit
c92e885303
@ -154,10 +154,15 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
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, "${prefix}-console.log") ]
|
||||
# Use dummy file for the console output. LP #1874453
|
||||
vb.customize [ "modifyvm", :id, "--uartmode1", "file", File::NULL ]
|
||||
# Ubuntu cloud images, by default, enable tty=ss0. This enables serial consoles to
|
||||
# connect to the images. With the change related to LP #1777827, removing a serial
|
||||
# file logger, Vagrant image boot times increased and now run greater than 5 minutes
|
||||
# Creating a console log file is not an expected defaul behavior for vagrant boxes. LP #1777827
|
||||
# As a workaround, we create a console connection to File:NULL. LP #1874453
|
||||
# This is overwriteable in user files to write to a local file
|
||||
# Line below is an example of setting file local to the Vagrantfile
|
||||
# vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "${prefix}-console.log") ]
|
||||
vb.customize [ "modifyvm", :id, "--uartmode1", "file", File::NULL ]
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user