2020-04-07 14:14:01 +02:00
|
|
|
From f8ccfae9908d6a1001d68a1b8e5e8cee495b5aef Mon Sep 17 00:00:00 2001
|
2020-01-15 15:58:58 +01:00
|
|
|
From: Larry Dewey <ldewey@suse.com>
|
|
|
|
Date: Tue, 7 Jan 2020 02:48:11 -0700
|
|
|
|
Subject: [PATCH] virt: adding kernel boot parameters to libvirt xml
|
|
|
|
#55245 (#197)
|
|
|
|
|
|
|
|
* virt: adding kernel boot parameters to libvirt xml
|
|
|
|
|
|
|
|
SUSE's autoyast and Red Hat's kickstart take advantage of kernel paths,
|
|
|
|
initrd paths, and kernel boot command line parameters. These changes
|
|
|
|
provide the option of using these, and will allow salt and
|
|
|
|
autoyast/kickstart to work together.
|
|
|
|
|
|
|
|
Signed-off-by: Larry Dewey <ldewey@suse.com>
|
|
|
|
|
|
|
|
* virt: Download linux and initrd
|
|
|
|
|
|
|
|
Signed-off-by: Larry Dewey <ldewey@suse.com>
|
|
|
|
---
|
2020-04-07 14:14:01 +02:00
|
|
|
salt/states/virt.py | 17 +++++++++++++++++
|
|
|
|
1 file changed, 17 insertions(+)
|
2020-01-15 15:58:58 +01:00
|
|
|
|
|
|
|
diff --git a/salt/states/virt.py b/salt/states/virt.py
|
2020-04-07 14:14:01 +02:00
|
|
|
index 500509fcc0..55a9ad2616 100644
|
2020-01-15 15:58:58 +01:00
|
|
|
--- a/salt/states/virt.py
|
|
|
|
+++ b/salt/states/virt.py
|
2020-04-07 14:14:01 +02:00
|
|
|
@@ -367,6 +367,23 @@ def running(name,
|
2020-01-15 15:58:58 +01:00
|
|
|
|
2020-04-07 14:14:01 +02:00
|
|
|
.. versionadded:: 3000
|
2020-01-15 15:58:58 +01:00
|
|
|
|
|
|
|
+ :param boot:
|
|
|
|
+ Specifies kernel for the virtual machine, as well as boot parameters
|
|
|
|
+ for the virtual machine. This is an optionl parameter, and all of the
|
|
|
|
+ keys are optional within the dictionary. If a remote path is provided
|
|
|
|
+ to kernel or initrd, salt will handle the downloading of the specified
|
|
|
|
+ remote fild, and will modify the XML accordingly.
|
|
|
|
+
|
|
|
|
+ .. code-block:: python
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ 'kernel': '/root/f8-i386-vmlinuz',
|
|
|
|
+ 'initrd': '/root/f8-i386-initrd',
|
|
|
|
+ 'cmdline': 'console=ttyS0 ks=http://example.com/f8-i386/os/'
|
|
|
|
+ }
|
|
|
|
+
|
2020-04-07 14:14:01 +02:00
|
|
|
+ .. versionadded:: 3000
|
2020-01-15 15:58:58 +01:00
|
|
|
+
|
|
|
|
.. rubric:: Example States
|
|
|
|
|
|
|
|
Make sure an already-defined virtual machine called ``domain_name`` is running:
|
|
|
|
--
|
2020-04-07 14:14:01 +02:00
|
|
|
2.16.4
|
2020-01-15 15:58:58 +01:00
|
|
|
|
|
|
|
|