-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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")
- Loading branch information
1 parent
693e8b9
commit d053064
Showing
2 changed files
with
171 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters