Marc-André Lureau | 17 May 2013 17:01
Picon
Gravatar

[PATCH virt-viewer] Use a more descriptive FileDescription

This field is used to invite the user to close running instances, when
updating the installation with an MSI. "A remote desktop client" isn't
specific enough, use a VirtViewer specific description.
---
 src/virt-viewer.rc.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/virt-viewer.rc.in b/src/virt-viewer.rc.in
index 196e631..2f52c34 100644
--- a/src/virt-viewer.rc.in
+++ b/src/virt-viewer.rc.in
 <at>  <at>  -8,10 +8,10  <at>  <at>  BEGIN
     BLOCK "040904E4"
     BEGIN
       VALUE "CompanyName", "virt-manager.org"
-      VALUE "FileDescription", "A remote desktop client"
+      VALUE "FileDescription", "VirtViewer desktop client"
       VALUE "FileVersion", " <at> VERSION <at> "
       VALUE "InternalName", " <at> PACKAGE_STRING <at> "
-      VALUE "LegalCopyright", "Copyright (C) 2007-2012 Red Hat, Inc."
+      VALUE "LegalCopyright", "Copyright (C) 2007-2013 Red Hat, Inc."
       VALUE "OriginalFilename", "virt-viewer.exe"
       VALUE "ProductName", "VirtViewer"
       VALUE "ProductVersion", " <at> VERSION <at> "
--

-- 
1.8.3.rc1.49.g8d97506

Marc-André Lureau | 17 May 2013 14:28
Picon
Gravatar

[PATCH virt-viewer 1/3] Move connect dialog to remote-viewer.c

---
 src/remote-viewer-main.c |  95 +-------------------------------------
 src/remote-viewer.c      | 118 ++++++++++++++++++++++++++++++++++++++++++++++-
 src/virt-viewer-app.c    |   4 +-
 3 files changed, 120 insertions(+), 97 deletions(-)

diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index de1544f..ee0025e 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
 <at>  <at>  -70,94 +70,6  <at>  <at>  option_fullscreen(G_GNUC_UNUSED const gchar *option_name,
     return FALSE;
 }

