mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-27 14:03:57 +03:00
GUI for additional kernel parameters
This commit is contained in:
commit
a49ef229d5
@ -54,10 +54,11 @@ PAGE_NAME = 1
|
||||
PAGE_TYPE = 2
|
||||
PAGE_FVINST = 3
|
||||
PAGE_PVINST = 4
|
||||
PAGE_DISK = 5
|
||||
PAGE_NETWORK = 6
|
||||
PAGE_CPUMEM = 7
|
||||
PAGE_SUMMARY = 8
|
||||
PAGE_KERNEL = 5
|
||||
PAGE_DISK = 6
|
||||
PAGE_NETWORK = 7
|
||||
PAGE_CPUMEM = 8
|
||||
PAGE_SUMMARY = 9
|
||||
|
||||
KEYBOARD_DIR = "/etc/sysconfig/keyboard"
|
||||
|
||||
@ -369,6 +370,9 @@ class vmmCreate(gobject.GObject):
|
||||
return None
|
||||
else:
|
||||
return self.window.get_widget("storage-file-size").get_value()
|
||||
|
||||
def get_config_kernel_params(self):
|
||||
return self.window.get_widget("kernel-params").get_text()
|
||||
|
||||
def get_config_network(self):
|
||||
if os.getuid() != 0:
|
||||
@ -435,6 +439,9 @@ class vmmCreate(gobject.GObject):
|
||||
elif page_number == PAGE_PVINST:
|
||||
url_widget = self.window.get_widget("pv-media-url")
|
||||
url_widget.grab_focus()
|
||||
elif page_number == PAGE_KERNEL:
|
||||
kernel_params_widget = self.window.get_widget("kernel-params")
|
||||
kernel_params_widget.grab_focus()
|
||||
elif page_number == PAGE_DISK:
|
||||
self.change_storage_type()
|
||||
elif page_number == PAGE_NETWORK:
|
||||
@ -825,6 +832,11 @@ class vmmCreate(gobject.GObject):
|
||||
else:
|
||||
self._guest.extraargs = "ks=%s" % (ks,)
|
||||
|
||||
kernel_params = self.get_config_kernel_params()
|
||||
if kernel_params != "":
|
||||
self._guest.extraargs = "%s %s" % (self._guest.extraargs, kernel_params)
|
||||
self._guest.extraargs = self._guest.extraargs.strip()
|
||||
|
||||
elif page_num == PAGE_DISK:
|
||||
|
||||
disk = self.get_config_disk_image()
|
||||
|
@ -2289,6 +2289,253 @@ mipsel</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox54">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="page5-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label386">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><span weight="heavy" size="xx-large" foreground="#FFF">Additional kernel parameters</span></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_FILL</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="ypad">6</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label387">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Please provide additional kernel parameters or leave blank:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">20</property>
|
||||
<property name="ypad">10</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment148">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">1</property>
|
||||
<property name="yscale">1</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">25</property>
|
||||
<property name="right_padding">15</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table32">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label388">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Kernel parameters:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">pv-media-url</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="kernel-params">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="activates_default">False</property>
|
||||
<accessibility>
|
||||
<atkproperty name="AtkObject::accessible_name" translatable="yes">kernel-params</atkproperty>
|
||||
</accessibility>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment149">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">1</property>
|
||||
<property name="yscale">1</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">312</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox65">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image105">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="icon_name">gtk-info</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label389">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><small><b>Example:</b> updates=http://hostname.example.com/updates.img</small></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">7</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label385">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Kernel</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox34">
|
||||
<property name="border_width">1</property>
|
||||
@ -2297,7 +2544,7 @@ mipsel</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="page5-title">
|
||||
<widget class="GtkEventBox" id="page6-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
@ -3040,7 +3287,7 @@ mipsel</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="page6-title">
|
||||
<widget class="GtkEventBox" id="page7-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
@ -3584,7 +3831,7 @@ mipsel</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="page7-title">
|
||||
<widget class="GtkEventBox" id="page8-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
@ -4248,7 +4495,7 @@ mipsel</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="page8-title">
|
||||
<widget class="GtkEventBox" id="page9-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_window">True</property>
|
||||
<property name="above_child">False</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user