Merging unrelated changes to engine.py

This commit is contained in:
Hugh O. Brock 2006-08-10 17:51:30 -04:00
commit 549316489f
4 changed files with 158 additions and 638 deletions

View File

@ -5086,544 +5086,6 @@ TB</property>
</child>
</widget>
<widget class="GtkWindow" id="vmm-create-start">
<property name="visible">True</property>
<property name="title" translatable="yes">Creating a new virtual system</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<child>
<widget class="GtkVBox" id="vbox20">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="label127">
<property name="visible">True</property>
<property name="label" translatable="yes">This assistant will guide you through creating a new virtual system. You will be asked for some information about the virtual system you'd like to create, such as:</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">10</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>
<child>
<widget class="GtkTable" id="table10">
<property name="visible">True</property>
<property name="n_rows">5</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="label128">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span weight=&quot;heavy&quot; size=&quot;xx-large&quot;&gt;·&lt;/span&gt;</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">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">0</property>
<property name="right_attach">1</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_padding">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label129">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span weight=&quot;heavy&quot; size=&quot;xx-large&quot;&gt;·&lt;/span&gt;</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">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">0</property>
<property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_padding">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label130">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span weight=&quot;heavy&quot; size=&quot;xx-large&quot;&gt;·&lt;/span&gt;</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">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">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_padding">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label131">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span weight=&quot;heavy&quot; size=&quot;xx-large&quot;&gt;·&lt;/span&gt;</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">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">0</property>
<property name="right_attach">1</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_padding">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label132">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;span weight=&quot;heavy&quot; size=&quot;xx-large&quot;&gt;·&lt;/span&gt;</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">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">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_padding">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label133">
<property name="visible">True</property>
<property name="label" translatable="yes">A &lt;b&gt;name&lt;/b&gt; for your new virtual system</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">6</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">0</property>
<property name="bottom_attach">1</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label134">
<property name="visible">True</property>
<property name="label" translatable="yes">Whether the system will be &lt;b&gt;fully virtualized&lt;/b&gt; or &lt;b&gt;para-virtualized&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">6</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">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label135">
<property name="visible">True</property>
<property name="label" translatable="yes">The &lt;b&gt;location&lt;/b&gt; of the files necessary for installing an operating system on the virtual system</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">6</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">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label136">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Storage&lt;/b&gt; details - which disk partitions or files the system should use</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">6</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">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label137">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Memory&lt;/b&gt; and &lt;b&gt;CPU&lt;/b&gt; allocation</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">6</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">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="vmm-create-name">
<property name="visible">True</property>
<property name="title" translatable="yes">Naming your virtual system</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<child>
<widget class="GtkVBox" id="vbox21">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="label140">
<property name="visible">True</property>
<property name="label" translatable="yes">Please choose a name for your virtual system:</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="padding">20</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment44">
<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">23</property>
<property name="bottom_padding">0</property>
<property name="left_padding">64</property>
<property name="right_padding">10</property>
<child>
<widget class="GtkTable" id="table11">
<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="GtkEntry" id="create-system-name">
<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>
</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="GtkHBox" id="hbox24">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkImage" id="image77">
<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="label139">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; system1</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">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="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</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>
<child>
<widget class="GtkLabel" id="label138">
<property name="visible">True</property>
<property name="label" translatable="yes">System _Name:</property>
<property name="use_underline">True</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="mnemonic_widget">create-system-name</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_padding">13</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="vmm-create">
<property name="visible">True</property>
<property name="title" translatable="yes">Create a new virtual system</property>
@ -8306,7 +7768,7 @@ TB</property>
<child>
<widget class="GtkTable" id="table28">
<property name="visible">True</property>
<property name="n_rows">11</property>
<property name="n_rows">12</property>
<property name="n_columns">5</property>
<property name="homogeneous">False</property>
<property name="row_spacing">0</property>
@ -8389,43 +7851,15 @@ TB</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label275">
<property name="visible">True</property>
<property name="label" translatable="yes">200 MB</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">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label276">
<widget class="GtkLabel" id="create-host-memory">
<property name="visible">True</property>
<property name="label" translatable="yes">2 GB</property>
<property name="use_underline">False</property>
@ -8445,15 +7879,15 @@ TB</property>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label243">
<widget class="GtkLabel" id="create-cpus-physical">
<property name="visible">True</property>
<property name="label" translatable="yes">256 </property>
<property name="use_underline">False</property>
@ -8473,36 +7907,8 @@ TB</property>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label273">
<property name="visible">True</property>
<property name="label" translatable="yes">Current usage:</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">5</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">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8529,8 +7935,8 @@ TB</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8557,8 +7963,8 @@ TB</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8585,8 +7991,8 @@ TB</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8605,7 +8011,7 @@ TB</property>
<property name="right_padding">33</property>
<child>
<widget class="GtkSpinButton" id="spinbutton5">
<widget class="GtkSpinButton" id="create-vcpus">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
@ -8615,15 +8021,15 @@ TB</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1 1 32 1 10 10</property>
<signal name="changed" handler="on_config_vm_cpus_changed" last_modification_time="Wed, 26 Jul 2006 21:40:26 GMT"/>
<signal name="changed" handler="on_create_vcpus_changed" last_modification_time="Thu, 10 Aug 2006 21:36:21 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8650,8 +8056,8 @@ TB</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -8678,8 +8084,8 @@ TB</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</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>
@ -8764,8 +8170,8 @@ TB</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">5</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">fill</property>
</packing>
@ -8784,16 +8190,16 @@ TB</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHScale" id="hscale2">
<widget class="GtkHScale" id="create-memory-max">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
<property name="value_pos">GTK_POS_TOP</property>
<property name="digits">1</property>
<property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
<property name="digits">0</property>
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
<property name="inverted">False</property>
<property name="adjustment">256 0 1024 0 0 0</property>
<signal name="value_changed" handler="on_config_memory_value_changed" last_modification_time="Wed, 26 Jul 2006 22:00:46 GMT"/>
<property name="adjustment">669.5 0 1024 32 0 0</property>
<signal name="value_changed" handler="on_create_memory_max_value_changed" last_modification_time="Thu, 10 Aug 2006 21:18:45 GMT"/>
</widget>
</child>
</widget>
@ -8807,6 +8213,71 @@ TB</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label303">
<property name="visible">True</property>
<property name="label" translatable="yes">How much memory should this VM start up with?</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">1</property>
<property name="right_attach">5</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment118">
<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">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHScale" id="create-memory-startup">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
<property name="value_pos">GTK_POS_TOP</property>
<property name="digits">0</property>
<property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
<property name="inverted">False</property>
<property name="adjustment">256 0 1024 32 0 0</property>
<signal name="value_changed" handler="on_create_memory_startup_value_changed" last_modification_time="Thu, 10 Aug 2006 21:18:33 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">4</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_padding">30</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -39,9 +39,10 @@ VM_STORAGE_FILE = 2
class vmmCreate(gobject.GObject):
def __init__(self, config):
def __init__(self, config, connection):
self.__gobject_init__()
self.config = config
self.connection = connection
self.window = gtk.glade.XML(config.get_glade_file(), "vmm-create")
self.topwin = self.window.get_widget("vmm-create")
self.topwin.hide()
@ -64,8 +65,10 @@ class vmmCreate(gobject.GObject):
"on_storage_partition_address_browse_clicked" : self.browse_storage_partition_address,
"on_storage_file_address_browse_clicked" : self.browse_storage_file_address,
"on_storage_toggled" : self.set_storage_type,
"on_storage_file_size_changed" : self.set_storage_file_size
"on_storage_file_size_changed" : self.set_storage_file_size,
"on_create_memory_max_value_changed" : self.set_max_memory,
"on_create_memory_startup_value_changed" : self.set_startup_memory,
"on_create_vcpus_changed" : self.set_vcpus,
})
self.set_initial_state()
@ -87,8 +90,9 @@ class vmmCreate(gobject.GObject):
self.storage_method = VM_STORAGE_PARTITION
self.storage_address = None
self.storage_file_size = 0
self.memory = 0
self.vcpus = 0
self.max_memory = 0
self.startup_memory = 0
self.vcpus = 1
def set_initial_state(self):
notebook = self.window.get_widget("create-pages")
@ -144,22 +148,26 @@ class vmmCreate(gobject.GObject):
def page_changed(self, notebook, page, page_number):
# would you like some spaghetti with your salad, sir?
if page_number == 0:
#set up the front page
self.window.get_widget("create-back").set_sensitive(False)
elif page_number == 1:
#set up the system-name page
if self.vm_name != None:
self.window.get_widget("create-vm-name").set_text(self.vm_name)
else:
self.window.get_widget("create-vm-name").set_text("")
elif page_number == 2:
#set up the virt method page
if self.virt_method == VM_PARAVIRT:
self.window.get_widget("virt-method-pv").set_active(True)
else:
self.window.get_widget("virt-method-fv").set_active(True)
elif page_number == 3:
#set up the fv install media page
if self.install_fv_media_type == VM_INSTALL_FROM_ISO:
@ -172,6 +180,7 @@ class vmmCreate(gobject.GObject):
else:
self.window.get_widget("media-physical").set_active(True)
self.window.get_widget("fv-iso-location-box").set_sensitive(False)
elif page_number == 4:
#set up the pv install media page
if self.install_pv_media_type == VM_INSTALL_FROM_URL:
@ -182,6 +191,7 @@ class vmmCreate(gobject.GObject):
self.window.get_widget("media-url-ks").set_active(True)
self.window.get_widget("pv-media-url").set_sensitive(False)
self.window.get_widget("pv-ks-url").set_sensitive(True)
elif page_number == 5:
#set up the storage space page
if self.storage_method == VM_STORAGE_PARTITION:
@ -193,9 +203,32 @@ class vmmCreate(gobject.GObject):
self.window.get_widget("storage-file-backed").set_active(True)
self.window.get_widget("storage-partition-box").set_sensitive(False)
self.window.get_widget("storage-file-box").set_sensitive(True)
elif page_number == 6:
#set up the CPU and Memory page
print "loaded cpu/memory page"
# memory stuff
max_mem = self.connection.host_memory_size()/1024 # in megabytes from henceforth
#avoid absurdity, hopefully
if self.max_memory == 0:
self.max_memory = max_mem / 2
if self.startup_memory > self.max_memory:
self.startup_memory = self.max_memory
max_mem_slider = self.window.get_widget("create-memory-max")
self.window.get_widget("create-host-memory").set_text("%d MB" % max_mem)
max_mem_slider.get_adjustment().upper = max_mem
max_mem_slider.get_adjustment().value = self.max_memory
startup_mem_slider = self.window.get_widget("create-memory-startup")
startup_mem_slider.get_adjustment().upper = self.max_memory
startup_mem_slider.get_adjustment().value = self.startup_memory
#vcpu stuff
max_cpus = self.connection.host_maximum_processor_count()
self.window.get_widget("create-cpus-physical").set_text(`max_cpus`)
cpu_spinbox = self.window.get_widget("create-vcpus").get_adjustment()
cpu_spinbox.upper = max_cpus
cpu_spinbox.value = self.vcpus
elif page_number == 7:
#set up the congrats page
self.window.get_widget("create-forward").hide()
@ -219,7 +252,10 @@ class vmmCreate(gobject.GObject):
"\n Install media address: " + self.install_media_address + \
"\n Install storage type: " + `self.storage_method` + \
"\n Install storage address: " + self.storage_address + \
"\n Install storage file size: " + `self.storage_file_size`
"\n Install storage file size: " + `self.storage_file_size` + \
"\n Install max kernel memory: " + `self.max_memory` + \
"\n Install startup kernel memory: " + `self.startup_memory` + \
"\n Install vcpus: " + `self.vcpus`
self.close()
@ -320,3 +356,16 @@ class vmmCreate(gobject.GObject):
def set_storage_file_size(self, src):
self.storage_file_size = src.get_adjustment().value
def set_max_memory(self, src):
self.max_memory = src.get_adjustment().value
startup_mem_adjustment = self.window.get_widget("create-memory-startup").get_adjustment()
if startup_mem_adjustment.value > self.max_memory:
startup_mem_adjustment.value = self.max_memory
startup_mem_adjustment.upper = self.max_memory
def set_startup_memory(self, src):
self.startup_memory = src.get_adjustment().value
def set_vcpus(self, src):
self.vcpus = src.get_adjustment().value