-static void recent_selection_changed_dialog_cb(GtkRecentChooser *chooser, gpointer data)
-{
-    GtkRecentInfo *info;
-    GtkWidget *entry = data;
-    const gchar *uri;
-
-    info = gtk_recent_chooser_get_current_item(chooser);
-    if (info == NULL)
-        return;
-
-    uri = gtk_recent_info_get_uri(info);
-    g_return_if_fail(uri != NULL);
-
-    gtk_entry_set_text(GTK_ENTRY(entry), uri);
-
-    gtk_recent_info_unref(info);
(Continue reading)

Marc-André Lureau | 16 May 2013 21:33
Picon
Gravatar

[PATCH virt-viewer 1/6] window: leave fullscreen on current window

Since fdaa9b0ca, virt-viewer allows to fullscreen a single window. It
feels more symetric to leave a single window from fullscreen as well,
unless the application was started in fullscreen.
---
 src/virt-viewer-window.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 814726f..22aec0e 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
 <at>  <at>  -718,7 +718,12  <at>  <at>  static void
 virt_viewer_window_toolbar_leave_fullscreen(GtkWidget *button G_GNUC_UNUSED,
                                             VirtViewerWindow *self)
 {
-    g_object_set(self->priv->app, "fullscreen", FALSE, NULL);
+    /* leave all windows fullscreen state */
+    if (virt_viewer_app_get_fullscreen(self->priv->app))
+        g_object_set(self->priv->app, "fullscreen", FALSE, NULL);
+    /* or just this window */
+    else
+        virt_viewer_window_leave_fullscreen(self);
 }

 static void keycombo_menu_location(GtkMenu *menu G_GNUC_UNUSED, gint *x, gint *y,
--

-- 
1.8.3.rc1.49.g8d97506

Skardal, Harald | 16 May 2013 20:21
Picon

Virtual Machine Manager "stuck"

Occasionally VMM ends up in this state:

 

I want to create a new VM by right-clicking on the connection and selecting “New”.

 

On the next screen is the field where I enter the VM name, but below it is an error triangle and the message: Error: list.remove(x): x not in list.

I.e. no options for install.

 

How can I reset the libvirt/qemu infrastructure without having to reboot the two systems: where VMM is running and where I want to create the VM?

 

I.e. to a point where I can create new VMs from existing disk images.

 

 

VMM: 0.9.0,

Libvirt*: 1.0.1-2.e16

 

    Harald

<div><div class="WordSection1">
<p class="MsoNormal">Occasionally VMM ends up in this state:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I want to create a new VM by right-clicking on the connection and selecting &ldquo;New&rdquo;.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">On the next screen is the field where I enter the VM name, but below it is an error triangle and the message: Error: list.remove(x): x not in list.<p></p></p>
<p class="MsoNormal">I.e. no options for install.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">How can I reset the libvirt/qemu infrastructure without having to reboot the two systems: where VMM is running and where I want to create the VM?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I.e. to a point where I can create new VMs from existing disk images.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">VMM: 0.9.0,<p></p></p>
<p class="MsoNormal">Libvirt*: 1.0.1-2.e16<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; Harald<p></p></p>
</div></div>
Gene Czarcinski | 14 May 2013 18:15

[PATCH] static route support

The syntax for static route support is defined by the
new <route> subelement which has the form:
  <route family='xx' address='xx' prefix='n' gateway='gg' metric='m'/>
This patch builds on the previous patches for adding IPv6 support and
extending the virtual network support.

The static route support code has been recently added to libvirt and will
be included in libvirt 1.0.6.
.
Signed-off-by: Gene Czarcinski <gene-wpZY/wdDgJleoWH0uzbU5w <at> public.gmane.org>
---
 ui/vmm-create-net.ui     | 991 +++++++++++++++++++++++++++++++++++------------
 ui/vmm-host.ui           |   4 +-
 virtManager/createnet.py | 601 +++++++++++++++++++++++-----
 virtManager/host.py      |   8 +-
 virtManager/network.py   | 106 +++--
 5 files changed, 1315 insertions(+), 395 deletions(-)

diff --git a/ui/vmm-create-net.ui b/ui/vmm-create-net.ui
index ef9fcaa..8d07c6c 100644
--- a/ui/vmm-create-net.ui
+++ b/ui/vmm-create-net.ui
 <at>  <at>  -89,7 +89,7  <at>  <at> 
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="ypad">6</property>
-                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; A &lt;b&gt;name&lt;/b&gt; for the new virtual network</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; A &lt;b&gt;name&lt;/b&gt; for the new virtual network interface</property>
                                 <property name="use_markup">True</property>
                               </object>
                               <packing>
 <at>  <at>  -105,7 +105,7  <at>  <at> 
                                 <property name="xalign">0</property>
                                 <property name="yalign">0.47999998927116394</property>
                                 <property name="ypad">6</property>
-                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; An &lt;b&gt;IPv4&lt;/b&gt; and/or &lt;b&gt;IPv6&lt;/b&gt; network address and prefix (netmask) to assign</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; An &lt;b&gt;IPv4&lt;/b&gt; and/or &lt;b&gt;IPv6&lt;/b&gt; network address and prefix (netmask) to assign to this network interface</property>
                                 <property name="use_markup">True</property>
                                 <property name="wrap">True</property>
                               </object>
 <at>  <at>  -121,7 +121,7  <at>  <at> 
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="ypad">6</property>
-                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; The network address range which the &lt;b&gt;DHCPv4&lt;/b&gt; and/or &lt;b&gt;DHCPv6&lt;/b&gt; server will assign addresses to virtual machines</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; The network address range which the &lt;b&gt;DHCPv4&lt;/b&gt; and/or &lt;b&gt;DHCPv6&lt;/b&gt; server will use to assign addresses to virtual machines</property>
                                 <property name="use_markup">True</property>
                                 <property name="wrap">True</property>
                               </object>
 <at>  <at>  -152,7 +152,7  <at>  <at> 
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="ypad">6</property>
-                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; Optionally to specify an &lt;b&gt;IPv4&lt;/b&gt; and/or &lt;b&gt;IPv6&lt;/b&gt; network address.  If neither is specified, this will be a valid definition for an isolated network with &lt;b&gt;no&lt;/b&gt; DHCP or DNS support.</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; Optionally, to not specify any &lt;b&gt;IPv4&lt;/b&gt; or &lt;b&gt;IPv6&lt;/b&gt; network address.  If neither is specified, this will be a valid definition for an isolated network with &lt;b&gt;no&lt;/b&gt; DHCP or DNS support.</property>
                                 <property name="use_markup">True</property>
                                 <property name="wrap">True</property>
                               </object>
 <at>  <at>  -162,6 +162,38  <at>  <at> 
                                 <property name="position">4</property>
                               </packing>
                             </child>
+                            <child>
+                              <object class="GtkLabel" id="label10">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="ypad">6</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; By default, the &lt;b&gt;Domain&lt;/b&gt; name will be the same as the network/interface name.</property>
+                                <property name="use_markup">True</property>
+                                <property name="wrap">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">5</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label22">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="ypad">6</property>
+                                <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt; Optionally, a &lt;b&gt;static route&lt;/b&gt; to a different network can be specified.  This network traffic is routed to the specified &lt;b&gt;gateway&lt;/b&gt; on the primary network.</property>
+                                <property name="use_markup">True</property>
+                                <property name="wrap">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">6</property>
+                              </packing>
+                            </child>
                           </object>
                         </child>
                       </object>
 <at>  <at>  -384,6 +416,130  <at>  <at> 
                         <property name="position">3</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkVBox" id="vbox11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkLabel" id="label31">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="ypad">6</property>
+                            <property name="label" translatable="yes">The following information may help you with defining your networks.</property>
+                            <property name="use_markup">True</property>
+                            <property name="wrap">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment27">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">25</property>
+                            <child>
+                              <object class="GtkVBox" id="vbox12">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" id="label32">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="ypad">6</property>
+                                    <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt;  A&lt;b&gt; network&lt;/b&gt; must be specified as the network &lt;b&gt;address&lt;/b&gt; and the &lt;b&gt;prefix&lt;/b&gt; for that network.</property>
+                                    <property name="use_markup">True</property>
+                                    <property name="wrap">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label33">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="ypad">6</property>
+                                    <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt;  A network mask cannot be used for the network specification.  Instead, the prefix must be used.</property>
+                                    <property name="use_markup">True</property>
+                                    <property name="wrap">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label34">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt;  A &lt;b&gt;host address&lt;/b&gt; such as that used for the dhcp start, dhcp end, and the static route gateway address should not include a prefix.  If included, this prefix must be the maximum.  That is, for IPv4 prefix=32 and for IPv6 prefix=128.</property>
+                                    <property name="use_markup">True</property>
+                                    <property name="wrap">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label35">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="ypad">6</property>
+                                    <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt;  If IPv6 is to be routed, some form of routing must be specified for the interface.</property>
+                                    <property name="use_markup">True</property>
+                                    <property name="wrap">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label36">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="ypad">6</property>
+                                    <property name="label" translatable="yes">&lt;small&gt;●&lt;/small&gt;  For the &lt;b&gt;primary network&lt;/b&gt;, the prefix must be &lt;b&gt;64&lt;/b&gt;.  However, for the &lt;b&gt;static route network&lt;/b&gt;, the prefix can be &lt;b&gt;64 or less&lt;/b&gt;.</property>
+                                    <property name="use_markup">True</property>
+                                    <property name="wrap">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">4</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
 <at>  <at>  -793,7 +949,7  <at>  <at> 
                           <object class="GtkTable" id="table5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="n_rows">3</property>
+                            <property name="n_rows">6</property>
                             <property name="n_columns">5</property>
                             <property name="column_spacing">4</property>
                             <property name="row_spacing">3</property>
 <at>  <at>  -893,6 +1049,104  <at>  <at> 
                                 <property name="y_options"/>
                               </packing>
                             </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment25">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="left_padding">27</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="net-routev4-enable">
+                                    <property name="label" translatable="yes">Enable Static Route Definition</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="on_net-routev4-enable_toggled" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label14">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">1</property>
+                                <property name="xpad">15</property>
+                                <property name="label" translatable="yes">&lt;b&gt;to&lt;/b&gt; Network:</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label20">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">1</property>
+                                <property name="xpad">15</property>
+                                <property name="label" translatable="yes">&lt;b&gt;via&lt;/b&gt; Gateway:</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="net-routev4-network">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="max_length">20</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_net-routev4-network_changed" swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="net-routev4-gateway">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="max_length">15</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_net-routev4-gateway_changed" swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
                           </object>
                           <packing>
                             <property name="expand">True</property>
 <at>  <at>  -1317,7 +1571,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           <object class="GtkTable" id="table6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="n_rows">3</property>
+                            <property name="n_rows">6</property>
                             <property name="n_columns">5</property>
                             <property name="column_spacing">4</property>
                             <property name="row_spacing">3</property>
 <at>  <at>  -1355,7 +1609,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                               <object class="GtkEntry" id="net-dhcpv6-start">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="max_length">45</property>
+                                <property name="max_length">40</property>
                                 <property name="invisible_char">●</property>
                                 <property name="invisible_char_set">True</property>
                                 <property name="primary_icon_activatable">False</property>
 <at>  <at>  -1377,7 +1631,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                               <object class="GtkEntry" id="net-dhcpv6-end">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="max_length">45</property>
+                                <property name="max_length">40</property>
                                 <property name="invisible_char">●</property>
                                 <property name="invisible_char_set">True</property>
                                 <property name="primary_icon_activatable">False</property>
 <at>  <at>  -1417,53 +1671,151  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                                 <property name="y_options"/>
                               </packing>
                             </child>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">IPv6</property>
-              </object>
-              <packing>
-                <property name="position">3</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="vbox32">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="border_width">1</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment69">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment26">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="left_padding">27</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="net-routev6-enable">
+                                    <property name="label" translatable="yes">Enable Static Route Definition</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="on_net-routev6-enable_toggled" swapped="no"/>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label24">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">1</property>
+                                <property name="xpad">15</property>
+                                <property name="label" translatable="yes">&lt;b&gt;to&lt;/b&gt; Network:</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label30">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">1</property>
+                                <property name="xpad">15</property>
+                                <property name="label" translatable="yes">&lt;b&gt;via&lt;/b&gt; Gateway:</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="net-routev6-network">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="max_length">45</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_net-routev6-network_changed" swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="net-routev6-gateway">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="max_length">40</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <signal name="changed" handler="on_net-routev6-gateway_changed" swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">5</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">IPv6</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox32">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">1</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment69">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
                       <object class="GtkEventBox" id="page4-title">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
 <at>  <at>  -1994,11 +2346,26  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="border_width">6</property>
-                        <property name="n_rows">14</property>
+                        <property name="n_rows">18</property>
                         <property name="n_columns">3</property>
                         <property name="column_spacing">3</property>
                         <property name="row_spacing">3</property>
                         <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
                           <object class="GtkLabel" id="label379">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
 <at>  <at>  -2018,7 +2385,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="ypad">5</property>
-                            <property name="label" translatable="yes">&lt;b&gt;IPv4 network&lt;/b&gt;</property>
+                            <property name="label" translatable="yes">&lt;b&gt;IPv4 Network&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
 <at>  <at>  -2050,7 +2417,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Domain Name:</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Domain&lt;/b&gt; Name:</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
 <at>  <at>  -2067,6 +2434,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
+                            <property name="xpad">2</property>
                             <property name="label">192.168.10.254</property>
                             <property name="ellipsize">middle</property>
                           </object>
 <at>  <at>  -2084,6 +2452,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
+                            <property name="xpad">2</property>
                             <property name="label">192.168.10.1</property>
                             <property name="ellipsize">middle</property>
                           </object>
 <at>  <at>  -2101,6 +2470,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
+                            <property name="xpad">2</property>
                             <property name="label">192.168.10.0/24</property>
                           </object>
                           <packing>
 <at>  <at>  -2117,6 +2487,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
+                            <property name="xpad">2</property>
                             <property name="label">demonet</property>
                           </object>
                           <packing>
 <at>  <at>  -2133,6 +2504,7  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
+                            <property name="xpad">2</property>
                             <property name="label" translatable="yes">192.168.10.128</property>
                             <property name="use_underline">True</property>
                           </object>
 <at>  <at>  -2146,183 +2518,216  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label21">
+                          <object class="GtkLabel" id="label-ip4-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="ypad">5</property>
-                            <property name="label" translatable="yes">&lt;b&gt;IPv6 network&lt;/b&gt;</property>
-                            <property name="use_markup">True</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Network Address / prefix:</property>
                           </object>
                           <packing>
-                            <property name="top_attach">8</property>
-                            <property name="bottom_attach">9</property>
+                            <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">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-ip6-network">
+                          <object class="GtkLabel" id="label-dhcp-start">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">FD00:100::/64</property>
-                            <property name="use_underline">True</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">DHCPv4 Start Address:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">9</property>
-                            <property name="bottom_attach">10</property>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">6</property>
+                            <property name="bottom_attach">7</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-ip6-gateway">
+                          <object class="GtkLabel" id="label-dhcp-end">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">FD00:100::1</property>
-                            <property name="ellipsize">middle</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">DHCPv4 End  Address:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <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="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">7</property>
+                            <property name="bottom_attach">8</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-dhcpv6-end">
+                          <object class="GtkLabel" id="label375">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">DHCPv6 End Address:</property>
+                            <property name="xalign">0</property>
+                            <property name="ypad">5</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Summary&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">13</property>
-                            <property name="bottom_attach">14</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-dhcpv6-start">
+                          <object class="GtkLabel" id="label18">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">DHCPv6 Start Address:</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Network&lt;/b&gt; Name:</property>
                             <property name="use_markup">True</property>
                           </object>
                           <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-dhcpv6-start">
+                          <object class="GtkLabel" id="summary-name">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
-                            <property name="label" translatable="yes">FD00:100::100</property>
-                            <property name="use_underline">True</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">demo</property>
                           </object>
                           <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-dhcpv6-end">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">FD00:100::1FF</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">13</property>
-                            <property name="bottom_attach">14</property>
-                            <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                            <property name="y_options"/>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label-ip4-network">
+                          <object class="GtkLabel" id="label9">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Network:</property>
+                            <property name="label" translatable="yes">Forwarding/Connectivity:</property>
                           </object>
                           <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="top_attach">5</property>
+                            <property name="bottom_attach">6</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-dhcp-start">
+                          <object class="GtkLabel" id="summary-ipv4-forwarding">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">DHCPv4 Start Address:</property>
-                            <property name="use_markup">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">NAT</property>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">6</property>
-                            <property name="bottom_attach">7</property>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">5</property>
+                            <property name="bottom_attach">6</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-dhcp-end">
+                          <object class="GtkAlignment" id="alignment43">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">DHCPv4 End  Address:</property>
-                            <property name="use_markup">True</property>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">7</property>
-                            <property name="bottom_attach">8</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-ip6-network">
+                          <object class="GtkAlignment" id="alignment44">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Network:</property>
-                          </object>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment51">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">5</property>
+                            <property name="bottom_attach">6</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment52">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">6</property>
+                            <property name="bottom_attach">7</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment53">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">7</property>
+                            <property name="bottom_attach">8</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment54">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
                           <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="x_options">GTK_FILL</property>
 <at>  <at>  -2330,15 +2735,21  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label-ip6-gateway">
+                          <object class="GtkAlignment" id="alignment55">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Gateway:</property>
+                            <child>
+                              <object class="GtkLabel" id="label21">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="ypad">5</property>
+                                <property name="label" translatable="yes">&lt;b&gt;IPv6 Network&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                            </child>
                           </object>
                           <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">GTK_FILL</property>
 <at>  <at>  -2346,49 +2757,99  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label375">
+                          <object class="GtkAlignment" id="alignment56">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="ypad">5</property>
-                            <property name="label" translatable="yes">&lt;b&gt;Summary&lt;/b&gt;</property>
-                            <property name="use_markup">True</property>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </object>
                           <packing>
+                            <property name="top_attach">11</property>
+                            <property name="bottom_attach">12</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label18">
+                          <object class="GtkAlignment" id="alignment57">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">12</property>
+                            <property name="bottom_attach">13</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment58">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="top_attach">13</property>
+                            <property name="bottom_attach">14</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHSeparator" id="hseparator10">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label-dhcpv6-end">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Network Name:</property>
+                            <property name="label" translatable="yes">DHCPv6 End Address:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-name">
+                          <object class="GtkLabel" id="label-dhcpv6-start">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">demo</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">DHCPv6 Start Address:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
+                            <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label9">
+                          <object class="GtkLabel" id="label23">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
 <at>  <at>  -2397,34 +2858,34  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
+                            <property name="top_attach">13</property>
+                            <property name="bottom_attach">14</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-ipv4-forwarding">
+                          <object class="GtkLabel" id="label-ip6-gateway">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">NAT</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Gateway:</property>
                           </object>
                           <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
+                            <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label10">
+                          <object class="GtkLabel" id="label-ip6-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Forwarding/Connectivity:</property>
+                            <property name="label" translatable="yes">Network Address / prefix:</property>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
 <at>  <at>  -2436,195 +2897,225  <at>  <at>  A typical IPv6 network address will look something like:  fd00:dead:beef:55::/64
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="summary-ipv6-forwarding">
+                          <object class="GtkLabel" id="summary-dhcpv6-start">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Routed</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">FD00:100::100</property>
+                            <property name="use_underline">True</property>
                           </object>
                           <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="x_options">GTK_FILL</property>
+                            <property name="top_attach">14</property>
+                            <property name="bottom_attach">15</property>
+                            <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment43">
+                          <object class="GtkLabel" id="summary-dhcpv6-end">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">FD00:100::1FF</property>
+                            <property name="use_underline">True</property>
                           </object>
                           <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
+                            <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="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment44">
+                          <object class="GtkLabel" id="summary-ipv6-forwarding">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">Routed</property>
                           </object>
                           <packing>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">13</property>
+                            <property name="bottom_attach">14</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
+                            <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment51">
+                          <object class="GtkLabel" id="summary-ip6-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">FD00:100::/64</property>
                           </object>
                           <packing>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
+                            <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment52">
+                          <object class="GtkLabel" id="summary-ip6-gateway">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">2</property>
+                            <property name="label" translatable="yes">FD00:100::1</property>
                           </object>
                           <packing>
-                            <property name="top_attach">6</property>
-                            <property name="bottom_attach">7</property>
+                            <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="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment53">
+                          <object class="GtkHSeparator" id="hseparator11">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
                           </object>
                           <packing>
-                            <property name="top_attach">7</property>
-                            <property name="bottom_attach">8</property>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">10</property>
+                            <property name="bottom_attach">11</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment54">
+                          <object class="GtkLabel" id="label-routev4-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Static Route &lt;b&gt;to&lt;/b&gt; network:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">8</property>
+                            <property name="bottom_attach">9</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label-routev4-gateway">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">&lt;b&gt;via&lt;/b&gt; Gateway:</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                          <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="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment55">
+                          <object class="GtkLabel" id="label-routev6-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">Static Route &lt;b&gt;to&lt;/b&gt; network:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
-                            <property name="top_attach">10</property>
-                            <property name="bottom_attach">11</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">16</property>
+                            <property name="bottom_attach">17</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment56">
+                          <object class="GtkLabel" id="label-routev6-gateway">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">1</property>
+                            <property name="label" translatable="yes">&lt;b&gt;via&lt;/b&gt; Gateway:</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
-                            <property name="top_attach">11</property>
-                            <property name="bottom_attach">12</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"/>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">17</property>
+                            <property name="bottom_attach">18</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment57">
+                          <object class="GtkLabel" id="summary-routev4-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">3</property>
                           </object>
                           <packing>
-                            <property name="top_attach">12</property>
-                            <property name="bottom_attach">13</property>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">8</property>
+                            <property name="bottom_attach">9</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkAlignment" id="alignment58">
+                          <object class="GtkLabel" id="summary-routev4-gateway">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <child>
-                              <placeholder/>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">3</property>
                           </object>
                           <packing>
-                            <property name="top_attach">13</property>
-                            <property name="bottom_attach">14</property>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="top_attach">9</property>
+                            <property name="bottom_attach">10</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHSeparator" id="hseparator10">
+                          <object class="GtkLabel" id="summary-routev6-network">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">3</property>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
+                            <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
+                            <property name="top_attach">16</property>
+                            <property name="bottom_attach">17</property>
                             <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHSeparator" id="hseparator11">
+                          <object class="GtkLabel" id="summary-routev6-gateway">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">3</property>
                           </object>
                           <packing>
-                            <property name="left_attach">1</property>
+                            <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">8</property>
-                            <property name="bottom_attach">9</property>
-                            <property name="x_options">GTK_FILL</property>
+                            <property name="top_attach">17</property>
+                            <property name="bottom_attach">18</property>
                           </packing>
                         </child>
                       </object>
diff --git a/ui/vmm-host.ui b/ui/vmm-host.ui
index aca4cb7..bd315fe 100644
--- a/ui/vmm-host.ui
+++ b/ui/vmm-host.ui
 <at>  <at>  -945,7 +945,7  <at>  <at> 
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Route-Via:</property>
+                                            <property name="label" translatable="yes">Static Route:</property>
                                           </object>
                                           <packing>
                                             <property name="top_attach">3</property>
 <at>  <at>  -1050,7 +1050,7  <at>  <at> 
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="xalign">0</property>
-                                            <property name="label" translatable="yes">Route-Via:</property>
+                                            <property name="label" translatable="yes">Static Route:</property>
                                           </object>
                                           <packing>
                                             <property name="top_attach">3</property>
diff --git a/virtManager/createnet.py b/virtManager/createnet.py
index 7f61448..6951087 100644
--- a/virtManager/createnet.py
+++ b/virtManager/createnet.py
 <at>  <at>  -54,16 +54,26  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
 
             "on_net_name_activate": self.forward,
             "on_net_forward_toggled" : self.change_forward_type,
-            "on_net-ipv4-enable_toggled" : self.change_ipv4_enable,
-            "on_net-ipv4-network_changed": self.change_network,
+
+            "on_net-ipv4-enable_toggled" :  self.change_ipv4_enable,
+            "on_net-ipv4-network_changed":  self.change_ipv4_network,
             "on_net-dhcpv4-enable_toggled": self.change_dhcpv4_enable,
-            "on_net-dhcpv4-start_changed": self.change_dhcpv4_start,
-            "on_net-dhcpv4-end_changed": self.change_dhcpv4_end,
-            "on_net-ipv6-enable_toggled" : self.change_ipv6_enable,
-            "on_net-ipv6-network_changed": self.change_ipv6_network,
+            "on_net-dhcpv4-start_changed":  self.change_dhcpv4_start,
+            "on_net-dhcpv4-end_changed":    self.change_dhcpv4_end,
+
+            "on_net-ipv6-enable_toggled" :  self.change_ipv6_enable,
+            "on_net-ipv6-network_changed":  self.change_ipv6_network,
             "on_net-dhcpv6-enable_toggled": self.change_dhcpv6_enable,
-            "on_net-dhcpv6-start_changed": self.change_dhcpv6_start,
-            "on_net-dhcpv6-end_changed": self.change_dhcpv6_end,
+            "on_net-dhcpv6-start_changed":  self.change_dhcpv6_start,
+            "on_net-dhcpv6-end_changed":    self.change_dhcpv6_end,
+
+            "on_net-routev4-enable_toggled":  self.change_routev4_enable,
+            "on_net-routev4-network_changed": self.change_routev4_network,
+            "on_net-routev4-gateway_changed": self.change_routev4_gateway,
+
+            "on_net-routev6-enable_toggled":  self.change_routev6_enable,
+            "on_net-routev6-network_changed": self.change_routev6_network,
+            "on_net-routev6-gateway_changed": self.change_routev6_gateway,
         })
         self.bind_escape_key_close()
 
 <at>  <at>  -171,53 +181,77  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         ignore = src
 
         white = Gdk.Color.parse("#f0f0f0")[1]
