Allow for passing arbitrary kernel args to paravirt guests.

This commit is contained in:
Hugh O. Brock 2007-08-01 18:02:03 -04:00
parent ff26a8a288
commit 3ec8039e07
2 changed files with 92 additions and 26 deletions

View File

@ -457,6 +457,13 @@ class vmmCreate(gobject.GObject):
self.window.get_widget("summary-os").show()
self.window.get_widget("summary-install-source").set_text(self.get_config_install_source())
self.window.get_widget("summary-kickstart-source").set_text(self.get_config_kickstart_source())
if self._guest.extraargs is None:
self.window.get_widget("summary-kernel-args-label").hide()
self.window.get_widget("summary-kernel-args").hide()
else:
self.window.get_widget("summary-kernel-args-label").show()
self.window.get_widget("summary-kernel-args").show()
self.window.get_widget("summary-kernel-args").set_text(self._guest.extraargs)
self.window.get_widget("summary-disk-image").set_text(self.get_config_disk_image())
disksize = self.get_config_disk_size()
if disksize != None:
@ -830,7 +837,10 @@ class vmmCreate(gobject.GObject):
kernel_params = self.get_config_kernel_params()
if kernel_params != "":
self._guest.extraargs = "%s %s" % (self._guest.extraargs, kernel_params)
if self._guest.extraargs is None:
self._guest.extraargs = kernel_params
else:
self._guest.extraargs = "%s %s" % (self._guest.extraargs, kernel_params)
self._guest.extraargs = self._guest.extraargs.strip()
elif page_num == PAGE_DISK:

View File

@ -4408,7 +4408,7 @@ mipsel</property>
<widget class="GtkTable" id="table29">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">17</property>
<property name="n_rows">18</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
<property name="row_spacing">3</property>
@ -4544,8 +4544,8 @@ mipsel</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="y_options"></property>
</packing>
</child>
@ -4627,8 +4627,8 @@ mipsel</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -4795,8 +4795,8 @@ mipsel</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -4823,8 +4823,8 @@ mipsel</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -4851,8 +4851,8 @@ mipsel</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -4879,8 +4879,8 @@ mipsel</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5019,8 +5019,8 @@ mipsel</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5047,8 +5047,8 @@ mipsel</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5075,8 +5075,8 @@ mipsel</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5103,8 +5103,8 @@ mipsel</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5243,8 +5243,8 @@ mipsel</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="top_attach">17</property>
<property name="bottom_attach">18</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -5271,8 +5271,64 @@ mipsel</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="top_attach">17</property>
<property name="bottom_attach">18</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="summary-kernel-args-label">
<property name="visible">True</property>
<property name="label" translatable="yes">Kernel arguments:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">1</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="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="summary-kernel-args">
<property name="visible">True</property>
<property name="label" translatable="yes">ip=192.168.1.1</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</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="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>