diff --git a/neonvm/runner/main.go b/neonvm/runner/main.go index 49764d31b..4fea7c511 100644 --- a/neonvm/runner/main.go +++ b/neonvm/runner/main.go @@ -676,11 +676,14 @@ func run(logger *zap.Logger) error { } // create iso9660 disk with runtime options (command, args, envs, mounts) - sysctl := []string{} + sysctl := []string{ + "kernel.core_pattern=core", + "kernel.core_uses_pid=1", + } var shmSize *resource.Quantity var swapInfo *vmv1.SwapInfo if vmSpec.Guest.Settings != nil { - sysctl = vmSpec.Guest.Settings.Sysctl + sysctl = append(sysctl, vmSpec.Guest.Settings.Sysctl...) swapInfo, err = vmSpec.Guest.Settings.GetSwapInfo() if err != nil { return fmt.Errorf("failed to get SwapInfo from VirtualMachine object: %w", err) diff --git a/neonvm/tools/vm-builder/main.go b/neonvm/tools/vm-builder/main.go index f4a8266ff..003cd57db 100644 --- a/neonvm/tools/vm-builder/main.go +++ b/neonvm/tools/vm-builder/main.go @@ -236,6 +236,8 @@ func main() { tmplArgs.ShutdownHook = strings.ReplaceAll(spec.ShutdownHook, "\n", "\n\t") for _, c := range spec.Commands { + // Allow core dumps for all inittab targets + c.Shell = fmt.Sprintf("ulimit -c unlimited; %s", c.Shell) tmplArgs.InittabCommands = append(tmplArgs.InittabCommands, inittabCommand{ SysvInitAction: c.SysvInitAction, CommandUser: c.User,