-        net4 = self.widget("net-ipv4-network")
-        start4 = self.widget("net-dhcpv4-start")
-        end4 = self.widget("net-dhcpv4-end")
+        net = self.widget("net-ipv4-network")
+        start = self.widget("net-dhcpv4-start")
+        end = self.widget("net-dhcpv4-end")
+        network = self.widget("net-routev4-network")
+        gateway = self.widget("net-routev4-gateway")
         if self.get_config_ipv4_enable():
-            net4.set_sensitive(True)
-            net4.set_text("")
-            net4.modify_bg(Gtk.StateType.NORMAL, white)
+            net.set_sensitive(True)
+            net.set_text("")
+            net.modify_bg(Gtk.StateType.NORMAL, white)
             if self.get_config_dhcpv4_enable():
-                start4.set_sensitive(True)
-                end4.set_sensitive(True)
-        else:
-            net4.set_text("")
-            start4.set_text("")
-            end4.set_text("")
-            net4.set_sensitive(False)
-            start4.set_sensitive(False)
-            end4.set_sensitive(False)
-            net4.modify_bg(Gtk.StateType.NORMAL, white)
-            start4.modify_bg(Gtk.StateType.NORMAL, white)
-            end4.modify_bg(Gtk.StateType.NORMAL, white)
+                start.set_sensitive(True)
+                end.set_sensitive(True)
+            if self.get_config_routev4_enable():
+                network.set_sensitive(True)
+                gateway.set_sensitive(True)
+        else:
+            net.set_text("")
+            start.set_text("")
+            end.set_text("")
+            network.set_text("")
+            gateway.set_text("")
+            net.set_sensitive(False)
+            start.set_sensitive(False)
+            end.set_sensitive(False)
+            network.set_sensitive(False)
+            gateway.set_sensitive(False)
+            net.modify_bg(Gtk.StateType.NORMAL, white)
+            start.modify_bg(Gtk.StateType.NORMAL, white)
+            end.modify_bg(Gtk.StateType.NORMAL, white)
+            network.modify_bg(Gtk.StateType.NORMAL, white)
+            gateway.modify_bg(Gtk.StateType.NORMAL, white)
 
     def change_ipv6_enable(self, src):
         ignore = src
 
         white = Gdk.Color.parse("#f0f0f0")[1]
-        net6 = self.widget("net-ipv6-network")
-        start6 = self.widget("net-dhcpv6-start")
-        end6 = self.widget("net-dhcpv6-end")
+        net = self.widget("net-ipv6-network")
+        start = self.widget("net-dhcpv6-start")
+        end = self.widget("net-dhcpv6-end")
+        network = self.widget("net-routev6-network")
+        gateway = self.widget("net-routev6-gateway")
         if self.get_config_ipv6_enable():
-            net6.set_sensitive(True)
-            net6.set_text("")
-            net6.modify_bg(Gtk.StateType.NORMAL, white)
+            net.set_sensitive(True)
+            net.set_text("")
+            net.modify_bg(Gtk.StateType.NORMAL, white)
             if self.get_config_dhcpv6_enable():
