summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2022-03-08 09:22:38 -0500
committerGraham Christensen <graham@grahamc.com>2022-04-07 15:28:28 -0400
commit0a086bf7bf88d617f0cb126f8119e9e57b77af45 (patch)
treebde7585cf1d0b14c448c03cc1528eb44ff283497
parent1c0b76b5c447ff0879ae5e57fa8af0cb5639bdd8 (diff)
downloadnixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar.gz
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar.bz2
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar.lz
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar.xz
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.tar.zst
nixpkgs-0a086bf7bf88d617f0cb126f8119e9e57b77af45.zip
openstack-config: enable tty1
This appears to be the "default" console for openstack, but my evidence is experience on just one provider.
-rw-r--r--nixos/modules/virtualisation/openstack-config.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/virtualisation/openstack-config.nix b/nixos/modules/virtualisation/openstack-config.nix
index 0b392cca68e..c5c832fb810 100644
--- a/nixos/modules/virtualisation/openstack-config.nix
+++ b/nixos/modules/virtualisation/openstack-config.nix
@@ -13,7 +13,10 @@ in
     ../profiles/qemu-guest.nix
 
     # Note: While we do use the headless profile, we also explicitly
-    # turn on the serial console on ttyS0 below.
+    # turn on the serial console on tty1 below.
+    # Note that I could not find any documentation indicating tty1 was
+    # the correct choice. I picked tty1 because that is what one
+    # particular host was using.
     ../profiles/headless.nix
 
     # The Openstack Metadata service exposes data on an EC2 API also.
@@ -36,13 +39,13 @@ in
     };
 
     boot.growPartition = true;
-    boot.kernelParams = [ "console=ttyS0" ];
+    boot.kernelParams = [ "console=tty1" ];
     boot.loader.grub.device = if (!cfg.efi) then "/dev/vda" else "nodev";
     boot.loader.grub.efiSupport = cfg.efi;
     boot.loader.grub.efiInstallAsRemovable = cfg.efi;
     boot.loader.timeout = 1;
     boot.loader.grub.extraConfig = ''
-      serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
+      serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1
       terminal_output console serial
       terminal_input console serial
     '';
@@ -59,8 +62,8 @@ in
 
     users.users.root.initialPassword = "foobar";
 
-    # Enable the serial console on ttyS0
-    systemd.services."serial-getty@ttyS0".enable = true;
+    # Enable the serial console on tty1
+    systemd.services."serial-getty@tty1".enable = true;
 
     # Force getting the hostname from Openstack metadata.
     networking.hostName = mkDefault "";