# When running update-grub with the Xen hypervisor installed, there are # some additional variables that can be used to pass options to the # hypervisor or the dom0 kernel. # # The configuration in here makes it possible to have different options set # for the linux kernel when booting with or without Xen. echo "Including Xen overrides from /etc/default/grub.d/xen.cfg" >&2 ####################################################################### # Xen Hypervisor Command Line Options # # The first two options are used to generate arguments for the hypervisor. # Commonly used options are: # # dom0_mem= (for arm) # dom0_mem=,max: (for x86) # Sets the amount of memory dom0 uses to a fixed size. All other memory # will be usable for domUs. For x86, this prevents ballooning actions # from happening to take away memory from the dom0 or return it back. For # arm, setting this option is required. E.g. (for x86) dom0_mem=4G,max:4G # # dom0_max_vcpus=- # Limits the amount of physical cpus that dom0 is using, so it will not # try to be scheduled on all available cpus all the time. Xen will try to # provide the maximum value of vcpus, but will also gracefully deal with # a situation of hotplugging physical cpus and reduce the number of vcpus # instead of oversubscribing the system. E.g. dom0_max_vcpus=1-4 # # com[12]=, # Initialize a serial console for the hypervisor. Note that com1 would be # ttyS0 in Linux when running without Xen. E.g. com1=115200,8n1 # # console=[, ...] # Specify which console(s) Xen should use. E.g. console=com1,vga # # xpti=dom0=,domu= (only for x86) # Override default selection of whether to isolate 64-bit PV guest page # tables. If the dom0 is only used for managing domUs, and no untrusted # code is ran inside, xpti for dom0 can be turned off for performance # reasons. E.g. xpti=dom0=false,domu=true # # noreboot=true # Do not automatically reboot after an error. This is useful for catching # debug output. # # ucode=scan (only for x86) # Scan the multiboot images mentioned in grub configuration for an cpio image # that contains cpu microcode. This enables loading microcode that is stored # in the dom0 initrd.img. # # Please also refer to the "Xen Hypervisor Command Line Options" # documentation for the version of Xen you have installed. This # documentation can be found at https://xenbits.xen.org/ # #GRUB_CMDLINE_XEN_DEFAULT="" #GRUB_CMDLINE_XEN="" ####################################################################### # Dom0 Kernel Command Line Options # # The next options are used for creating kernel arguments for the dom0 # kernel. This allows to have different options for the same kernel used # natively or as dom0 kernel. # # For example: # # earlyprintk=xen # Allows to send early printk messages to the Xen hypervisor console # # console=hvc0 # Redirects the Linux console to the hypervisor console. When running # under Xen as dom0, this needs to be specified, because the usual ttyS0 # will not be available. When viewing the serial console, pressing Ctrl-A # three times will switch between the Linux dom0 and the Xen Hypervisor. # #GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT" #GRUB_CMDLINE_LINUX_XEN_REPLACE="$GRUB_CMDLINE_LINUX" # Make booting into Xen the default. Set the following variable to 0 or 1 # explicitly to avoid the message warning from being printed. # #XEN_OVERRIDE_GRUB_DEFAULT= # if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then grub_warn "GRUB_DEFAULT changed to boot into Xen by default!" \ "Edit /etc/default/grub.d/xen.cfg to avoid this warning." XEN_OVERRIDE_GRUB_DEFAULT=1 fi if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then GRUB_DEFAULT=$( \ printf "$(gettext "%s, with Xen hypervisor")" \ "$GRUB_DISTRIBUTOR GNU/Linux") fi