-                start6.set_sensitive(True)
-                end6.set_sensitive(True)
-        else:
-            net6.set_text("")
-            start6.set_text("")
-            end6.set_text("")
-            net6.set_sensitive(False)
-            start6.set_sensitive(False)
-            end6.set_sensitive(False)
-            net6.modify_bg(Gtk.StateType.NORMAL, white)
-            start6.modify_bg(Gtk.StateType.NORMAL, white)
-            end6.modify_bg(Gtk.StateType.NORMAL, white)
-
-    def change_network(self, src):
+                start.set_sensitive(True)
+                end.set_sensitive(True)
+            if self.get_config_routev6_enable():
+                network.set_sensitive(True)
+                gateway.set_sensitive(True)
+        else:
+            net.set_text("")
+            start.set_text("")
+            end.set_text("")
+            network.set_text("")
+            gateway.set_text("")
+            net.set_sensitive(False)
+            start.set_sensitive(False)
+            end.set_sensitive(False)
+            network.set_sensitive(False)
+            gateway.set_sensitive(False)
+            net.modify_bg(Gtk.StateType.NORMAL, white)
+            start.modify_bg(Gtk.StateType.NORMAL, white)
+            end.modify_bg(Gtk.StateType.NORMAL, white)
+            network.modify_bg(Gtk.StateType.NORMAL, white)
+            gateway.modify_bg(Gtk.StateType.NORMAL, white)
+
+    def change_ipv4_network(self, src):
+        ignore = src
+
         ip = self.get_config_ip4()
         green = Gdk.Color.parse("#c0ffc0")[1]
         red = Gdk.Color.parse("#ffc0c0")[1]
 <at>  <at>  -231,6 +265,8  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-info-type").set_text("")
             self.widget("net-dhcpv4-start").set_text("")
             self.widget("net-dhcpv4-end").set_text("")
+            self.widget("net-routev4-network").set_text("")
+            self.widget("net-routev4-gateway").set_text("")
             return
 
         # We've got a valid IP
 <at>  <at>  -260,7 +296,16  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-dhcpv4-start").set_sensitive(False)
             self.widget("net-dhcpv4-end").set_sensitive(False)
 
+        if self.get_config_routev4_enable():
+            self.widget("net-routev4-network").set_sensitive(True)
+            self.widget("net-routev4-gateway").set_sensitive(True)
+        else:
+            self.widget("net-routev4-network").set_sensitive(False)
+            self.widget("net-routev4-gateway").set_sensitive(False)
+
     def change_ipv6_network(self, src):
+        ignore = src
+
         ip = self.get_config_ip6()
         green = Gdk.Color.parse("#c0ffc0")[1]
         red = Gdk.Color.parse("#ffc0c0")[1]
 <at>  <at>  -274,12 +319,16  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-info-type-ip6").set_text("")
             self.widget("net-dhcpv6-start").set_text("")
             self.widget("net-dhcpv6-end").set_text("")
+            self.widget("net-routev6-network").set_text("")
+            self.widget("net-routev6-gateway").set_text("")
             return
 
-        if ip.prefixlen != 64 or not ip.is_private:
-            src.modify_bg(Gtk.StateType.NORMAL, red)
-        else:
-            src.modify_bg(Gtk.StateType.NORMAL, green)
+        color = green
+        if not ip.is_private:
+            color = red
+        if ip.prefixlen != 64:
+            color = red
+        src.modify_bg(Gtk.StateType.NORMAL, color)
 
         if ip.prefixlen != 64:
             self.widget("net-info-gateway-ip6").set_text("")
 <at>  <at>  -306,37 +355,135  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-dhcpv6-start").set_sensitive(False)
             self.widget("net-dhcpv6-end").set_sensitive(False)
 
+        if self.get_config_routev6_enable():
+            self.widget("net-routev6-network").set_sensitive(True)
+            self.widget("net-routev6-gateway").set_sensitive(True)
+        else:
+            self.widget("net-routev6-network").set_sensitive(False)
+            self.widget("net-routev6-gateway").set_sensitive(False)
+
+
+    def change_routev4_enable(self, src):
+        ignore = src
+
+        white = Gdk.Color.parse("#f0f0f0")[1]
+        ntwk = self.widget("net-routev4-network")
+        gway = self.widget("net-routev4-gateway")
+        ntwk.modify_bg(Gtk.StateType.NORMAL, white)
+        gway.modify_bg(Gtk.StateType.NORMAL, white)
+        ntwk.set_text("")
+        gway.set_text("")
+
+        if self.get_config_routev4_enable():
+            ntwk.set_sensitive(True)
+            gway.set_sensitive(True)
+        else:
+            ntwk.set_sensitive(False)
+            gway.set_sensitive(False)
+
+    def get_config_routev4_network(self):
+        if not self.get_config_routev4_enable():
+            return None
+        return self.widget("net-routev4-network").get_text()
+
+    def get_config_routev4_gateway(self):
+        if not self.get_config_routev4_enable():
+            return None
+        return self.widget("net-routev4-gateway").get_text()
+
+    def get_route_addr(self, addrStr):
+        if addrStr is None:
+            return None
+        try:
+            addr = ipaddr.IPNetwork(addrStr)
+        except:
+            addr = None
+        return addr
+
+    def change_routev4_network(self, src):
+        ignore = src
+
+        ntwk = self.get_config_routev4_network()
+        ipAddr = self.get_config_ip4()
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
+
+        if ipAddr is None or ntwk is None:
+            white = Gdk.Color.parse("#f0f0f0")[1]
+            src.modify_bg(Gtk.StateType.NORMAL, white)
+            return
+        addr = self.get_route_addr(ntwk)
+        red = Gdk.Color.parse("#ffc0c0")[1]
+        green = Gdk.Color.parse("#c0ffc0")[1]
+        color = green
+        if addr is None:
+            color = red
+        else:
+            if addr.version != 4:
+                color = red
+            if addr.prefixlen > 28:
+                color = red
+        src.modify_bg(Gtk.StateType.NORMAL, color)
+
+    def change_routev4_gateway(self, src):
+        ignore = src
+
+        gway = self.get_config_routev4_gateway()
+        ipAddr = self.get_config_ip4()
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
+
+        if ipAddr is None or gway is None:
+            white = Gdk.Color.parse("#f0f0f0")[1]
+            src.modify_bg(Gtk.StateType.NORMAL, white)
+            return
+        addr = self.get_route_addr(gway)
+        red = Gdk.Color.parse("#ffc0c0")[1]
+        green = Gdk.Color.parse("#c0ffc0")[1]
+        color = green
+        if addr is None:
+            color = red
+        else:
+            if addr.version != 4:
+                color = red
+            if not ipAddr.overlaps(addr):
+                color = red
+            if addr.prefixlen != 32:
+                color = red
+        src.modify_bg(Gtk.StateType.NORMAL, color)
 
     def change_dhcpv4_enable(self, src):
         ignore = src
 
         white = Gdk.Color.parse("#f0f0f0")[1]
-        start4 = self.widget("net-dhcpv4-start")
-        end4 = self.widget("net-dhcpv4-end")
-        start4.modify_bg(Gtk.StateType.NORMAL, white)
-        end4.modify_bg(Gtk.StateType.NORMAL, white)
-        start4.set_text("")
-        end4.set_text("")
+        start = self.widget("net-dhcpv4-start")
+        end = self.widget("net-dhcpv4-end")
+        start.modify_bg(Gtk.StateType.NORMAL, white)
+        end.modify_bg(Gtk.StateType.NORMAL, white)
+        start.set_text("")
+        end.set_text("")
 
         if not self.get_config_dhcpv4_enable():
-            start4.set_sensitive(False)
-            end4.set_sensitive(False)
+            start.set_sensitive(False)
+            end.set_sensitive(False)
         else:
-            start4.set_sensitive(True)
-            end4.set_sensitive(True)
+            start.set_sensitive(True)
+            end.set_sensitive(True)
 
             ip = self.get_config_ip4()
             if ip:
-                start = int(ip.numhosts / 2)
-                end   = int(ip.numhosts - 2)
-                start4.set_text(str(ip.network + start))
-                end4.set_text(str(ip.network + end))
+                start.set_text(str(ip.network + int(ip.numhosts / 2)))
+                end.set_text(str(ip.network + int(ip.numhosts - 2)))
 
     def change_dhcpv4_start(self, src):
+        ignore = src
+
         start = self.get_config_dhcpv4_start()
         self.change_dhcpv4(src, start)
 
     def change_dhcpv4_end(self, src):
+        ignore = src
+
         end = self.get_config_dhcpv4_end()
         self.change_dhcpv4(src, end)
 
 <at>  <at>  -344,43 +491,112  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         ip = self.get_config_ip4()
         black = Gdk.Color.parse("#000000")[1]
         src.modify_text(Gtk.StateType.NORMAL, black)
-        if not ip:
-            return
 
-        if addr is None:
+        if ip is None or addr is None:
             white = Gdk.Color.parse("#f0f0f0")[1]
             src.modify_bg(Gtk.StateType.NORMAL, white)
-        elif not ip.overlaps(addr):
+            return
+        if addr.version != 4 or not ip.overlaps(addr):
             red = Gdk.Color.parse("#ffc0c0")[1]
             src.modify_bg(Gtk.StateType.NORMAL, red)
         else:
             green = Gdk.Color.parse("#c0ffc0")[1]
             src.modify_bg(Gtk.StateType.NORMAL, green)
 
-    def change_dhcpv6_enable(self, src):
-        ignore = src
+    def change_routev6_enable(self, src):
+        white = Gdk.Color.parse("#f0f0f0")[1]
+        ntwk = self.widget("net-routev6-network")
+        gway = self.widget("net-routev6-gateway")
+        ntwk.modify_bg(Gtk.StateType.NORMAL, white)
+        gway.modify_bg(Gtk.StateType.NORMAL, white)
+        ntwk.set_text("")
+        gway.set_text("")
+
+        if self.get_config_routev6_enable():
+            ntwk.set_sensitive(True)
+            gway.set_sensitive(True)
+        else:
+            ntwk.set_sensitive(False)
+            gway.set_sensitive(False)
+
+    def get_config_routev6_network(self):
+        if not self.get_config_routev6_enable():
+            return None
+        return self.widget("net-routev6-network").get_text()
 
