virtcontainers: firecracker: disable ACPI

Disable ACPI to fix ACPI BIOS error in the guest kernel

fixes #1454

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2019-04-01 14:23:49 -06:00
parent c89eb81dec
commit c0aedeb7ee

View File

@ -55,10 +55,17 @@ const (
// We attach a pool of placeholder drives before the guest has started, and then // We attach a pool of placeholder drives before the guest has started, and then
// patch the replace placeholder drives with drives with actual contents. // patch the replace placeholder drives with drives with actual contents.
fcDiskPoolSize = 8 fcDiskPoolSize = 8
// The boot source is the first partition of the first block device added
rootDevice = "root=/dev/vda1"
) )
var fcKernelParams = []Param{
// The boot source is the first partition of the first block device added
{"root", "/dev/vda1"},
// Firecracker doesn't support ACPI
// Fix kernel error "ACPI BIOS Error (bug)"
{"acpi", "off"},
}
func (s vmmState) String() string { func (s vmmState) String() string {
switch s { switch s {
case notReady: case notReady:
@ -269,11 +276,10 @@ func (fc *firecracker) fcSetBootSource(path, params string) error {
fc.Logger().WithFields(logrus.Fields{"kernel-path": path, fc.Logger().WithFields(logrus.Fields{"kernel-path": path,
"kernel-params": params}).Debug("fcSetBootSource") "kernel-params": params}).Debug("fcSetBootSource")
bootParams := params + " " + rootDevice
bootSrcParams := ops.NewPutGuestBootSourceParams() bootSrcParams := ops.NewPutGuestBootSourceParams()
src := &models.BootSource{ src := &models.BootSource{
KernelImagePath: &path, KernelImagePath: &path,
BootArgs: bootParams, BootArgs: params,
} }
bootSrcParams.SetBody(src) bootSrcParams.SetBody(src)
@ -353,7 +359,8 @@ func (fc *firecracker) startSandbox(timeout int) error {
return err return err
} }
strParams := SerializeParams(fc.config.KernelParams, "=") kernelParams := append(fc.config.KernelParams, fcKernelParams...)
strParams := SerializeParams(kernelParams, "=")
formattedParams := strings.Join(strParams, " ") formattedParams := strings.Join(strParams, " ")
fc.fcSetBootSource(kernelPath, formattedParams) fc.fcSetBootSource(kernelPath, formattedParams)