mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 09:04:55 +00:00
Rebased to version 0.9.1
Support for adding usb redirection devices (Marc-André Lureau) Option to switch usb controller to support usb2.0 (Marc-André Lureau) Option to specify machine type for non-x86 guests (Li Zhang) Support for filesystem device type and write policy (Deepak C Shetty) Many bug fixes!
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ virt-manager-0.8.4.tar.gz
|
||||
/virt-manager-0.8.5.tar.gz
|
||||
/virt-manager-0.8.6.tar.gz
|
||||
/virt-manager-0.8.7.tar.gz
|
||||
/virt-manager-0.9.1.tar.gz
|
||||
|
2
sources
2
sources
@@ -1 +1 @@
|
||||
9b1f3ead125d53bf506216c4bc7c4a84 virt-manager-0.8.7.tar.gz
|
||||
cfee07b277e315b16d5180cfab5f8307 virt-manager-0.9.1.tar.gz
|
||||
|
@@ -1,32 +0,0 @@
|
||||
commit 6a14834c7d3a3fd622bb51f9ade18750267e95d3
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu Apr 28 10:39:12 2011 -0400
|
||||
|
||||
create: Bump default memory from 512 to 1024MB
|
||||
|
||||
F15 needs more than 512 or the installer crashes, pretty sure recent windows
|
||||
require at least a GB as well. Long term plan is to track a default mem value
|
||||
per OS being installed.
|
||||
|
||||
diff --git a/src/virtManager/create.py b/src/virtManager/create.py
|
||||
index 6bbe23d..f8da9f2 100644
|
||||
--- a/src/virtManager/create.py
|
||||
+++ b/src/virtManager/create.py
|
||||
@@ -42,6 +42,8 @@ OS_GENERIC = "generic"
|
||||
# Number of seconds to wait for media detection
|
||||
DETECT_TIMEOUT = 20
|
||||
|
||||
+DEFAULT_MEM = 1024
|
||||
+
|
||||
PAGE_NAME = 0
|
||||
PAGE_INSTALL = 1
|
||||
PAGE_MEM = 2
|
||||
@@ -377,7 +379,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.window.get_widget("install-import-entry").set_text("")
|
||||
|
||||
# Mem / CPUs
|
||||
- self.window.get_widget("config-mem").set_value(512)
|
||||
+ self.window.get_widget("config-mem").set_value(DEFAULT_MEM)
|
||||
self.window.get_widget("config-cpus").set_value(1)
|
||||
|
||||
# Storage
|
@@ -1,18 +0,0 @@
|
||||
commit cb56316cf3702f03b05e30f406ff3028e45f7bfb
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue Apr 5 16:21:42 2011 -0400
|
||||
|
||||
cs.po: Busted Plural-forms crashes python gettext
|
||||
|
||||
diff --git a/po/cs.po b/po/cs.po
|
||||
index d1808a7..cc13a1b 100644
|
||||
--- a/po/cs.po
|
||||
+++ b/po/cs.po
|
||||
@@ -16,7 +16,6 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
-"Plural-Forms: \n"
|
||||
|
||||
#: ../src/virt-manager.desktop.in.in.h:1
|
||||
msgid "Manage virtual machines"
|
@@ -1,35 +0,0 @@
|
||||
--- virt-manager-0.8.7/configure 2011-03-24 16:41:26.000000000 -0400
|
||||
+++ /home/crobinso/sandbox/upstream/virt-manager/virt-manager.git/configure 2011-03-29 09:27:40.115612001 -0400
|
||||
@@ -718,7 +718,7 @@ with_libvirt_package_names
|
||||
with_kvm_packages
|
||||
enable_unsupported_rhel_options
|
||||
with_preferred_distros
|
||||
-with___with_default_graphics
|
||||
+with_default_graphics
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -6521,7 +6521,9 @@ fi
|
||||
|
||||
# Check whether --enable-unsupported-rhel-options was given.
|
||||
if test "${enable_unsupported_rhel_options+set}" = set; then :
|
||||
- enableval=$enable_unsupported_rhel_options; test "x$enableval" == "xno" && ENABLE_UNSUPPORTED_RHEL_OPTS=0
|
||||
+ enableval=$enable_unsupported_rhel_options; test "x$enableval" == "xno" && \
|
||||
+ ENABLE_UNSUPPORTED_RHEL_OPTS=0 ||
|
||||
+ ENABLE_UNSUPPORTED_RHEL_OPTS=1
|
||||
else
|
||||
ENABLE_UNSUPPORTED_RHEL_OPTS=1
|
||||
fi
|
||||
@@ -6537,9 +6539,9 @@ fi
|
||||
|
||||
|
||||
|
||||
-# Check whether --with---with-default-graphics was given.
|
||||
-if test "${with___with_default_graphics+set}" = set; then :
|
||||
- withval=$with___with_default_graphics; DEFAULT_GRAPHICS=$withval
|
||||
+# Check whether --with-default-graphics was given.
|
||||
+if test "${with_default_graphics+set}" = set; then :
|
||||
+ withval=$with_default_graphics; DEFAULT_GRAPHICS=$withval
|
||||
else
|
||||
DEFAULT_GRAPHICS="vnc"
|
||||
fi
|
@@ -1,20 +0,0 @@
|
||||
commit 4922222c2c7b13704b6f461aedbee9ec06c01b5b
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue Apr 5 16:15:05 2011 -0400
|
||||
|
||||
addhw: Fix nonhotplug to running guest
|
||||
|
||||
diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py
|
||||
index 885c8b9..7fa5b6e 100644
|
||||
--- a/src/virtManager/addhardware.py
|
||||
+++ b/src/virtManager/addhardware.py
|
||||
@@ -938,7 +938,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
"Would you like to make the device available after the "
|
||||
"next VM shutdown?")),
|
||||
dialog_type=gtk.MESSAGE_WARNING,
|
||||
- buttons=gtk.BUTTONS_YES_NO)
|
||||
+ buttons=gtk.BUTTONS_YES_NO,
|
||||
+ async=False)
|
||||
|
||||
if not res:
|
||||
return (False, None)
|
@@ -1,38 +0,0 @@
|
||||
diff -rup virt-manager-0.8.7/src/virt-manager.py.in foobar/src/virt-manager.py.in
|
||||
--- virt-manager-0.8.7/src/virt-manager.py.in 2011-03-24 16:39:28.000000000 -0400
|
||||
+++ foobar/src/virt-manager.py.in 2011-03-31 11:34:02.389991998 -0400
|
||||
@@ -393,9 +393,16 @@ def main():
|
||||
dbus.glib.threads_init()
|
||||
import dbus.service
|
||||
|
||||
- # Specifically init config/gconf before the fork, so that pam
|
||||
- # doesn't think we closed the app, therefor robbing us of
|
||||
- # display access
|
||||
+ # Now we've got basic environment up & running we can fork
|
||||
+ if not options.nofork and not options.debug:
|
||||
+ drop_tty()
|
||||
+ drop_stdio()
|
||||
+
|
||||
+ # Ignore SIGHUP, otherwise a serial console closing drops the whole app
|
||||
+ signal.signal(signal.SIGHUP, signal.SIG_IGN)
|
||||
+
|
||||
+ # Initing gconf before forking makes the app lockup on f15/rawhide...
|
||||
+ # https://bugzilla.redhat.com/show_bug.cgi?id=692570
|
||||
import virtManager.config
|
||||
config = virtManager.config.vmmConfig(appname, appversion,
|
||||
gconf_dir, glade_dir,
|
||||
@@ -408,14 +415,6 @@ def main():
|
||||
config.hv_packages = hv_packages
|
||||
config.libvirt_packages = libvirt_packages
|
||||
|
||||
- # Now we've got basic environment up & running we can fork
|
||||
- if not options.nofork and not options.debug:
|
||||
- drop_tty()
|
||||
- drop_stdio()
|
||||
-
|
||||
- # Ignore SIGHUP, otherwise a serial console closing drops the whole app
|
||||
- signal.signal(signal.SIGHUP, signal.SIG_IGN)
|
||||
-
|
||||
from virtManager.engine import vmmEngine
|
||||
|
||||
gtk.window_set_default_icon_from_file(icon_dir + "/" +
|
@@ -1,436 +0,0 @@
|
||||
commit 6fa885e5831e637976487e39c877ab3a80325ee8
|
||||
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Date: Tue Apr 5 01:35:31 2011 +0200
|
||||
|
||||
addhardware: allow setting the char device target name
|
||||
|
||||
diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py
|
||||
index a8ceb78..91ece33 100644
|
||||
--- a/src/virtManager/addhardware.py
|
||||
+++ b/src/virtManager/addhardware.py
|
||||
@@ -54,6 +54,7 @@ char_widget_mappings = {
|
||||
"bind_port" : "char-bind-port",
|
||||
"bind_host" : "char-bind-host",
|
||||
"protocol" : "char-use-telnet",
|
||||
+ "target_name" : "char-target-name",
|
||||
}
|
||||
|
||||
def get_list_selection(widget):
|
||||
@@ -117,6 +118,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
"char_host_focus_in": (self.update_doc, "source_host"),
|
||||
"char_bind_host_focus_in": (self.update_doc, "bind_host"),
|
||||
"char_telnet_focus_in": (self.update_doc, "protocol"),
|
||||
+ "char_name_focus_in": (self.update_doc, "target_name"),
|
||||
})
|
||||
util.bind_escape_key_close(self)
|
||||
|
||||
@@ -443,6 +445,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.window.get_widget("char-bind-host").set_text("127.0.0.1")
|
||||
self.window.get_widget("char-bind-port").get_adjustment().value = 4556
|
||||
self.window.get_widget("char-use-telnet").set_active(False)
|
||||
+ self.window.get_widget("char-target-name").set_text("com.redhat.spice.0")
|
||||
|
||||
# Hide all notebook pages, so the wizard isn't as big as the largest
|
||||
# page
|
||||
@@ -1143,6 +1146,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
bind_host = self.window.get_widget("char-bind-host").get_text()
|
||||
source_port = self.window.get_widget("char-port").get_adjustment().value
|
||||
bind_port = self.window.get_widget("char-bind-port").get_adjustment().value
|
||||
+ target_name = self.window.get_widget("char-target-name").get_text()
|
||||
|
||||
if self.window.get_widget("char-use-telnet").get_active():
|
||||
protocol = VirtualCharDevice.CHAR_PROTOCOL_TELNET
|
||||
@@ -1156,6 +1160,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
"bind_port": bind_port,
|
||||
"bind_host": bind_host,
|
||||
"protocol": protocol,
|
||||
+ "target_name": target_name,
|
||||
}
|
||||
|
||||
try:
|
||||
diff --git a/src/vmm-add-hardware.glade b/src/vmm-add-hardware.glade
|
||||
index bbd3a42..c5087a1 100644
|
||||
--- a/src/vmm-add-hardware.glade
|
||||
+++ b/src/vmm-add-hardware.glade
|
||||
@@ -1504,7 +1504,7 @@ to connect to the virtual machine.</property>
|
||||
<child>
|
||||
<widget class="GtkTable" id="char-param-table">
|
||||
<property name="visible">True</property>
|
||||
- <property name="n_rows">5</property>
|
||||
+ <property name="n_rows">6</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">8</property>
|
||||
<property name="row_spacing">8</property>
|
||||
@@ -1520,6 +1520,34 @@ to connect to the virtual machine.</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
+ <widget class="GtkEntry" id="char-target-name">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <signal name="focus_in_event" handler="char_name_focus_in"/>
|
||||
+ </widget>
|
||||
+ <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>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="target-name-label">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <property name="label" translatable="yes">Name:</property>
|
||||
+ <property name="use_underline">True</property>
|
||||
+ <property name="mnemonic_widget">char-use-telnet</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="top_attach">5</property>
|
||||
+ <property name="bottom_attach">6</property>
|
||||
+ <property name="x_options">GTK_FILL</property>
|
||||
+ <property name="y_options"></property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
<widget class="GtkCheckButton" id="char-use-telnet">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
commit ce9a125728b6622008849dd9c35309e36104913e
|
||||
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Date: Tue Apr 5 01:35:32 2011 +0200
|
||||
|
||||
addhardware: fix adding and removing a channel device
|
||||
|
||||
diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py
|
||||
index 91ece33..885c8b9 100644
|
||||
--- a/src/virtManager/addhardware.py
|
||||
+++ b/src/virtManager/addhardware.py
|
||||
@@ -286,19 +286,6 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
video_dev = self.window.get_widget("video-model")
|
||||
uihelpers.build_video_combo(self.vm, video_dev)
|
||||
|
||||
- # Char device type
|
||||
- char_devtype = self.window.get_widget("char-device-type")
|
||||
- # Type name, desc
|
||||
- char_devtype_model = gtk.ListStore(str, str)
|
||||
- char_devtype.set_model(char_devtype_model)
|
||||
- text = gtk.CellRendererText()
|
||||
- char_devtype.pack_start(text, True)
|
||||
- char_devtype.add_attribute(text, 'text', 1)
|
||||
- for t in VirtualCharDevice.char_types:
|
||||
- desc = VirtualCharDevice.get_char_type_desc(t)
|
||||
- row = [t, desc + " (%s)" % t]
|
||||
- char_devtype_model.append(row)
|
||||
-
|
||||
# Character dev mode
|
||||
char_mode = self.window.get_widget("char-mode")
|
||||
# Mode name, desc
|
||||
@@ -358,6 +345,10 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.vm.is_hvm(),
|
||||
_("Not supported for this guest type."),
|
||||
"parallel")
|
||||
+ add_hw_option("Channel", gtk.STOCK_CONNECT, PAGE_CHAR,
|
||||
+ self.vm.is_hvm(),
|
||||
+ _("Not supported for this guest type."),
|
||||
+ "channel")
|
||||
add_hw_option("USB Host Device", "system-run", PAGE_HOSTDEV,
|
||||
self.vm.get_connection().is_nodedev_capable(),
|
||||
_("Connection does not support host device enumeration"),
|
||||
@@ -688,6 +679,23 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
def get_hw_selection(self):
|
||||
return get_list_selection(self.window.get_widget("hardware-list"))
|
||||
|
||||
+ def update_char_device_type_model(self):
|
||||
+ # Char device type
|
||||
+ char_devtype = self.window.get_widget("char-device-type")
|
||||
+ dev_type = self.get_char_type()
|
||||
+ # Type name, desc
|
||||
+ char_devtype_model = gtk.ListStore(str, str)
|
||||
+ char_devtype.clear()
|
||||
+ char_devtype.set_model(char_devtype_model)
|
||||
+ text = gtk.CellRendererText()
|
||||
+ char_devtype.pack_start(text, True)
|
||||
+ char_devtype.add_attribute(text, 'text', 1)
|
||||
+ for t in VirtualCharDevice.char_types_for_dev_type[dev_type]:
|
||||
+ desc = VirtualCharDevice.get_char_type_desc(t)
|
||||
+ row = [t, desc + " (%s)" % t]
|
||||
+ char_devtype_model.append(row)
|
||||
+ char_devtype.set_active(0)
|
||||
+
|
||||
def hw_selected(self, src=None):
|
||||
ignore = src
|
||||
self._dev = None
|
||||
@@ -707,6 +715,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.window.get_widget("hardware-info").set_text(msg)
|
||||
|
||||
if page == PAGE_CHAR:
|
||||
+ self.update_char_device_type_model()
|
||||
devtype = self.window.get_widget("char-device-type")
|
||||
self.change_char_device_type(devtype)
|
||||
|
||||
@@ -814,6 +823,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
if label == "parallel":
|
||||
return VirtualDevice.VIRTUAL_DEV_PARALLEL
|
||||
+ elif label == "channel":
|
||||
+ return VirtualDevice.VIRTUAL_DEV_CHANNEL
|
||||
return VirtualDevice.VIRTUAL_DEV_SERIAL
|
||||
|
||||
def dev_to_title(self, page):
|
||||
@@ -849,6 +860,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
def change_char_device_type(self, src):
|
||||
self.update_doc(None, None, "char_type")
|
||||
+ idx = src.get_active()
|
||||
+ if idx < 0:
|
||||
+ return
|
||||
|
||||
chartype = self.get_char_type()
|
||||
devtype = src.get_model()[src.get_active()][0]
|
||||
@@ -863,7 +877,6 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self.window.get_widget(widget_name).set_sensitive(make_visible)
|
||||
|
||||
has_mode = self._dev.supports_property("source_mode")
|
||||
-
|
||||
if has_mode and self.window.get_widget("char-mode").get_active() == -1:
|
||||
self.window.get_widget("char-mode").set_active(0)
|
||||
|
||||
diff --git a/src/virtManager/details.py b/src/virtManager/details.py
|
||||
index 69e2b1a..ca21c2d 100644
|
||||
--- a/src/virtManager/details.py
|
||||
+++ b/src/virtManager/details.py
|
||||
@@ -2752,7 +2752,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
port = chardev.target_port
|
||||
|
||||
label = devtype.capitalize()
|
||||
- if devtype != "console":
|
||||
+ if devtype not in ["console", "channel"]:
|
||||
# Don't show port for console
|
||||
label += " %s" % (int(port) + 1)
|
||||
|
||||
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
|
||||
index 9730233..7fc66ed 100644
|
||||
--- a/src/virtManager/domain.py
|
||||
+++ b/src/virtManager/domain.py
|
||||
@@ -46,6 +46,7 @@ def compare_device(origdev, newdev, idx):
|
||||
"console" : ["char_type", "target_type", "target_port"],
|
||||
"graphics" : ["type", "vmmindex"],
|
||||
"controller" : ["type", "index"],
|
||||
+ "channel" : ["char_type", "target_name"],
|
||||
}
|
||||
|
||||
if id(origdev) == id(newdev):
|
||||
@@ -713,8 +714,9 @@ class vmmDomainBase(vmmLibvirtObject):
|
||||
serials = self._build_device_list("serial")
|
||||
parallels = self._build_device_list("parallel")
|
||||
consoles = self._build_device_list("console")
|
||||
+ channels = self._build_device_list("channel")
|
||||
|
||||
- for devicelist in [serials, parallels, consoles]:
|
||||
+ for devicelist in [serials, parallels, consoles, channels]:
|
||||
devs.extend(devicelist)
|
||||
|
||||
# Don't display <console> if it's just a duplicate of <serial>
|
||||
commit 127e065d9ee7c5bee0f221352e51fb51ccff1626
|
||||
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Date: Tue Apr 5 01:35:33 2011 +0200
|
||||
|
||||
details: show char device target name
|
||||
|
||||
diff --git a/src/virtManager/details.py b/src/virtManager/details.py
|
||||
index ca21c2d..8e6e50e 100644
|
||||
--- a/src/virtManager/details.py
|
||||
+++ b/src/virtManager/details.py
|
||||
@@ -2495,6 +2495,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
target_port = chardev.target_port
|
||||
dev_type = chardev.char_type or "pty"
|
||||
src_path = chardev.source_path
|
||||
+ target_name = chardev.target_name
|
||||
primary = hasattr(chardev, "virtmanager_console_dup")
|
||||
|
||||
typelabel = ""
|
||||
@@ -2518,6 +2519,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
self.window.get_widget("char-type").set_markup(typelabel)
|
||||
self.window.get_widget("char-dev-type").set_text(dev_type)
|
||||
self.window.get_widget("char-source-path").set_text(src_path or "-")
|
||||
+ self.window.get_widget("char-target-name").set_text(target_name or "-")
|
||||
|
||||
def refresh_hostdev_page(self):
|
||||
hostdev = self.get_hw_selection(HW_LIST_COL_DEVICE)
|
||||
diff --git a/src/vmm-details.glade b/src/vmm-details.glade
|
||||
index d0d3837..d23c3da 100644
|
||||
--- a/src/vmm-details.glade
|
||||
+++ b/src/vmm-details.glade
|
||||
@@ -4681,7 +4681,7 @@ I/O:</property>
|
||||
<widget class="GtkTable" id="table37">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">3</property>
|
||||
- <property name="n_rows">2</property>
|
||||
+ <property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">8</property>
|
||||
<property name="row_spacing">4</property>
|
||||
@@ -4689,7 +4689,7 @@ I/O:</property>
|
||||
<widget class="GtkLabel" id="label503">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">1</property>
|
||||
- <property name="label" translatable="yes">Device Type:</property>
|
||||
+ <property name="label" translatable="yes">Device type:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
@@ -4700,7 +4700,7 @@ I/O:</property>
|
||||
<widget class="GtkLabel" id="label505">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">1</property>
|
||||
- <property name="label" translatable="yes">Source Path:</property>
|
||||
+ <property name="label" translatable="yes">Source path:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
@@ -4710,6 +4710,19 @@ I/O:</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
+ <widget class="GtkLabel" id="label505">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="xalign">1</property>
|
||||
+ <property name="label" translatable="yes">Target name:</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="top_attach">2</property>
|
||||
+ <property name="bottom_attach">3</property>
|
||||
+ <property name="x_options">GTK_FILL</property>
|
||||
+ <property name="y_options"></property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
<widget class="GtkLabel" id="char-dev-type">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
@@ -4739,6 +4752,22 @@ I/O:</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="char-target-name">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <property name="label" translatable="yes">label508</property>
|
||||
+ <property name="selectable">True</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="right_attach">2</property>
|
||||
+ <property name="top_attach">2</property>
|
||||
+ <property name="bottom_attach">3</property>
|
||||
+ <property name="x_options">GTK_FILL</property>
|
||||
+ <property name="y_options"></property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
commit 69ba897ac35731bf6cfca00a3e8ac30485a9855d
|
||||
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Date: Tue Apr 5 01:35:34 2011 +0200
|
||||
|
||||
details: propose to add or remove Spice agent when switching
|
||||
|
||||
crobinso: Improve metric for deciding to ask about add/remove agent
|
||||
|
||||
diff --git a/src/virtManager/details.py b/src/virtManager/details.py
|
||||
index 8e6e50e..eb5a9e5 100644
|
||||
--- a/src/virtManager/details.py
|
||||
+++ b/src/virtManager/details.py
|
||||
@@ -1850,17 +1850,54 @@ class vmmDetails(vmmGObjectUI):
|
||||
(dev_id_info, nettype, source)])
|
||||
|
||||
# Graphics options
|
||||
+ def _do_change_spicevmc(self, gdev, newgtype):
|
||||
+ has_multi_spice = (len(filter(
|
||||
+ lambda dev: dev.type == dev.TYPE_SPICE,
|
||||
+ self.vm.get_graphics_devices())) > 1)
|
||||
+ has_spicevmc = bool(filter(
|
||||
+ (lambda dev:
|
||||
+ (dev.dev_type == dev.DEV_CHANNEL and
|
||||
+ dev.char_type == dev.CHAR_SPICEVMC)),
|
||||
+ self.vm.get_char_devices()))
|
||||
+ fromspice = (gdev.type == "spice")
|
||||
+ tospice = (newgtype == "spice")
|
||||
+
|
||||
+ if fromspice and tospice:
|
||||
+ return False
|
||||
+ if not fromspice and not tospice:
|
||||
+ return False
|
||||
+
|
||||
+ print tospice, fromspice, has_spicevmc, has_multi_spice
|
||||
+
|
||||
+ if tospice and has_spicevmc:
|
||||
+ return False
|
||||
+ if fromspice and not has_spicevmc:
|
||||
+ return False
|
||||
+
|
||||
+ if fromspice and has_multi_spice:
|
||||
+ # Don't offer to remove if there are other spice displays
|
||||
+ return False
|
||||
+
|
||||
+ msg = (_("You are switching graphics type to %(gtype)s, "
|
||||
+ "would you like to %(action)s Spice agent channels?") %
|
||||
+ {"gtype": newgtype,
|
||||
+ "action": fromspice and "remove" or "add"})
|
||||
+ return self.err.yes_no(msg)
|
||||
+
|
||||
def config_graphics_apply(self, dev_id_info):
|
||||
gtype = self.get_combo_label_value("gfx-type")
|
||||
passwd = self.window.get_widget("gfx-password").get_text() or None
|
||||
keymap = self.get_combo_label_value("gfx-keymap")
|
||||
|
||||
+ change_spicevmc = self._do_change_spicevmc(dev_id_info, gtype)
|
||||
+
|
||||
return self._change_config_helper([self.vm.define_graphics_password,
|
||||
self.vm.define_graphics_keymap,
|
||||
self.vm.define_graphics_type],
|
||||
[(dev_id_info, passwd),
|
||||
(dev_id_info, keymap),
|
||||
- (dev_id_info, gtype)],
|
||||
+ (dev_id_info, gtype,
|
||||
+ change_spicevmc)],
|
||||
[self.vm.hotplug_graphics_password],
|
||||
[(dev_id_info, passwd)])
|
||||
|
||||
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
|
||||
index 7fc66ed..a4d2f5c 100644
|
||||
--- a/src/virtManager/domain.py
|
||||
+++ b/src/virtManager/domain.py
|
||||
@@ -26,6 +26,7 @@ import threading
|
||||
import gobject
|
||||
|
||||
import virtinst
|
||||
+from virtinst.VirtualCharDevice import VirtualCharSpicevmcDevice
|
||||
from virtManager import util
|
||||
import virtinst.support as support
|
||||
|
||||
@@ -450,9 +451,20 @@ class vmmDomainBase(vmmLibvirtObject):
|
||||
def change(editdev):
|
||||
editdev.keymap = newval
|
||||
return self._redefine_device(change, devobj)
|
||||
- def define_graphics_type(self, devobj, newval):
|
||||
+ def define_graphics_type(self, devobj, newval, spicevmc):
|
||||
def change(editdev):
|
||||
editdev.type = newval
|
||||
+ if spicevmc:
|
||||
+ guest = self._get_guest_to_define()
|
||||
+ if newval == "spice":
|
||||
+ guest.add_device(VirtualCharSpicevmcDevice(guest.conn))
|
||||
+ else:
|
||||
+ channels = guest.get_devices("channel")
|
||||
+ channels = filter(lambda x: x.char_type ==
|
||||
+ virtinst.VirtualCharDevice.CHAR_SPICEVMC, channels)
|
||||
+ for dev in channels:
|
||||
+ guest.remove_device(dev)
|
||||
+
|
||||
return self._redefine_device(change, devobj)
|
||||
|
||||
def define_sound_model(self, devobj, newmodel):
|
@@ -1,23 +0,0 @@
|
||||
diff -rup virt-manager-0.8.7/src/virtManager/connection.py tmp/src/virtManager/connection.py
|
||||
--- virt-manager-0.8.7/src/virtManager/connection.py 2011-03-24 16:39:28.000000000 -0400
|
||||
+++ tmp/src/virtManager/connection.py 2011-04-28 10:45:19.836484967 -0400
|
||||
@@ -1319,15 +1319,15 @@ class vmmConnection(vmmGObject):
|
||||
try:
|
||||
check_obj(name, True)
|
||||
except:
|
||||
- logging.exception("Couldn't fetch active "
|
||||
- "interface '%s'" % name)
|
||||
+ #logging.debug("Couldn't fetch active interface '%s'" % name)
|
||||
+ pass
|
||||
|
||||
for name in newInactiveNames:
|
||||
try:
|
||||
check_obj(name, False)
|
||||
except:
|
||||
- logging.exception("Couldn't fetch inactive "
|
||||
- "interface '%s'" % name)
|
||||
+ #logging.debug("Couldn't fetch inactive interface '%s'" % name)
|
||||
+ pass
|
||||
|
||||
return (stop, start, orig, new, current)
|
||||
|
@@ -1,9 +1,9 @@
|
||||
# -*- rpm-spec -*-
|
||||
|
||||
%define _package virt-manager
|
||||
%define _version 0.8.7
|
||||
%define _release 6
|
||||
%define virtinst_version 0.500.6-2
|
||||
%define _version 0.9.1
|
||||
%define _release 1
|
||||
%define virtinst_version 0.600.1
|
||||
|
||||
%define qemu_user "qemu"
|
||||
%define preferred_distros "fedora,rhel"
|
||||
@@ -12,7 +12,9 @@
|
||||
%define disable_unsupported_rhel 0
|
||||
%define default_graphics "spice"
|
||||
|
||||
%define with_guestfs 0
|
||||
%define with_spice 1
|
||||
%define with_tui 0
|
||||
|
||||
# End local config
|
||||
|
||||
@@ -25,26 +27,13 @@
|
||||
Name: %{_package}
|
||||
Version: %{_version}
|
||||
Release: %{_release}%{_extra_release}
|
||||
Summary: Virtual Machine Manager
|
||||
%define verrel %{version}-%{release}
|
||||
|
||||
Summary: Virtual Machine Manager
|
||||
Group: Applications/Emulators
|
||||
License: GPLv2+
|
||||
URL: http://virt-manager.org/
|
||||
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
||||
# Fix using spice as default graphics type
|
||||
Patch1: %{name}-fix-config-options.patch
|
||||
# Fix lockup as non-root (bz 692570)
|
||||
Patch2: %{name}-gconf-after-fork.patch
|
||||
# Fix broken cs.po which crashed gettext
|
||||
Patch3: %{name}-fix-broken-cspo.patch
|
||||
# Fix offline attach fallback if hotplug fails
|
||||
Patch4: %{name}-fix-hotplug-fallback.patch
|
||||
# Offer to attach spicevmc if switching to spice
|
||||
Patch5: %{name}-spicevmc.patch
|
||||
# Stop netcf errors from flooding logs (bz 676920)
|
||||
Patch6: %{name}-stop-netcf-flood.patch
|
||||
# Bump default mem for new guests to 1GB so F15 installs work (bz 700480)
|
||||
Patch7: %{name}-bump-default-mem.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -70,8 +59,6 @@ Requires: libxml2-python >= 2.6.23
|
||||
Requires: python-virtinst >= %{virtinst_version}
|
||||
# Required for loading the glade UI
|
||||
Requires: pygtk2-libglade
|
||||
# Required for our graphics which are currently SVG format
|
||||
Requires: librsvg2
|
||||
# Earlier vte had broken python binding module
|
||||
Requires: vte >= 0.12.2
|
||||
# For online help
|
||||
@@ -89,10 +76,21 @@ Requires: PolicyKit-gnome
|
||||
%if %{with_spice}
|
||||
Requires: spice-gtk-python
|
||||
%endif
|
||||
%if %{with_guestfs}
|
||||
Requires: python-libguestfs
|
||||
%endif
|
||||
|
||||
%if %{with_tui} == 0
|
||||
Obsoletes: virt-manager-common <= %{verrel}
|
||||
Conflicts: virt-manager-common > %{verrel}
|
||||
%else
|
||||
Requires: virt-manager-common = %{verrel}
|
||||
%endif
|
||||
|
||||
BuildRequires: gettext
|
||||
BuildRequires: scrollkeeper
|
||||
BuildRequires: intltool
|
||||
BuildRequires: GConf2
|
||||
|
||||
Requires(pre): GConf2
|
||||
Requires(post): GConf2
|
||||
@@ -100,6 +98,10 @@ Requires(preun): GConf2
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
|
||||
%if %{with_spice}
|
||||
%define default_graphics "spice"
|
||||
%endif
|
||||
|
||||
%description
|
||||
Virtual Machine Manager provides a graphical tool for administering virtual
|
||||
machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices,
|
||||
@@ -107,15 +109,39 @@ connect to a graphical or serial console, and see resource usage statistics
|
||||
for existing VMs on local or remote machines. Uses libvirt as the backend
|
||||
management API.
|
||||
|
||||
# TUI package setup
|
||||
%if %{with_tui}
|
||||
%package tui
|
||||
Summary: Virtual Machine Manager text user interface
|
||||
Group: Applications/Emulators
|
||||
|
||||
Requires: virt-manager-common = %{verrel}
|
||||
Requires: python-newt_syrup >= 0.1.2
|
||||
Requires: libuser-python
|
||||
Requires: python-IPy
|
||||
|
||||
%description tui
|
||||
An interactive text user interface for Virtual Machine Manager.
|
||||
|
||||
%package common
|
||||
Summary: Common files used by the different Virtual Machine Manager interfaces
|
||||
Group: Applications/Emulators
|
||||
|
||||
# This version not strictly required: virt-manager should work with older,
|
||||
# however varying amounts of functionality will not be enabled.
|
||||
Requires: libvirt-python >= 0.7.0
|
||||
Requires: dbus-python
|
||||
# Minimum we've tested with
|
||||
Requires: libxml2-python >= 2.6.23
|
||||
# Absolutely require this version or later
|
||||
Requires: python-virtinst >= %{virtinst_version}
|
||||
|
||||
%description common
|
||||
Common files used by the different Virtual Machine Manager interfaces.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
%if %{qemu_user}
|
||||
@@ -138,17 +164,22 @@ management API.
|
||||
%define _disable_unsupported_rhel --disable-unsupported-rhel-options
|
||||
%endif
|
||||
|
||||
%if %{default_graphics}
|
||||
%if %{?default_graphics}
|
||||
%define _default_graphics --with-default-graphics=%{default_graphics}
|
||||
%endif
|
||||
|
||||
%if %{with_tui}
|
||||
%define _tui_opt --with-tui
|
||||
%else
|
||||
%define _tui_opt --without-tui
|
||||
%endif
|
||||
|
||||
%configure --without-tui \
|
||||
%configure %{?_tui_opt} \
|
||||
%{?_qemu_user} \
|
||||
%{?_kvm_packages} \
|
||||
%{?_libvirt_packages} \
|
||||
%{?_preferred_distros} \
|
||||
%{?_enable_unsupported_rhel} \
|
||||
%{?_disable_unsupported_rhel} \
|
||||
%{?_default_graphics}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@@ -162,36 +193,31 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
if [ "$1" -gt 1 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-uninstall-rule \
|
||||
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
|
||||
fi
|
||||
%gconf_schema_prepare %{name}
|
||||
|
||||
%post
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-install-rule \
|
||||
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
|
||||
|
||||
update-desktop-database %{_datadir}/applications
|
||||
|
||||
# Revive when we update help docs
|
||||
#if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q -o %{_datadir}/omf/%{name}; fi
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
update-desktop-database -q %{_datadir}/applications
|
||||
%gconf_schema_upgrade %{name}
|
||||
|
||||
%postun
|
||||
update-desktop-database %{_datadir}/applications
|
||||
|
||||
# Revive when we update help docs
|
||||
#if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q; fi
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
fi
|
||||
update-desktop-database -q %{_datadir}/applications
|
||||
|
||||
%preun
|
||||
if [ "$1" -eq 0 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
gconftool-2 --makefile-uninstall-rule \
|
||||
%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
|
||||
fi
|
||||
%gconf_schema_remove %{name}
|
||||
|
||||
%posttrans
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
%if %{with_tui}
|
||||
%files
|
||||
%else
|
||||
%files -f %{name}.lang
|
||||
%endif
|
||||
%defattr(-,root,root,-)
|
||||
%doc README COPYING COPYING-DOCS AUTHORS ChangeLog NEWS
|
||||
%{_sysconfdir}/gconf/schemas/%{name}.schemas
|
||||
@@ -200,30 +226,47 @@ fi
|
||||
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
|
||||
%if %{with_tui} == 0
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/*.glade
|
||||
%{_datadir}/%{name}/*.py*
|
||||
|
||||
%dir %{_datadir}/%{name}/pixmaps/
|
||||
%{_datadir}/%{name}/pixmaps/*.png
|
||||
%{_datadir}/%{name}/pixmaps/*.svg
|
||||
|
||||
%dir %{_datadir}/%{name}/pixmaps/hicolor/
|
||||
%dir %{_datadir}/%{name}/pixmaps/hicolor/*/
|
||||
%dir %{_datadir}/%{name}/pixmaps/hicolor/*/*/
|
||||
%{_datadir}/%{name}/pixmaps/hicolor/*/*/*.png
|
||||
|
||||
%dir %{_datadir}/%{name}/virtManager/
|
||||
%{_datadir}/%{name}/virtManager/*.py*
|
||||
%endif
|
||||
|
||||
# Revive when we update help docs
|
||||
#%{_datadir}/omf/%{name}/
|
||||
#%{_datadir}/gnome/help/%{name}
|
||||
%{_datadir}/%{name}/*.glade
|
||||
%{_datadir}/%{name}/%{name}.py*
|
||||
|
||||
%{_datadir}/%{name}/icons
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/dbus-1/services/%{name}.service
|
||||
|
||||
%if %{with_tui}
|
||||
%files common -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/virtManager/
|
||||
|
||||
%{_datadir}/%{name}/virtManager/*.py*
|
||||
|
||||
%files tui
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%{_bindir}/%{name}-tui
|
||||
%{_datadir}/%{name}/%{name}-tui.py*
|
||||
|
||||
%{_datadir}/%{name}/virtManagerTui
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Feb 01 2012 Cole Robinson <crobinso@redhat.com> - 0.9.1-1
|
||||
- Rebased to version 0.9.1
|
||||
- Support for adding usb redirection devices (Marc-André Lureau)
|
||||
- Option to switch usb controller to support usb2.0 (Marc-André Lureau)
|
||||
- Option to specify machine type for non-x86 guests (Li Zhang)
|
||||
- Support for filesystem device type and write policy (Deepak C Shetty)
|
||||
- Many bug fixes!
|
||||
|
||||
* Mon Aug 08 2011 Cole Robinson <crobinso@redhat.com> - 0.8.7-6
|
||||
- Bump release to build a new package since old one was never pushed
|
||||
- Stop netcf errors from flooding logs
|
||||
|
Reference in New Issue
Block a user