+    def get_config_routev6_gateway(self):
+        if not self.get_config_routev6_enable():
+            return None
+        return self.widget("net-routev6-gateway").get_text()
+
+    def change_routev6_network(self, src):
+        ntwk = self.get_config_routev6_network()
+        ip = self.get_config_ip6()
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
+
+        if ip is None or ntwk is None:
+            white = Gdk.Color.parse("#f0f0f0")[1]
+            src.modify_bg(Gtk.StateType.NORMAL, white)
+            return
+        addr = self.get_route_addr(ntwk)
+        red = Gdk.Color.parse("#ffc0c0")[1]
+        green = Gdk.Color.parse("#c0ffc0")[1]
+        color = green
+        if addr is None:
+            color = red
+        else:
+            if addr.version != 6:
+                color = red
+            if  addr.prefixlen > 64:
+                color = red
+        src.modify_bg(Gtk.StateType.NORMAL, color)
+
+    def change_routev6_gateway(self, src):
+        gway = self.get_config_routev6_gateway()
+        ip = self.get_config_ip6()
+        black = Gdk.Color.parse("#000000")[1]
+        src.modify_text(Gtk.StateType.NORMAL, black)
+
+        if ip is None or gway is None:
+            white = Gdk.Color.parse("#f0f0f0")[1]
+            src.modify_bg(Gtk.StateType.NORMAL, white)
+            return
+        addr = self.get_route_addr(gway)
+        red = Gdk.Color.parse("#ffc0c0")[1]
+        green = Gdk.Color.parse("#c0ffc0")[1]
+        color = green
+        if addr is None:
+            color = red
+        else:
+            if addr.version != 6:
+                color = red
+            if not ip.overlaps(addr):
+                color = red
+            if addr.prefixlen != 128:
+                color = red
+        src.modify_bg(Gtk.StateType.NORMAL, color)
+
+    def change_dhcpv6_enable(self, src):
         white = Gdk.Color.parse("#f0f0f0")[1]
-        start6 = self.widget("net-dhcpv6-start")
-        end6 = self.widget("net-dhcpv6-end")
-        start6.modify_bg(Gtk.StateType.NORMAL, white)
-        end6.modify_bg(Gtk.StateType.NORMAL, white)
-        start6.set_text("")
-        end6.set_text("")
+        start = self.widget("net-dhcpv6-start")
+        end = self.widget("net-dhcpv6-end")
+        start.modify_bg(Gtk.StateType.NORMAL, white)
+        end.modify_bg(Gtk.StateType.NORMAL, white)
+        start.set_text("")
+        end.set_text("")
         if not self.get_config_dhcpv6_enable():
-            start6.set_sensitive(False)
-            end6.set_sensitive(False)
+            start.set_sensitive(False)
+            end.set_sensitive(False)
 
         else:
-            start6.set_sensitive(True)
-            end6.set_sensitive(True)
+            start.set_sensitive(True)
+            end.set_sensitive(True)
 
             ip = self.get_config_ip6()
             if ip:
-                start = 256
-                end   = 512 - 1
-                start6.set_text(str(ip.network + start))
-                end6.set_text(str(ip.network + end))
+                start.set_text(str(ip.network + 256))
+                end.set_text(str(ip.network + 511))
 
     def change_dhcpv6_start(self, src):
         start = self.get_config_dhcpv6_start()
 <at>  <at>  -394,13 +610,12  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         ip = self.get_config_ip6()
         black = Gdk.Color.parse("#000000")[1]
         src.modify_text(Gtk.StateType.NORMAL, black)
-        if not ip:
-            return
 
-        if addr is None:
+        if ip is None or addr is None:
             white = Gdk.Color.parse("#f0f0f0")[1]
             src.modify_bg(Gtk.StateType.NORMAL, white)
-        elif not ip.overlaps(addr):
+            return
+        if addr.version != 6 or not ip.overlaps(addr):
             red = Gdk.Color.parse("#ffc0c0")[1]
             src.modify_bg(Gtk.StateType.NORMAL, red)
         else:
 <at>  <at>  -451,13 +666,13  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             return ipaddr.IPNetwork(self.widget("net-dhcpv6-start").get_text())
         except:
             return None
+
     def get_config_dhcpv6_end(self):
         try:
             return ipaddr.IPNetwork(self.widget("net-dhcpv6-end").get_text())
         except:
             return None
 
-
     def get_config_forwarding(self):
         if self.widget("net-forward-none").get_active():
             return [None, None]
 <at>  <at>  -483,6 +698,12  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
     def get_config_dhcpv6_enable(self):
         return self.widget("net-dhcpv6-enable").get_active()
 
+    def get_config_routev4_enable(self):
+        return self.widget("net-routev4-enable").get_active()
+
+    def get_config_routev6_enable(self):
+        return self.widget("net-routev6-enable").get_active()
+
     def populate_summary(self):
         self.widget("summary-name").set_text(self.get_config_name())
         self.widget("summary-domain").set_text(self.get_config_domain_name())
 <at>  <at>  -495,7 +716,7  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         if ip:
             self.widget("label-ip4-gateway").show()
             self.widget("summary-ip4-gateway").show()
-            self.widget("label-ip4-network").set_text(_("Network:"))
+            self.widget("label-ip4-network").set_text(_("Network Address / prefix:"))
             self.widget("summary-ip4-network").set_text(str(ip))
             self.widget("summary-ip4-gateway").set_text(str(ip.network + 1))
         else:
 <at>  <at>  -509,7 +730,7  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("summary-dhcp-end").show()
             start = self.get_config_dhcpv4_start()
             end = self.get_config_dhcpv4_end()
-            self.widget("label-dhcp-start").set_text("Start Address:")
+            self.widget("label-dhcp-start").set_text("DHCPv4 Start Address:")
             if start and end:
                 self.widget("summary-dhcp-start").set_text(str(start.network))
                 self.widget("summary-dhcp-end").set_text(str(end.network))
 <at>  <at>  -522,6 +743,32  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("label-dhcp-start").set_text(_("DHCPv4 Status:"))
             self.widget("summary-dhcp-start").set_text(_("Disabled"))
 
+        if ip and self.get_config_routev4_enable():
+            self.widget("label-routev4-network").show()
+            self.widget("label-routev4-gateway").show()
+            self.widget("summary-routev4-network").show()
+            self.widget("summary-routev4-gateway").show()
+            self.widget("summary-routev4-network").set_text("")
+            self.widget("summary-routev4-gateway").set_text("")
+            ntwk = self.get_config_routev4_network()
+            try:
+                naddr = ipaddr.IPNetwork(ntwk)
+            except:
+                naddr = None
+            gway = self.get_config_routev4_gateway()
+            try:
+                gaddr = ipaddr.IPNetwork(gway)
+            except:
+                gaddr = None
+            if naddr and gaddr:
+                self.widget("summary-routev4-network").set_text(str(naddr))
+                self.widget("summary-routev4-gateway").set_text(str(gaddr.network))
+        else:
+            self.widget("label-routev4-network").hide()
+            self.widget("label-routev4-gateway").hide()
+            self.widget("summary-routev4-network").hide()
+            self.widget("summary-routev4-gateway").hide()
+
         forward_txt = ""
         dev, mode = self.get_config_forwarding()
         forward_txt = vmmNetwork.pretty_desc(mode, dev)
 <at>  <at>  -531,7 +778,7  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         if ip:
             self.widget("label-ip6-gateway").show()
             self.widget("summary-ip6-gateway").show()
-            self.widget("label-ip6-network").set_text(_("Network:"))
+            self.widget("label-ip6-network").set_text(_("Network Address / prefix:"))
             self.widget("summary-ip6-network").set_text(str(ip))
             self.widget("summary-ip6-gateway").set_text(str(ip.network + 1))
         else:
 <at>  <at>  -546,7 +793,7  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("summary-dhcpv6-end").show()
             start = self.get_config_dhcpv6_start()
             end = self.get_config_dhcpv6_end()
-            self.widget("label-dhcpv6-start").set_text("Start Address:")
+            self.widget("label-dhcpv6-start").set_text("DHCPv6 Start Address:")
             if start and end:
                 self.widget("summary-dhcpv6-start").set_text(str(start.network))
                 self.widget("summary-dhcpv6-end").set_text(str(end.network))
 <at>  <at>  -558,6 +805,34  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("summary-dhcpv6-end").hide()
             self.widget("label-dhcpv6-start").set_text(_("DHCPv6 Status:"))
             self.widget("summary-dhcpv6-start").set_text(_("Disabled"))
+
+        if ip and self.get_config_routev6_enable():
+            self.widget("label-routev6-network").show()
+            self.widget("label-routev6-gateway").show()
+            self.widget("summary-routev6-network").show()
+            self.widget("summary-routev6-gateway").show()
+            self.widget("summary-routev6-network").set_text("")
+            self.widget("summary-routev6-gateway").set_text("")
+            ntwk = self.get_config_routev6_network()
+            try:
+                naddr = ipaddr.IPNetwork(ntwk)
+            except:
+                naddr = None
+            gway = self.get_config_routev6_gateway()
+            try:
+                gaddr = ipaddr.IPNetwork(gway)
+            except:
+                gaddr = None
+            if naddr and gaddr:
+                self.widget("summary-routev6-network").set_text(str(naddr))
+                self.widget("summary-routev6-gateway").set_text(str(gaddr.network))
+        else:
+            self.widget("label-routev6-network").hide()
+            self.widget("label-routev6-gateway").hide()
+            self.widget("summary-routev6-network").hide()
+            self.widget("summary-routev6-gateway").hide()
+
+
         if ip:
             self.widget("summary-ipv6-forwarding").set_text("Routed network")
         else:
 <at>  <at>  -574,15 +849,14  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-ipv4-network").set_sensitive(False)
             self.widget("net-dhcpv4-start").set_sensitive(False)
             self.widget("net-dhcpv4-end").set_sensitive(False)
-            return
-        self.widget("net-ipv4-network").set_sensitive(True)
+        else:
+            self.widget("net-ipv4-network").set_sensitive(True)
 
         if not self.get_config_dhcpv4_enable():
             self.widget("net-dhcpv4-end").set_text("")
             self.widget("net-dhcpv4-start").set_text("")
             self.widget("net-dhcpv4-start").set_sensitive(False)
             self.widget("net-dhcpv4-end").set_sensitive(False)
-            return
         else:
             ip = self.get_config_ip4()
             if ip:
 <at>  <at>  -603,15 +877,16  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.widget("net-ipv6-network").set_sensitive(False)
             self.widget("net-dhcpv6-start").set_sensitive(False)
             self.widget("net-dhcpv6-end").set_sensitive(False)
-            return
-        self.widget("net-ipv6-network").set_sensitive(True)
+            self.widget("net-routev6-network").set_sensitive(False)
+            self.widget("net-routev6-gateway").set_sensitive(False)
+        else:
+            self.widget("net-ipv6-network").set_sensitive(True)
 
         if not self.get_config_dhcpv6_enable():
             self.widget("net-dhcpv6-end").set_text("")
             self.widget("net-dhcpv6-start").set_text("")
             self.widget("net-dhcpv6-start").set_sensitive(False)
             self.widget("net-dhcpv6-end").set_sensitive(False)