View File

@ -123,8 +123,8 @@ class vmmEngine:
self.show_manager(uri)
def _do_show_details(self, src, uri, uuid):
self.show_details(uri, uuid)
def _do_show_create(self, src):
self.show_create()
def _do_show_create(self, src, uri):
self.show_create(uri)
def _do_show_console(self, src, uri, uuid):
self.show_console(uri, uuid)
def _do_show_terminal(self, src, uri, uuid):
@ -206,9 +206,9 @@ class vmmEngine:
self.connections[uri]["windowManager"] = manager
self.connections[uri]["windowManager"].show()
def show_create(self):
def show_create(self, uri):
if self.windowCreate == None:
self.windowCreate = vmmCreate(self.get_config())
self.windowCreate = vmmCreate(self.get_config(), self.get_connection(uri))
self.windowCreate.reset_state()
self.windowCreate.show()

View File

@ -46,7 +46,7 @@ class vmmManager(gobject.GObject):
"action-show-preferences": (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, []),
"action-show-create": (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, []),}
gobject.TYPE_NONE, [str]),}
def __init__(self, config, connection):
self.__gobject_init__()
self.window = gtk.glade.XML(config.get_glade_file(), "vmm-manager")
@ -241,7 +241,7 @@ class vmmManager(gobject.GObject):
self.emit("action-show-details", self.connection.get_uri(), self.current_vm())
def show_vm_create(self,ignore):
self.emit("action-show-create")
self.emit("action-show-create", self.connection.get_uri())
def open_vm_console(self,ignore,ignore2=None,ignore3=None):
self.emit("action-show-console", self.connection.get_uri(), self.current_vm())