mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 10:06:17 +01:00
Added configuration options for kernel and initrd selection during KVM build
Some distributions have no initrd images compatible with KVM builds and sometimes we need to use not system kernel version. New options in configuration file: - build-kernel -- kernel used for VM builds - build-initrd -- initrd image used for VM builds
This commit is contained in:
parent
f47c39521d
commit
d17b497867
@ -991,6 +991,11 @@ def main(apiurl, opts, argv):
|
||||
if os.access(build_root, os.W_OK) and os.access('/dev/kvm', os.W_OK):
|
||||
# so let's hope there's also an fstab entry
|
||||
need_root = False
|
||||
if config['build-kernel']:
|
||||
vm_options += [ '--vm-kernel=' + config['build-kernel'] ]
|
||||
if config['build-initrd']:
|
||||
vm_options += [ '--vm-initrd=' + config['build-initrd'] ]
|
||||
|
||||
build_root += '/.mount'
|
||||
|
||||
if config['build-memory']:
|
||||
|
@ -112,6 +112,8 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org',
|
||||
'build-vmdisk-rootsize': '', # optional for VM builds
|
||||
'build-vmdisk-swapsize': '', # optional for VM builds
|
||||
'build-vmdisk-filesystem': '', # optional for VM builds
|
||||
'build-kernel': '', # optional for VM builds
|
||||
'build-initrd': '', # optional for VM builds
|
||||
|
||||
'build-jobs': _get_processors(),
|
||||
'builtin_signature_check': '1', # by default use builtin check for verify pkgs
|
||||
@ -227,6 +229,12 @@ apiurl = %(apiurl)s
|
||||
# e.g. /var/tmp/FILE.swap
|
||||
#build-swap = /var/tmp/FILE.swap
|
||||
|
||||
# build-kernel is the boot kernel used for VM builds
|
||||
#build-kernel = /boot/vmlinuz
|
||||
|
||||
# build-initrd is the boot initrd used for VM builds
|
||||
#build-initrd = /boot/initrd
|
||||
|
||||
# build-memory is the amount of memory used in the VM
|
||||
# value in MB - e.g. 512
|
||||
#build-memory = 512
|
||||
|
Loading…
Reference in New Issue
Block a user