-            return
         else:
             ip = self.get_config_ip6()
             if ip:
 <at>  <at>  -622,6 +897,21  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
                     self.widget("net-dhcpv6-end").set_text(str(ip.network + end))
             self.widget("net-dhcpv6-start").set_sensitive(True)
             self.widget("net-dhcpv6-end").set_sensitive(True)
+        if not self.get_config_routev6_enable():
+            self.widget("net-routev6-network").set_text("")
+            self.widget("net-routev6-gateway").set_text("")
+            self.widget("net-routev6-network").set_sensitive(False)
+            self.widget("net-routev6-gateway").set_sensitive(False)
+        else:
+            self.widget("net-routev6-network").set_text("")
+            self.widget("net-routev6-gateway").set_text("")
+            self.widget("net-routev6-network").set_sensitive(True)
+            self.widget("net-routev6-gateway").set_sensitive(True)
+
+    def populate_misc(self):
+        name = self.widget("net-name").get_text()
+        if self.widget("net-domain-name").get_text() == "":
+            self.widget("net-domain-name").set_text(name)
 
     def page_changed(self, ignore1, ignore2, page_number):
         if page_number == PAGE_NAME:
 <at>  <at>  -632,6 +922,8  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
             self.populate_ipv4()
         elif page_number == PAGE_IPV6:
             self.populate_ipv6()
+        elif page_number == PAGE_MISC:
+            self.populate_misc()
         elif page_number == PAGE_SUMMARY:
             self.populate_summary()
 
 <at>  <at>  -698,6 +990,39  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
                 xml += "    </dhcp>\n"
             xml += "  </ip>\n"
 
+        ntwk = self.get_config_routev4_network()
+        try:
+            netaddr = ipaddr.IPNetwork(ntwk)
+        except:
+            netaddr = None
+        gway = self.get_config_routev4_gateway()
+        try:
+            gwaddr = ipaddr.IPNetwork(gway)
+        except:
+            gwaddr = None
+        if netaddr and gwaddr:
+            xml += "<route family='ipv4'"
+            xml += " address='%s'" % netaddr.network
+            xml += " prefix='%s'" % netaddr.prefixlen
+            xml += " gateway='%s' />" % gwaddr.network
+
+        ntwk = self.get_config_routev6_network()
+        try:
+            netaddr = ipaddr.IPNetwork(ntwk)
+        except:
+            netaddr = None
+        gway = self.get_config_routev6_gateway()
+        try:
+            gwaddr = ipaddr.IPNetwork(gway)
+        except:
+            gwaddr = None
+        if netaddr and gwaddr:
+            xml += "<route family='ipv6'"
+            xml += " address='%s'" % netaddr.network
+            xml += " prefix='%s'" % netaddr.prefixlen
+            xml += " gateway='%s' />" % gwaddr.network
+
+
         xml += "</network>\n"
 
         logging.debug("Generated network XML:\n" + xml)
 <at>  <at>  -753,21 +1078,56  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
         if enabled:
             start = self.get_config_dhcpv4_start()
             end = self.get_config_dhcpv4_end()
-            if enabled and start is None:
+            if start is None:
                 return self.err.val_err(_("Invalid DHCP Address"),
                             _("The DHCP start address could not be understood"))
-            if enabled and end is None:
+            if end is None:
                 return self.err.val_err(_("Invalid DHCP Address"),
                             _("The DHCP end address could not be understood"))
-            if enabled and not ip.overlaps(start):
+            if not ip.overlaps(start):
                 return self.err.val_err(_("Invalid DHCP Address"),
                         (_("The DHCP start address is not with the network %s") %
                          (str(ip))))
-            if enabled and not ip.overlaps(end):
+            if not ip.overlaps(end):
                 return self.err.val_err(_("Invalid DHCP Address"),
                         (_("The DHCP end address is not with the network %s") %
                          (str(ip))))
 
+        enabled = self.get_config_routev4_enable()
+        if enabled:
+            ntwk = self.get_config_routev4_network()
+            ntwkbad = False
+            gway = self.get_config_routev4_gateway()
+            gwaybad = False
+            if ntwk is None or gway is None:
+                return True
+            if ntwk == "" and gway == "":
+                return True
+            naddr = self.get_route_addr(ntwk)
+            if naddr is None:
+                ntwkbad = True
+            else:
+                if naddr.version != 4:
+                    ntwkbad = True
+                if naddr.prefixlen > 28:
+                    ntwkbad = True
+            gaddr = self.get_route_addr(gway)
+            if gaddr is None:
+                gwaybad = True
+            else:
+                if gaddr.version != 4:
+                    gwaybad = True
+                if gaddr.prefixlen != 32:
+                    gwaybad = True
+                if not ip.overlaps(gaddr):
+                    gwaybad = True
+            if ntwkbad:
+                return self.err.val_err(_("Invalid static route"),
+                            _("The network address is incorrect."))
+            if gwaybad:
+                return self.err.val_err(_("Invalid static route"),
+                            _("The gateway address is incorrect."))
+
         return True
 
     def validate_ipv6(self):
 <at>  <at>  -812,6 +1172,41  <at>  <at>  class vmmCreateNetwork(vmmGObjectUI):
                         (_("The DHCPv6 end address is not with the network %s") %
                          (str(ip))))
 
+        enabled = self.get_config_routev6_enable()
+        if enabled:
+            ntwk = self.get_config_routev6_network()
+            ntwkbad = False
+            gway = self.get_config_routev6_gateway()
+            gwaybad = False
+            if ntwk is None or gway is None:
+                return True
+            if ntwk == "" and gway == "":
+                return True
+            naddr = self.get_route_addr(ntwk)
+            if naddr is None:
+                ntwkbad = True
+            else:
+                if naddr.version != 6:
+                    ntwkbad = True
+                if naddr.prefixlen > 64:
+                    ntwkbad = True
+            gaddr = self.get_route_addr(gway)
+            if gaddr is None:
+                gwaybad = True
+            else:
+                if gaddr.version != 6:
+                    gwaybad = True
+                if gaddr.prefixlen != 128:
+                    gwaybad = True
+                if not ip.overlaps(gaddr):
+                    gwaybad = True
+            if ntwkbad:
+                return self.err.val_err(_("Invalid static route"),
+                            _("The network address is incorrect."))
+            if gwaybad:
+                return self.err.val_err(_("Invalid static route"),
+                            _("The gateway address is incorrect."))
+
         return True
 
     def validate_miscellaneous(self):
diff --git a/virtManager/host.py b/virtManager/host.py
index 100ac8d..6d3ca88 100644
--- a/virtManager/host.py
+++ b/virtManager/host.py
 <at>  <at>  -575,7 +575,7  <at>  <at>  class vmmHost(vmmGObjectUI):
         self.widget("net-ip4-dhcp-start").set_text(start)
         self.widget("net-ip4-dhcp-end").set_text(end)
         if route and route[0] and route[1]:
-            routeVia = str(route[0]) + " via " + str(route[1])
+            routeVia = str(route[0]) + ", gateway=" + str(route[1])
             self.widget("net-ip4-route-label").show()
         else:
             routeVia = _("")
 <at>  <at>  -605,7 +605,7  <at>  <at>  class vmmHost(vmmGObjectUI):
             iconsize = Gtk.IconSize.MENU
             icon = Gtk.STOCK_DISCONNECT
             self.widget("net-ip6-forwarding-icon").set_from_stock(icon, iconsize)
-            ipv6 = net.get_ipv6_route()
+            ipv6 = net.get_ipv6_routing()
             if ipv6:
                 self.widget("net-ip6-forwarding").set_text(
                                         _("Isolated network, internal and host routing only"))
 <at>  <at>  -622,7 +622,7  <at>  <at>  class vmmHost(vmmGObjectUI):
         self.widget("net-ip6-dhcp-start").set_text(start)
         self.widget("net-ip6-dhcp-end").set_text(end)
         if route and route[0] and route[1]:
-            routeVia = str(route[0]) + " via " + str(route[1])
+            routeVia = str(route[0]) + ", gateway=" + str(route[1])
             self.widget("net-ip6-route-label").show()
         else:
             routeVia = ""
 <at>  <at>  -1081,7 +1081,7  <at>  <at>  class vmmHost(vmmGObjectUI):
                               str(e))
             return
 
-        # This will require an interface restart
+        # XXX: This will require an interface restart
         self.widget("interface-apply").set_sensitive(False)
 
     def interface_startmode_changed(self, src_ignore):
diff --git a/virtManager/network.py b/virtManager/network.py
index d76e0be..60ddcb8 100644
--- a/virtManager/network.py
+++ b/virtManager/network.py
 <at>  <at>  -17,6 +17,7  <at>  <at> 
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA 02110-1301 USA.
 #
+import logging
 
 from virtManager import util
 import ipaddr
 <at>  <at>  -97,14 +98,47  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
     def get_autostart(self):
         return self.net.autostart()
 
+    def get_ipv4_static_route(self):
+        doc = None
+        ret = None
+        routeAddr = None
+        routeVia = None
+        xml = self.get_xml()
+        doc = libxml2.parseDoc(xml)
+        nodes = doc.xpathEval('//route')
+        for node in nodes:
+            family = node.xpathEval('string(./ <at> family)')
+            if not family or family == 'ipv4':
+                addrStr    = node.xpathEval('string(./ <at> address)')
+                netmaskStr = node.xpathEval('string(./ <at> netmask)')
+                gatewayStr = node.xpathEval('string(./ <at> gateway)')
+                prefix     = node.xpathEval('string(./ <at> prefix)')
+                if prefix:
+                    prefix = int(prefix)
+                    routeAddr = str(ipaddr.IPNetwork(str(addrStr) + "/" + str(prefix)).masked())
+                elif netmaskStr:
+                    netmask = ipaddr.IPAddress(netmaskStr)
+                    network = ipaddr.IPAddress(addrStr)
+                    routeAddr = str(ipaddr.IPNetwork(str(network) + "/" + str(netmask)).masked())
+                else:
+                    routeAddr = str(ipaddr.IPNetwork(str(addrStr)))
+                routeVia = str(ipaddr.IPAddress(str(gatewayStr)))
+                break
+
+        if doc:
+            doc.freeDoc()
+        if routeAddr and routeVia:
+            ret = [routeAddr, routeVia]
+        else:
+            ret = None
+        return ret
+
     def get_ipv4_network(self):
         doc = None
         ret = None
         goodNode = None
         dhcpstart = None
         dhcpend = None
