OBS User unknown 2008-04-12 19:33:47 +00:00 committed by Git OBS Bridge
parent ddd44b391b
commit 7853f80bee
12 changed files with 308 additions and 53 deletions

1
ready
View File

@ -1 +0,0 @@
dpmerrill submitted this package from Provo autobuild.

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Apr 9 11:07:56 MDT 2008 - dpmerrill@novell.com
- Changed vnc settings to prevent screen-saver lockup (bnc#253264)
- Added read-only option in Details->Hardware for adding cdroms
to prevent libvirt exceptions. (bnc#368204) (bnc#361990)
-------------------------------------------------------------------
Fri Apr 4 17:52:11 MDT 2008 - dpmerrill@novell.com
- Removed Virtual Network tab from host details page (bnc#364514)
-------------------------------------------------------------------
Wed Apr 2 11:28:02 MDT 2008 - dpmerrill@novell.com
- Fixed adding a virtual network to a vm (bnc#302663)
Also fixed errors caused by new dbus-1 release
-------------------------------------------------------------------
Wed Mar 12 11:36:51 MDT 2008 - dpmerrill@novell.com
- Added warning for attempting multiple installs (bnc#368278)
-------------------------------------------------------------------
Wed Feb 20 13:59:20 MST 2008 - dpmerrill@novell.com

View File

@ -19,7 +19,7 @@ Name: virt-manager
%define virtinst_rel 2
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
Version: 0.5.3
Release: 4
Release: 5
Summary: Virtual Machine Manager
Group: System/Monitoring
License: GPL v2 or later
@ -31,10 +31,14 @@ Source1: %{virtinst_name}.tar.gz
Patch0: virtman-desktop.diff
Patch1: virtman-dbus-query.diff
Patch2: virtman-xen-uri.diff
Patch3: virtman-vminstall.diff
Patch4: virtman-pointer.diff
Patch5: virtman-detect.diff
Patch6: virtman-timewatch.diff
Patch3: virtman-pointer.diff
Patch4: virtman-detect.diff
Patch5: virtman-timewatch.diff
Patch6: virtman-vminstall.diff
Patch7: virtman-vif.diff
Patch8: virtman-hardware.diff
Patch50: virtinst-vif.diff
Patch100: virtman-misc.diff
# These two are just the oldest version tested
# Requires: pygtk2 >= 1.99.12-6
Requires: python-gtk
@ -110,6 +114,12 @@ Authors:
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch100 -p1
pushd $RPM_BUILD_DIR/%{virtinst_name}
%patch50 -p1
popd
%build
# autoreconf -i
@ -193,6 +203,17 @@ fi
%dir %{_datadir}/applications/YaST2
%changelog
* Wed Apr 09 2008 dpmerrill@novell.com
- Changed vnc settings to prevent screen-saver lockup (bnc#253264)
- Added read-only option in Details->Hardware for adding cdroms
to prevent libvirt exceptions. (bnc#368204) (bnc#361990)
* Fri Apr 04 2008 dpmerrill@novell.com
- Removed Virtual Network tab from host details page (bnc#364514)
* Wed Apr 02 2008 dpmerrill@novell.com
- Fixed adding a virtual network to a vm (bnc#302663)
Also fixed errors caused by new dbus-1 release
* Wed Mar 12 2008 dpmerrill@novell.com
- Added warning for attempting multiple installs (bnc#368278)
* Wed Feb 20 2008 dpmerrill@novell.com
- Added virtman-timewatch to minimize window after
- inactivity to work around memory leaks in GTK and DBus

45
virtinst-vif.diff Normal file
View File

@ -0,0 +1,45 @@
diff -Nuar virtinst-0.300.2.orig/virtinst/Guest.py virtinst-0.300.2/virtinst/Guest.py
--- virtinst-0.300.2.orig/virtinst/Guest.py 2008-01-10 18:33:32.000000000 -0700
+++ virtinst-0.300.2/virtinst/Guest.py 2008-04-01 16:51:11.000000000 -0600
@@ -257,6 +257,10 @@
self.type = type
self.bridge = bridge
self.network = network
+
+ if self.type == "ethernet":
+ self.type = "bridge"
+
if self.type == "network":
if network is None:
raise ValueError, _("A network name was not provided")
@@ -309,16 +313,23 @@
print >> sys.stderr, msg
logging.warning(msg)
- if not self.bridge and self.type == "bridge":
- self.bridge = util.default_bridge()
+ # if not self.bridge and self.type == "bridge":
+ # self.bridge = util.default_bridge()
def get_xml_config(self):
if self.type == "bridge":
- return (" <interface type='bridge'>\n" + \
- " <source bridge='%(bridge)s'/>\n" + \
- " <mac address='%(mac)s'/>\n" + \
- " </interface>\n") % \
- { "bridge": self.bridge, "mac": self.macaddr }
+ if self.bridge != None:
+ return (" <interface type='bridge'>\n" + \
+ " <source bridge='%(bridge)s'/>\n" + \
+ " <mac address='%(mac)s'/>\n" + \
+ " </interface>\n") % \
+ { "bridge": self.bridge, "mac": self.macaddr }
+ else:
+ return (" <interface type='bridge'>\n" + \
+ " <mac address='%(mac)s'/>\n" + \
+ " </interface>\n") % \
+ { "mac": self.macaddr }
+
elif self.type == "network":
return (" <interface type='network'>\n" + \
" <source network='%(network)s'/>\n" + \

View File

@ -1,11 +1,11 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.5.3/src/virtManager/connection.py
--- virt-manager-0.5.3.orig/src/virtManager/connection.py 2008-02-20 14:13:33.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/connection.py 2008-02-20 14:14:31.000000000 -0700
@@ -136,6 +136,20 @@
--- virt-manager-0.5.3.orig/src/virtManager/connection.py 2008-03-31 14:32:40.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/connection.py 2008-03-31 15:23:14.000000000 -0600
@@ -136,6 +136,19 @@
self.detect_network_devices()
+ # A bug in hal prevents us from calling QueryCapability on devices
+ # A bug in hal/dbus prevents us from calling QueryCapability on devices
+ # this is a temporary workaround that can be removed when we get
+ # a newer hald/hald_dbus.c
+ def _query_capability(self, device_interface, str_capability):
@ -17,23 +17,37 @@ diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.
+ if str_capability in cap_set:
+ return True
+ return False
+
+
def detect_network_devices(self):
try:
# Get a connection to the SYSTEM bus
@@ -161,7 +175,7 @@
@@ -165,9 +178,11 @@
def _device_added(self, path):
obj = self.bus.get_object("org.freedesktop.Hal", path)
- if obj.QueryCapability("net"):
+ if self._query_capability(obj,"net"):
name = obj.GetPropertyString("net.interface")
mac = obj.GetPropertyString("net.address")
- name = obj.GetPropertyString("net.interface")
- mac = obj.GetPropertyString("net.address")
+ iface = dbus.Interface(obj,"org.freedesktop.Hal.Device")
+ iface.PropertyExists('info.capabilities')
+ if self._query_capability(iface,"net"):
+ name = iface.GetPropertyString("net.interface")
+ mac = iface.GetPropertyString("net.address")
# Now magic to determine if the device is part of a bridge
shared = False
@@ -175,7 +190,7 @@
try:
# XXX Linux specific - needs porting for other OS - patches
# welcomed...
- sysfspath = obj.GetPropertyString("linux.sysfs_path")
+ sysfspath = iface.GetPropertyString("linux.sysfs_path")
# If running a device in bridged mode, there's a reasonable
# chance that the actual ethernet device has been renamed to
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py virt-manager-0.5.3/src/virtManager/opticalhelper.py
--- virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py 2008-02-20 14:13:33.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/opticalhelper.py 2008-02-20 14:14:57.000000000 -0700
--- virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py 2008-01-10 18:17:51.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/opticalhelper.py 2008-03-31 15:24:16.000000000 -0600
@@ -41,6 +41,19 @@
self.hal_iface = None
raise
@ -54,12 +68,49 @@ diff -Nuar virt-manager-0.5.3.orig/src/virtManager/opticalhelper.py virt-manager
def populate_opt_media(self):
# get a list of optical devices with data discs in, for FV installs
vollabel = {}
@@ -71,7 +84,7 @@
@@ -52,10 +65,11 @@
# Find info about all current present media
for d in self.hal_iface.FindDeviceByCapability("volume"):
vol = self.bus.get_object("org.freedesktop.Hal", d)
- if vol.GetPropertyBoolean("volume.is_disc") and \
- vol.GetPropertyBoolean("volume.disc.has_data"):
- devnode = vol.GetProperty("block.device")
- label = vol.GetProperty("volume.label")
+ iface = dbus.Interface(vol,"org.freedesktop.Hal.Device")
+ if iface.GetPropertyBoolean("volume.is_disc") and \
+ iface.GetPropertyBoolean("volume.disc.has_data"):
+ devnode = iface.GetProperty("block.device")
+ label = iface.GetProperty("volume.label")
if label == None or len(label) == 0:
label = devnode
vollabel[devnode] = label
@@ -63,7 +77,9 @@
for d in self.hal_iface.FindDeviceByCapability("storage.cdrom"):
dev = self.bus.get_object("org.freedesktop.Hal", d)
- devnode = dev.GetProperty("block.device")
+ iface = dbus.Interface(dev,"org.freedesktop.Hal.Device")
+ iface.PropertyExists('info.capabilities')
+ devnode = iface.GetProperty("block.device")
if vollabel.has_key(devnode):
self.model.append([devnode, vollabel[devnode], True, volpath[devnode]])
else:
@@ -71,11 +87,13 @@
def _device_added(self, path):
vol = self.bus.get_object("org.freedesktop.Hal", path)
- if vol.QueryCapability("volume"):
+ if self._query_capability(vol,"volume"):
if vol.GetPropertyBoolean("volume.is_disc") and \
vol.GetPropertyBoolean("volume.disc.has_data"):
devnode = vol.GetProperty("block.device")
- if vol.GetPropertyBoolean("volume.is_disc") and \
- vol.GetPropertyBoolean("volume.disc.has_data"):
- devnode = vol.GetProperty("block.device")
- label = vol.GetProperty("volume.label")
+ iface = dbus.Interface(vol,"org.freedesktop.Hal.Device")
+ iface.PropertyExists('info.capabilities')
+ if self._query_capability(iface,"volume"):
+ if iface.GetPropertyBoolean("volume.is_disc") and \
+ iface.GetPropertyBoolean("volume.disc.has_data"):
+ devnode = iface.GetProperty("block.device")
+ label = iface.GetProperty("volume.label")
if label == None or len(label) == 0:
label = devnode

View File

@ -1,7 +1,7 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.5.3/src/virtManager/connection.py
--- virt-manager-0.5.3.orig/src/virtManager/connection.py 2008-02-12 11:32:25.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/connection.py 2008-02-12 11:36:04.000000000 -0700
@@ -156,13 +156,17 @@
@@ -158,13 +158,17 @@
hal_object = self.bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/Manager')
self.hal_iface = dbus.Interface(hal_object, 'org.freedesktop.Hal.Manager')

12
virtman-hardware.diff Normal file
View File

@ -0,0 +1,12 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/addhardware.py virt-manager-0.5.3/src/virtManager/addhardware.py
--- virt-manager-0.5.3.orig/src/virtManager/addhardware.py 2008-04-09 11:04:13.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/addhardware.py 2008-04-09 11:06:27.000000000 -0600
@@ -840,6 +840,8 @@
model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "Virtual disk"])
#model.append(["usb", virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "USB disk"])
else:
+ # add read-only option to prevent libvirt exceptions when adding a cdrom as read/write
+ model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_CDROM, gtk.STOCK_CDROM, "Virtual disk (read-only)"])
model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "Virtual disk"])
def populate_input_model(self, model):

24
virtman-misc.diff Normal file
View File

@ -0,0 +1,24 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/addhardware.py virt-manager-0.5.3/src/virtManager/addhardware.py
--- virt-manager-0.5.3.orig/src/virtManager/addhardware.py 2008-04-01 15:45:42.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/addhardware.py 2008-04-01 15:48:23.000000000 -0600
@@ -704,7 +704,7 @@
device=device)
if self._disk.type == virtinst.VirtualDisk.TYPE_FILE and \
not self.vm.is_hvm() and virtinst.util.is_blktap_capable():
- disk.driver_name = virtinst.VirtualDisk.DRIVER_TAP
+ self._disk.driver_name = virtinst.VirtualDisk.DRIVER_TAP
except ValueError, e:
self._validation_error_box(_("Invalid Storage Parameters"), \
str(e))
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/details.py virt-manager-0.5.3/src/virtManager/details.py
--- virt-manager-0.5.3.orig/src/virtManager/details.py 2008-01-10 18:17:51.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/details.py 2008-04-01 15:48:40.000000000 -0600
@@ -553,7 +553,7 @@
else:
vnic = virtinst.VirtualNetworkInterface(type=netinfo[0], macaddr=netinfo[3])
except ValueError, e:
- self.err_dialog(_("Error Removing Network: %s" % str(e)),
+ self._err_dialog(_("Error Removing Network: %s" % str(e)),
"".join(traceback.format_exc()))
return

View File

@ -1,11 +1,22 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/console.py virt-manager-0.5.3/src/virtManager/console.py
--- virt-manager-0.5.3.orig/src/virtManager/console.py 2008-02-11 14:30:07.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/console.py 2008-02-11 14:31:06.000000000 -0700
@@ -84,7 +84,8 @@
else:
self.vncViewer.set_keyboard_grab(False)
self.vncViewer.set_pointer_grab(False)
--- virt-manager-0.5.3.orig/src/virtManager/console.py 2008-01-10 18:17:51.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/console.py 2008-04-09 11:02:33.000000000 -0600
@@ -78,13 +78,13 @@
self.window.get_widget("console-vnc-align").add(self.vncViewer)
self.vncViewer.realize()
self.vncTunnel = None
- if self.config.get_console_keygrab() == 2:
- self.vncViewer.set_keyboard_grab(True)
- self.vncViewer.set_pointer_grab(True)
- else:
- self.vncViewer.set_keyboard_grab(False)
- self.vncViewer.set_pointer_grab(False)
- self.vncViewer.set_pointer_local(True)
+ # change to always set grab flags as False
+ # setting them to true raises the error of Dom0 screen-saver losing the pointer
+ # if the pointer is over DomU when screen saver activates
+ self.vncViewer.set_keyboard_grab(False)
+ self.vncViewer.set_pointer_grab(False)
+ # comment set_pointer_local to prevent 2 pointers in vnc viewer
+ # self.vncViewer.set_pointer_local(True)

View File

@ -32,7 +32,7 @@ diff -Nuar virt-manager-0.5.3.orig/src/virtManager/config.py virt-manager-0.5.3/
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.5.3/src/virtManager/connection.py
--- virt-manager-0.5.3.orig/src/virtManager/connection.py 2008-02-20 10:23:45.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/connection.py 2008-02-20 11:53:08.000000000 -0700
@@ -467,7 +467,7 @@
@@ -469,7 +469,7 @@
os.remove(frm)
return status
@ -41,7 +41,7 @@ diff -Nuar virt-manager-0.5.3.orig/src/virtManager/connection.py virt-manager-0.
if self.state != self.STATE_ACTIVE:
return
@@ -488,11 +488,12 @@
@@ -490,11 +490,12 @@
logging.warn("Unable to list inactive networks")
# check of net devices

63
virtman-vif.diff Normal file
View File

@ -0,0 +1,63 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/addhardware.py virt-manager-0.5.3/src/virtManager/addhardware.py
--- virt-manager-0.5.3.orig/src/virtManager/addhardware.py 2008-04-04 15:52:00.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/addhardware.py 2008-04-04 15:53:17.000000000 -0600
@@ -122,7 +122,7 @@
network_list.add_attribute(text, 'text', 1)
device_list = self.window.get_widget("net-device")
- device_model = gtk.ListStore(str, bool)
+ device_model = gtk.ListStore(str, bool, str)
device_list.set_model(device_model)
text = gtk.CellRendererText()
device_list.pack_start(text, True)
@@ -313,7 +313,7 @@
else:
dev = self.window.get_widget("net-device")
model = dev.get_model()
- return ["bridge", model.get_value(dev.get_active_iter(), 0)]
+ return ["bridge", model.get_value(dev.get_active_iter(), 2)]
def get_config_macaddr(self):
macaddr = None
@@ -348,7 +348,10 @@
net = self.get_config_network()
if net[0] == "bridge":
self.window.get_widget("summary-net-type").set_text(_("Shared physical device"))
- self.window.get_widget("summary-net-target").set_text(net[1])
+ if net[1] != None:
+ self.window.get_widget("summary-net-target").set_text(net[1])
+ else:
+ self.window.get_widget("summary-net-target").set_text(_("Default"))
elif net[0] == "network":
self.window.get_widget("summary-net-type").set_text(_("Virtual network"))
self.window.get_widget("summary-net-target").set_text(net[1])
@@ -816,13 +819,14 @@
def populate_device_model(self, model):
model.clear()
hasShared = False
+ model.append([_("(Default)"), True, None])
for name in self.vm.get_connection().list_net_device_paths():
net = self.vm.get_connection().get_net_device(name)
if net.is_shared():
hasShared = True
- model.append(["%s (%s %s)" % (net.get_name(), _("Bridge"), net.get_bridge()), True])
+ model.append(["%s (%s %s)" % (net.get_name(), _("Bridge"), net.get_bridge()), True, net.get_bridge()])
else:
- model.append(["%s (%s)" % (net.get_name(), _("Not bridged")), False])
+ model.append(["%s (%s)" % (net.get_name(), _("Not bridged")), False, net.get_name()])
return hasShared
def populate_target_device_model(self, model):
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/host.py virt-manager-0.5.3/src/virtManager/host.py
--- virt-manager-0.5.3.orig/src/virtManager/host.py 2008-01-10 18:17:51.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/host.py 2008-04-04 15:54:26.000000000 -0600
@@ -75,6 +75,9 @@
self.window.get_widget("performance-table").attach(self.memory_usage_graph, 1, 2, 1, 2)
self.add = None
+ # turn off "Virtual Networks" tab, until it is implemented...
+ self.window.get_widget("details-tabs").get_nth_page(1).hide()
+
self.window.get_widget("details-tabs").get_nth_page(2).hide()
self.conn.connect("net-added", self.repopulate_networks)

View File

@ -1,6 +1,6 @@
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/engine.py virt-manager-0.5.3/src/virtManager/engine.py
--- virt-manager-0.5.3.orig/src/virtManager/engine.py 2008-02-03 17:05:01.000000000 -0700
+++ virt-manager-0.5.3/src/virtManager/engine.py 2008-02-03 17:05:23.000000000 -0700
--- virt-manager-0.5.3.orig/src/virtManager/engine.py 2008-03-12 15:21:57.000000000 -0600
+++ virt-manager-0.5.3/src/virtManager/engine.py 2008-03-12 17:43:02.000000000 -0600
@@ -34,7 +34,7 @@
from virtManager.details import vmmDetails
from virtManager.console import vmmConsole
@ -10,30 +10,36 @@ diff -Nuar virt-manager-0.5.3.orig/src/virtManager/engine.py virt-manager-0.5.3/
from virtManager.serialcon import vmmSerialConsole
from virtManager.host import vmmHost
from virtManager.error import vmmErrorDialog
@@ -52,7 +52,7 @@
self.windowConnect = None
self.windowPreferences = None
self.windowAbout = None
- self.windowCreate = None
+ self.windowCreate = {}
self.windowManager = None
self.connections = {}
@@ -311,16 +311,25 @@
def show_manager(self):
self.get_manager().show()
@@ -311,10 +311,15 @@
con = self.get_connection(uri)
- def show_create(self, uri):
- con = self.get_connection(uri)
+ def _vmmcreate_closing(self,signal,key):
+ self.windowCreate= None;
if self.connections[uri]["windowCreate"] == None:
- if self.connections[uri]["windowCreate"] == None:
- create = vmmCreate(self.get_config(), con)
+ key = 0
+ while self.windowCreate.has_key( key ):
+ key += 1
+ create = vmmCreate(virtman=True, key=key)
+ self.windowCreate[key] = create
+ def show_create(self, uri):
+ if self.windowCreate == None:
+ create = vmmCreate(virtman=True,key=0)
create.connect("action-show-console", self._do_show_console)
create.connect("action-show-terminal", self._do_show_terminal)
- create.connect("action-show-help", self._do_show_help)
+ # make sure the help matches before showing it
+ # create.connect("action-show-help", self._do_show_help)
self.connections[uri]["windowCreate"] = create
self.connections[uri]["windowCreate"].show()
- self.connections[uri]["windowCreate"] = create
- self.connections[uri]["windowCreate"].show()
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
+ self.windowCreate = create
+ self.windowCreate.show()
+ else:
+ message_box = gtk.MessageDialog(None,
+ gtk.DIALOG_MODAL,
+ gtk.MESSAGE_WARNING,
+ gtk.BUTTONS_OK,
+ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
+ message_box.run()
+ message_box.destroy()
def add_connection(self, uri, readOnly=None):
conn = vmmConnection(self.get_config(), uri, readOnly)