You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
1.8 KiB

## .kivrc - Set custom defaults for kvm-install-vm
# Custom Images
# Format: "name|description|architecture|image download url|login user"
# Name should match what is in the os-info database
#BUILTIN_VMS+=("almalinux9:AlmaLinux 9 cloud image:x86_64:https://repo.almalinux.org/almalinux/9/cloud/images/AlmaLinux-9-cloud.qcow2|almalinux")
#BUILTIN_VMS+=("almalinux9:AlmaLinux 9 cloud image:aarch64:https://repo.almalinux.org/almalinux/9/cloud/images/AlmaLinux-9-cloud-arm64.qcow2|almalinux")
# Autostart
#AUTOSTART=false
# Number of virtual CPUs
#CPUS=1
# Use host cpu features to the guest
#FEATURE=host
# Amount of RAM in MB
#MEMORY=1024
# Disk Size in GB
#DISK_SIZE=10
# DNS domain
#DNSDOMAIN=example.local
# Graphics type
#GRAPHICS=spice
# Console port
#PORT=-1
# Resize disk (boolean)
#RESIZE_DISK=false
# Directory to store images
#IMAGEDIR=${HOME}/virt/images
# Directory to store vms
#VMDIR=${HOME}/virt/vms
# Hypervisor bridge
#BRIDGE=virbr0
# SSH public key
#PUBKEY=${HOME}/.ssh/id_rsa.pub
# Distribution
#DISTRO=centos7
# MAC Address
#MACADDRESS=
# Timezone
#TIMEZONE=US/Eastern
# User
#ADDITIONAL_USER=${USER}
# Verbosity
#VERBOSE=0
Xen support (#40) * Add command wrapper for verbose mode Add a wrapper function to automatically print command arguments when running in verbose mode. Currently, this is only done for the `virsh pool-create-as` and `virt-install` commands, but more commands could be added in the future. Having the wrapper run the command removes the redundant command arguments and will allow us to more easily support a variable number of virt-install arguments This commit introduces the following shell helper functions: join Join strings into a single string, joined by a delimiter. output_command Print the command arguments for verbose mode, formatted as one argument per line, with line continuation characters as needed. run Command execution wrapper to print the command when running in verbose mode and to redirect output to the current log file. * Support virt-install graphics auto-detection Typically, the `virt-install` user does not need to specify the --graphics option. When the --graphics flag is not specified, virt-install will try and choose a useful default and launch a suitable connection. Support graphics auto-detection by omitting the virt-install --grahics option when the kvm-install-vm '-g' flag is set to 'auto' or the GRAPHICS variable in the ~/.kivrc file is set to 'auto'. * Hypervisor custom parameters Support custom virt-install parameters for advanced usage. This allows for advanced customization and to support Xen and other non-KVM hypervisors. Users may specify hypervisor specific settings in the $HOME/.kivrc customization file, without resorting to patching kvm-install-vm. With this change, none of the virt-install parameters are hardcoded in the script, values may be specified to be empty to avoid setting a given parameter, and additional options may be provided as needed. This commit adds the following custom virt-install options: NETWORK_MODEL --network model value (default: virtio) NETWORK_EXTRA extra --network options DISK_BUS --disk bus type (default: virtio) DISK_EXTRA extra --disk parameters CI_ISO_DEVICE ci cdrom device type (default: cdrom) CI_ISO_EXTRA extra ci cdrom parameters (default: "") GRAPHICS_LISTEN --graphics listen value (default: localhost) GRAPHICS_EXTRA extra graphics parameters VIRT_INSTALL_EXTRA extra virt-install options The following virt-install options are dependent on the image being installed, and so are determined the value of -t command line option. OS_TYPE --os-type (currently always "linux") DISK_FORMAT --disk format (currently always "qcow2")
7 years ago
#
# Advanced virt-install options.
#
# You probably will not need to change any of the following
# unless you are running a non-KVM hypervisor, such as Xen.
#
# The --network model type.
#NETWORK_MODEL=virtio
# Additional --network parameters.
#NETWORK_EXTRA=""
# The --disk bus type. Specify none to auto-detect.
#DISK_BUS=virtio
# Additional --disk parameters.
#DISK_EXTRA=""
# The CI ISO --disk device type.
#CI_ISO_DEVICE=cdrom
# Additional CI ISO --disk parameters.
#CI_ISO_EXTRA=""
# The --graphics listen parameter.
#GRAPHICS_LISTEN=localhost
# Additional --graphics parameters.
#GRAPHICS_EXTRA=""
# Additional virt-install options.
#VIRT_INSTALL_EXTRA=""