-        routeAddr = None
-        routeVia = None
         xml = self.get_xml()
         doc = libxml2.parseDoc(xml)
         nodes = doc.xpathEval('//ip')
 <at>  <at>  -118,21 +152,10  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
                     goodNode = node
                     break
 
-        for node in nodes:
-            family = node.xpathEval('string(./ <at> family)')
-            if not family or family == 'ipv4':
-                routeVia = node.xpathEval('string(./ <at> via)')
-                if routeVia:
-                    routeAddr = node.xpathEval('string(./ <at> address)')
-                    break
-
         if goodNode is None:
             for node in nodes:
                 family = node.xpathEval('string(./ <at> family)')
                 if not family or family == 'ipv4':
-                    tmp = node.xpathEval('string(./ <at> via)')
-                    if tmp:
-                        continue
                     goodNode = node
                     break
 
 <at>  <at>  -155,11 +178,38  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
             dhcp = [str(ipaddr.IPAddress(dhcpstart)), str(ipaddr.IPAddress(dhcpend))]
         else:
             dhcp = None
+        route = self.get_ipv4_static_route()
+        return [ret, dhcp, route]
+
+    def get_ipv6_static_route(self):
+        doc = None
+        ret = None
+        routeAddr = None
+        routeVia = None
+        xml = self.get_xml()
+        doc = libxml2.parseDoc(xml)
+        nodes = doc.xpathEval('//route')
+        for node in nodes:
+            family = node.xpathEval('string(./ <at> family)')
+            if family and family == 'ipv6':
+                addrStr    = node.xpathEval('string(./ <at> address)')
+                prefix     = node.xpathEval('string(./ <at> prefix)')
+                gatewayStr = node.xpathEval('string(./ <at> gateway)')
+                if prefix:
+                    prefix    = int(prefix)
+                    routeAddr = str(ipaddr.IPNetwork(str(addrStr) + "/" + str(prefix)).masked())
+                else:
+                    routeAddr = str(ipaddr.IPNetwork(str(addrStr)))
+                routeVia = str(ipaddr.IPAddress(str(gatewayStr)))
+                break
+
+        if doc:
+            doc.freeDoc()
         if routeAddr and routeVia:
-            route = [str(ipaddr.IPAddress(routeAddr)), str(ipaddr.IPAddress(routeVia))]
+            ret = [routeAddr, routeVia]
         else:
-            route = None
-        return [ret, dhcp, route]
+            ret = None
+        return ret
 
     def get_ipv6_network(self):
         doc = None
 <at>  <at>  -167,8 +217,6  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
         goodNode = None
         dhcpstart = None
         dhcpend = None
-        routeAddr = None
-        routeVia = None
         xml = self.get_xml()
         doc = libxml2.parseDoc(xml)
         nodes = doc.xpathEval('//ip')
 <at>  <at>  -182,21 +230,10  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
                     goodNode = node
                     break
 
-        for node in nodes:
-            family = node.xpathEval('string(./ <at> family)')
-            if family and family == 'ipv6':
-                routeVia = node.xpathEval('string(./ <at> via)')
-                if routeVia:
-                    routeAddr = node.xpathEval('string(./ <at> address)')
-                    break
-
         if goodNode is None:
             for node in nodes:
                 family = node.xpathEval('string(./ <at> family)')
                 if family and family == 'ipv6':
-                    tmp = node.xpathEval('string(./ <at> via)')
-                    if tmp:
-                        continue
                     goodNode = node
                     break
 
 <at>  <at>  -214,10 +251,7  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
             dhcp = [str(ipaddr.IPAddress(dhcpstart)), str(ipaddr.IPAddress(dhcpend))]
         else:
             dhcp = None
-        if routeAddr and routeVia:
-            route = [str(ipaddr.IPAddress(routeAddr)), str(ipaddr.IPAddress(routeVia))]
-        else:
-            route = None
+        route = self.get_ipv6_static_route()
         return [ret, dhcp, route]
 
     def get_name_domain(self):
 <at>  <at>  -225,10 +259,10  <at>  <at>  class vmmNetwork(vmmLibvirtObject):
         name_domain = util.xpath(xml, "/network/domain/ <at> name")
         return name_domain
 
-    def get_ipv6_route(self):
+    def get_ipv6_routing(self):
         xml = self.get_xml()
-        ipv6_route = util.xpath(xml, "/network/ <at> ipv6")
-        return ipv6_route
+        ipv6_routing = util.xpath(xml, "/network/ <at> ipv6")
+        return ipv6_routing
 
     def get_ipv4_forward(self):
         xml = self.get_xml()
--

-- 
1.8.1.4

gmane.comp.emulators.virt-tools
Marc-André Lureau | 14 May 2013 02:30
Picon
Gravatar

[PATCH virt-viewer] window: fix send key menu popup position

From: Marc-André Lureau <marcandre.lureau <at> redhat.com>

Fix send key menu popup position.

The current code wasn't correctly translating the menu coordinates
based on the toplevel windows position, it was always using origin 0.

https://bugzilla.redhat.com/show_bug.cgi?id=913601
---
 src/virt-viewer-window.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 5c9a9db..814726f 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
 <at>  <at>  -726,11 +726,12  <at>  <at>  static void keycombo_menu_location(GtkMenu *menu G_GNUC_UNUSED, gint *x, gint *y
 {
     VirtViewerWindow *self = user_data;
     GtkAllocation allocation;
+    GtkWidget *toplevel = gtk_widget_get_toplevel(self->priv->toolbar_send_key);

     *push_in = TRUE;
-    gdk_window_get_origin(gtk_widget_get_window(self->priv->toolbar_send_key), x, y);
-    gtk_widget_translate_coordinates(self->priv->toolbar_send_key, gtk_widget_get_toplevel(self->priv->toolbar_send_key),
-                                     0, 0, x, y);
+    gdk_window_get_origin(gtk_widget_get_window(toplevel), x, y);
+    gtk_widget_translate_coordinates(self->priv->toolbar_send_key, toplevel,
+                                     *x, *y, x, y);
     gtk_widget_get_allocation(self->priv->toolbar_send_key, &allocation);
     *y += allocation.height;
 }
--

-- 
1.8.3.rc1.49.g8d97506

_______________________________________________
virt-tools-list mailing list
virt-tools-list <at> redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list
Zeeshan Ali (Khattak | 13 May 2013 22:59
Picon

Libosinfo 0.2.7

Libosinfo 0.2.7 is out!

Changes since 0.2.6:

- Add/improve/fix data on:
  - CentOS 6.*
  - Fedora 19
  - GNOME 3.8
  - openSUSE 12.3
  - RHEL 6.4
  - Ubuntu 13.04
- Add testcases for media detection:
  - Debian 7.0.*
  - Fedora 17, 18 and 19
  - Ubuntu 12.10 and 13.04
- Installer script fixes/improvements:
  - Setup user avatar for Windows 7.
  - Fix against old RHEL and Fedora.
  - Specify installation method for Fedora (required by Fedora 19).
- New API:
  - osinfo_platform_get_all_devices()
  - osinfo_install_script_generate_command_line()
- build:
  - Take DESTDIR into account when creating symlinks.
  - Fix issues with installing in a tree where libosinfo was already installed.
  - Fix a race-condition regarding usb.ids/pci.ids setup.
  - Disable static libraries by default.
- Some portability improments/fixes.
- Fixes `make syntax-check`.
- More docs and fixes to existing docs.

Release tarball available here for download:
https://fedorahosted.org/releases/l/i/libosinfo/libosinfo-0.2.7.tar.gz
sha256 checksum:
fce8f43d02da7c8f05db1b3cf40850711d56978f880558fde5cde7c8d0b24a46

What is libosinfo?
=============

libosinfo is a GObject based library API for managing information about
operating systems, hypervisors and the (virtual) hardware devices they can
support. It includes a database containing device metadata and provides APIs
to match/identify optimal devices for deploying an operating system on a
hypervisor. Via the magic of GObject Introspection, the API is available in all
common programming languages with demos for javascript (GJS/Seed) and python
(PyGObject). Also provided are Vala bindings.

libosinfo is Free Software and licenced under LGPLv2+.

Dependencies
============

- Required:
  - gobject-2.0
  - gio-2.0
  - libxml-2.0

- Optional:
  - gobject-introspection
  - Vala (build-time only)

For further information about libosinfo please consult the project homepage

   https://libosinfo.org/

--
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

Guannan Ren | 13 May 2013 12:14
Picon
Favicon

[PATCH v3] domain: add 'pre-startup' signal and do nodedevs checking

This patch introduces 'pre-start' signal and registers
nodedev checking handler to check duplicate USB devices.
If virt-manager can not identify unique usb device any more
before domain startup, it will throw a tip error to tell it
is time to reattach host USB devices to get updated bus/addr info.
---
 virtManager/domain.py | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index 791f2af..89c226b 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
 <at>  <at>  -149,6 +149,7  <at>  <at>  class vmmDomain(vmmLibvirtObject):
         "status-changed": (GObject.SignalFlags.RUN_FIRST, None, [int, int]),
         "resources-sampled": (GObject.SignalFlags.RUN_FIRST, None, []),
         "inspection-changed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "pre-startup": (GObject.SignalFlags.RUN_FIRST, None, [object]),
     }

     def __init__(self, conn, backend, uuid):
 <at>  <at>  -252,7 +253,34  <at>  <at>  class vmmDomain(vmmLibvirtObject):

         self.connect("status-changed", self._update_start_vcpus)
         self.connect("config-changed", self._reparse_xml)
+        self.connect("pre-startup", self._prestartup_nodedev_check)

+    def _prestartup_nodedev_check(self, src, ret):
+        ignore = src
+        error = _("These is more than one '%s' device attached to "
+                  "your host, and we can't determine which one to "
+                  "use for your guest.\n"
+                  "To fix this, remove and reattach the USB device "
+                  "to your guest using the 'Add Hardware' wizard.")
+
+        for hostdev in self.get_hostdev_devices():
+            devtype = hostdev.type
+
+            if devtype != "usb":
+                continue
+
+            vendor = hostdev.vendor
+            product = hostdev.product
+            bus = hostdev.bus
+            device = hostdev.device
+
+            if vendor and product:
+                count = self.conn.get_nodedevs_number("usb_device",
+                                                      vendor,
+                                                      product)
+                if count > 1 and not (bus and device):
+                    prettyname = "%s %s" % (vendor, product)
+                    ret.append(error % prettyname)

     ###########################
     # Misc API getter methods #
 <at>  <at>  -1171,6 +1199,13  <at>  <at>  class vmmDomain(vmmLibvirtObject):
         if self.get_cloning():
             raise RuntimeError(_("Cannot start guest while cloning "
                                  "operation in progress"))
+
+        pre_startup_ret = []
+        self.emit("pre-startup", pre_startup_ret)
+
+        for error in pre_startup_ret:
+            raise RuntimeError(error)
+
         self._backend.create()
         self.idle_add(self.force_update_status)

--

-- 
1.8.1.4

Mattias Grönlund | 11 May 2013 11:30
Picon

Possible fix for Missing Characters <at> (Alt-GR Q) and | (Alt-GR <) on german locale

Running virt-viewer-x64-0.5.6.msi, on Windows 7, connecting to QEMU using spice, AltGR key combinations fails (using Swedish keyboard layout both at server and client).

I suspect that this is a variant of https://bugzilla.redhat.com/show_bug.cgi?id=904092.

After some debugging, I realized that there is an extra VK_LCONTROL keypress sent by Windows. This extra VK_LCONTROL will then make the key e.g. AltGr-< actually be Control-AltGr-<, which is not interpreted as a | sign.

So in spice-widget.c : keyboard_hook_cb(), I added SPICE_DEBUG lines which printed out the hooked->scanCode, and realized that this extra VK_LCONTROL has a very suspect scanCode with bit 9 set. If I instead press the left Ctrl key, it will also emit VK_LCONTROL, but with bit 9 cleared.

So I just made sure that keyboard_hook_cb(), silently dropped these strange VK_LCONTROL events, which seems to work for me.


         case VK_NUMLOCK:
         case VK_LSHIFT:
         case VK_RSHIFT:
-        case VK_LCONTROL:
         case VK_RCONTROL:
         case VK_LMENU:
         case VK_RMENU:
             break;
+        case VK_LCONTROL:
+            // When pressing AltGr, an extra VK_LCONTROL with a special scancode with bit 9 set is sent.
+            // Lets ignore the extra VK_LCONTROL, as that will make AltGr missbehave.
+            if (hooked->scanCode & 0x200)
+                return 1;
+            break;
         default:
             SendMessage(win32_window, wparam, hooked->vkCode, dwmsg);
             return 1;
         }


/Mattias
<div><div dir="ltr">
<div>Running&nbsp;virt-viewer-x64-0.5.6.msi, on Windows 7, connecting to QEMU using spice, AltGR key combinations fails (using Swedish keyboard layout both at server and client).</div>
<div><br></div>
<div>
I suspect that this is a variant of&nbsp;<a href="https://bugzilla.redhat.com/show_bug.cgi?id=904092">https://bugzilla.redhat.com/show_bug.cgi?id=904092</a>.</div>
<div><br></div>
<div>After some debugging, I realized that there is an extra VK_LCONTROL keypress sent by Windows. This extra VK_LCONTROL will then make the key e.g. AltGr-&lt; actually be Control-AltGr-&lt;, which is not interpreted as a | sign.</div>
<div><br></div>
<div>So in spice-widget.c :&nbsp;keyboard_hook_cb(), I added SPICE_DEBUG lines which printed out the hooked-&gt;scanCode, and realized that this extra VK_LCONTROL has a very suspect scanCode with bit 9 set. If I instead press the left Ctrl key, it will also emit VK_LCONTROL, but with bit 9 cleared.</div>
<div><br></div>
<div>So I just made sure that keyboard_hook_cb(), silently dropped these strange VK_LCONTROL events, which seems to work for me.</div>
<div><br></div>
<div><br></div>
<div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_NUMLOCK:<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_LSHIFT:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_RSHIFT:</div>
<div>- &nbsp; &nbsp; &nbsp; &nbsp;case VK_LCONTROL:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_RCONTROL:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_LMENU:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case VK_RMENU:</div>
<div>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp;case VK_LCONTROL:</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// When pressing AltGr, an extra VK_LCONTROL with a special scancode with bit 9 set is sent.</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Lets ignore the extra VK_LCONTROL, as that will make AltGr missbehave.</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (hooked-&gt;scanCode &amp; 0x200)</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 1;</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default:</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SendMessage(win32_window, wparam, hooked-&gt;vkCode, dwmsg);<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 1;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
<div><br></div>
<div><br></div>
<div>/Mattias</div>
</div>
</div></div>
Guannan Ren | 10 May 2013 11:49
Picon
Favicon

[PATCH v2] domain: add 'pre-startup' signal and do nodedevs checking

This patch introduces 'pre-start' signal and registers
nodedev checking handler to check duplicate USB devices.
If virt-manager can not identify unique usb device any more
before domain startup, it will throw a tip error to tell it
is time to reattach host USB devices to get updated bus/addr info.
---
 virtManager/domain.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index 791f2af..26cff37 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
 <at>  <at>  -149,6 +149,7  <at>  <at>  class vmmDomain(vmmLibvirtObject):
         "status-changed": (GObject.SignalFlags.RUN_FIRST, None, [int, int]),
         "resources-sampled": (GObject.SignalFlags.RUN_FIRST, None, []),
         "inspection-changed": (GObject.SignalFlags.RUN_FIRST, None, []),
+        "pre-startup": (GObject.SignalFlags.RUN_FIRST, None, [])
     }

     def __init__(self, conn, backend, uuid):
 <at>  <at>  -194,6 +195,9  <at>  <at>  class vmmDomain(vmmLibvirtObject):
         self._stats_disk_supported = True
         self._stats_disk_skip = []

+        # pre_startup global flags
+        self._prestartup_hostdev_check_failed = False
+
         self.inspection = vmmInspectionData()

         if isinstance(self._backend, virtinst.Guest):
 <at>  <at>  -252,7 +256,59  <at>  <at>  class vmmDomain(vmmLibvirtObject):

         self.connect("status-changed", self._update_start_vcpus)
         self.connect("config-changed", self._reparse_xml)
+        self.connect("pre-startup", self._prestartup_nodedev_check)
+
+    #####################
+    # checking routines #
+    #####################
+
+    def attrVal(self, attr):
+        if hasattr(self, attr):
+            return getattr(self, attr)
+        return False
+
+    # class closure to initialize global variable.
+    def do_pre_startup(self):
+        if getattr(self, "_prestartup_hostdev_check_failed"):
+            self._prestartup_hostdev_check_failed = False
+            # Initialize falure reasons
+            self._hostdev_non_exist = False
+            self._hostdev_multiples = False

+    def _prestartup_nodedev_check(self, data=None):
+        for hostdev in self.get_hostdev_devices():
+            devtype = hostdev.type
+
+            if devtype != "usb":
+                continue
+
+            vendor = hostdev.vendor
+            product = hostdev.product
+            bus = hostdev.bus
+            device = hostdev.device
+
+            if vendor and product:
+                count = self.conn.get_nodedevs_number("usb_device",
+                                                      vendor,
+                                                      product)
+                if not count:
+                    self._prestartup_hostdev_check_failed = True
+                    self._hostdev_non_exist = True
+
+                elif count > 1 and not (bus and device):
+                    self._prestartup_hostdev_check_failed = True
+                    self._hostdev_multiples = True
+
+    def _prestartup_nodedev_report(self):
+        if self._prestartup_hostdev_check_failed:
+            if self.attrVal("_hostdev_non_exist"):
+                raise RuntimeError(_("Could not find any USB device"))
+
+            elif self.attrVal("_hostdev_multiples"):
+                raise RuntimeError(_("The attached USB device "
+                                     "is not unique, please remove "
+                                     "and add it again!"))
+        return;

     ###########################
     # Misc API getter methods #
 <at>  <at>  -1171,6 +1227,10  <at>  <at>  class vmmDomain(vmmLibvirtObject):
         if self.get_cloning():
             raise RuntimeError(_("Cannot start guest while cloning "
                                  "operation in progress"))
+
+        self.emit("pre-startup")
+        self._prestartup_nodedev_report()
+
         self._backend.create()
         self.idle_add(self.force_update_status)

--

-- 
1.8.1.4

Marc-André Lureau | 9 May 2013 16:07
Picon
Gravatar

[PATCH virt-viewer] Add -- to seperate program arguments to server in man / --help

Since some of the arguments are expecting following value, make it more
explicit in the man and --help that -- can seperate options from server
name or location.

https://bugzilla.redhat.com/show_bug.cgi?id=843103
---
 man/remote-viewer.pod    | 2 +-
 man/virt-viewer.pod      | 2 +-
 src/remote-viewer-main.c | 2 +-
 src/virt-viewer-main.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/man/remote-viewer.pod b/man/remote-viewer.pod
index 3bbb2e9..0a60387 100644
--- a/man/remote-viewer.pod
+++ b/man/remote-viewer.pod
 <at>  <at>  -5,7 +5,7  <at>  <at>  remote-viewer - a simple remote desktop client

 =head1 SYNOPSIS

-B<remote-viewer> [OPTIONS] URI
+B<remote-viewer> [OPTIONS] -- URI

 =head1 DESCRIPTION

diff --git a/man/virt-viewer.pod b/man/virt-viewer.pod
index e2a5754..6ed381a 100644
--- a/man/virt-viewer.pod
+++ b/man/virt-viewer.pod
 <at>  <at>  -5,7 +5,7  <at>  <at>  virt-viewer - display the graphical console for a virtual machine

 =head1 SYNOPSIS

-B<virt-viewer> [OPTIONS] DOMAIN-NAME|ID|UUID
+B<virt-viewer> [OPTIONS] -- DOMAIN-NAME|ID|UUID

 =head1 DESCRIPTION

diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index adc234e..73187d1 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
 <at>  <at>  -228,7 +228,7  <at>  <at>  main(int argc, char **argv)
         { "hotkeys", 'h', 0, G_OPTION_ARG_STRING, &hotkeys,
           N_("Customise hotkeys"), NULL },
         { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &args,
-          NULL, "URI" },
+          NULL, "-- URI" },
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };

diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index 51f8cc6..fca4626 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
 <at>  <at>  -84,7 +84,7  <at>  <at>  int main(int argc, char **argv)
         { "hotkeys", 'h', 0, G_OPTION_ARG_STRING, &hotkeys,
           N_("Customise hotkeys"), NULL },
         { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &args,
-          NULL, "DOMAIN-NAME|ID|UUID" },
+          NULL, "-- DOMAIN-NAME|ID|UUID" },
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };

--

-- 
1.8.2.1.342.gfa7285d


Gmane