This commit is contained in:
parent
ad2e0bd97c
commit
76bc58284a
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 16 09:26:23 MDT 2007 - ccoffing@novell.com
|
||||
|
||||
- #300789: Could not add or change disks
|
||||
- Drop unused patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 3 10:46:58 MDT 2007 - chuck@novell.com
|
||||
|
||||
|
@ -19,7 +19,7 @@ License: GPL v2 or later
|
||||
Group: System/Monitoring
|
||||
Autoreqprov: yes
|
||||
Version: 0.4.0
|
||||
Release: 37
|
||||
Release: 45
|
||||
Summary: Virtual Machine Manager
|
||||
Source0: virt-manager.tar.bz2
|
||||
Source1: virtinst.tar.bz2
|
||||
@ -30,7 +30,6 @@ Patch12: virtman-console-keys.diff
|
||||
Patch13: virtman-detach-yast.diff
|
||||
Patch14: virtman-install.diff
|
||||
Patch15: virtman-edit.diff
|
||||
Patch100: virtman-limit-popup.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
Requires: python-gtk
|
||||
@ -118,6 +117,9 @@ test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROO
|
||||
%{_mandir}/man1/virt-manager.1*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 16 2007 - ccoffing@novell.com
|
||||
- #300789: Could not add or change disks
|
||||
- Drop unused patch
|
||||
* Fri Aug 03 2007 - chuck@novell.com
|
||||
- Update to changeset 544.
|
||||
- Properly attach and detach CDs to running VM. (#289393)
|
||||
|
@ -58,16 +58,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
})
|
||||
|
||||
self.vm.connect("status-changed", self.update_widget_states)
|
||||
@@ -134,6 +142,8 @@ class vmmDetails(gobject.GObject):
|
||||
|
||||
self.pixbuf_processor = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_cpu.png")
|
||||
self.pixbuf_memory = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_cpu.png")
|
||||
+ self.pixbuf_disk = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_hdd.png")
|
||||
+ self.pixbuf_network = gtk.gdk.pixbuf_new_from_file(config.get_icon_dir() + "/icon_ethernet.png")
|
||||
self.prepare_hw_list()
|
||||
self.hw_selected()
|
||||
|
||||
@@ -166,11 +176,11 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -166,11 +174,11 @@ class vmmDetails(gobject.GObject):
|
||||
self.window.get_widget("details-pages").set_current_page(1)
|
||||
|
||||
def close(self,ignore1=None,ignore2=None):
|
||||
@ -81,7 +72,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -192,10 +202,10 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -192,10 +200,10 @@ class vmmDetails(gobject.GObject):
|
||||
self.refresh_config_memory()
|
||||
pagenum = 1
|
||||
elif pagetype == HW_LIST_TYPE_DISK:
|
||||
@ -94,7 +85,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
pagenum = 3
|
||||
|
||||
self.window.get_widget("hw-panel").set_current_page(pagenum)
|
||||
@@ -328,9 +338,6 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -328,9 +336,6 @@ class vmmDetails(gobject.GObject):
|
||||
if details.get_current_page() == 0:
|
||||
self.refresh_summary()
|
||||
else:
|
||||
@ -104,7 +95,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
# Now refresh desired page
|
||||
hw_list = self.window.get_widget("hw-list")
|
||||
selection = hw_list.get_selection()
|
||||
@@ -343,10 +350,10 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -343,10 +348,10 @@ class vmmDetails(gobject.GObject):
|
||||
self.refresh_config_cpu()
|
||||
elif pagetype == HW_LIST_TYPE_MEMORY:
|
||||
self.refresh_config_memory()
|
||||
@ -119,7 +110,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
|
||||
def refresh_summary(self):
|
||||
self.window.get_widget("overview-cpu-usage-text").set_text("%d %%" % self.vm.cpu_time_percentage())
|
||||
@@ -400,18 +407,6 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -400,18 +405,6 @@ class vmmDetails(gobject.GObject):
|
||||
|
||||
self.window.get_widget("state-vm-memory").set_text("%d MB" % (self.vm.get_memory()/1024))
|
||||
|
||||
@ -138,7 +129,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
def refresh_network_page(self):
|
||||
vmlist = self.window.get_widget("hw-list")
|
||||
selection = vmlist.get_selection()
|
||||
@@ -458,36 +453,227 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -458,36 +451,232 @@ class vmmDetails(gobject.GObject):
|
||||
self.window.get_widget("config-memory-apply").set_sensitive(False)
|
||||
|
||||
|
||||
@ -203,7 +194,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ return self.add_disk(False)
|
||||
+ def add_disk(self, is_cdrom):
|
||||
+ disks = self.disks_widget.get_disks()
|
||||
+ unused_vdevs = vmdisks.disks.get_unused_vdevs(self.options.full_virt, disks)
|
||||
+ unused_vdevs = vmdisks.get_unused_vdevs(self.options.full_virt, disks)
|
||||
+ if len(unused_vdevs) == 0:
|
||||
+ return
|
||||
+ (w, disk_editor, ok_button) = self.get_disk_editor()
|
||||
@ -224,12 +215,12 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ cdrom = disk_editor.default_cdrom()
|
||||
+ disk = vmdisks.Disk(pdev=cdrom, vdev=unused_vdevs[0],
|
||||
+ vdevType=vmdisks.Disk.DEVICE_CDROM,
|
||||
+ full_virt=self.options, vmname=self.options.vmname, disk_group=disks)
|
||||
+ full_virt=self.options.full_virt, vmname=self.options.vmname, disk_group=disks)
|
||||
+ else:
|
||||
+ disk = vmdisks.Disk(pdev=None, vdev=unused_vdevs[0],
|
||||
+ vdevType=vmdisks.Disk.DEVICE_DISK,
|
||||
+ args={'sparse':True},
|
||||
+ full_virt=self.options, vmname=self.options.vmname, disk_group=disks)
|
||||
+ full_virt=self.options.full_virt, vmname=self.options.vmname, disk_group=disks)
|
||||
+ disk_editor.set(disk)
|
||||
+
|
||||
+ def edit_disk(self, button):
|
||||
@ -257,12 +248,12 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ mode = 'w'
|
||||
+ if disk.ro:
|
||||
+ mode = 'r'
|
||||
+ vdev = disk.get_vdev()
|
||||
+ vdev = disk.get_vdev_str()
|
||||
+ if disk.get_vdevtype() == disk.DEVICE_CDROM:
|
||||
+ vdev += ':cdrom'
|
||||
+ try:
|
||||
+ run(['/usr/sbin/xm', 'block-attach', str(self.vm.get_id()),
|
||||
+ '%s:%s' % (disk.get_driver(), disk.pdev), vdev, mode])
|
||||
+ disk.get_pdev(), vdev, mode])
|
||||
+ except RuntimeError, e:
|
||||
+ logging.error("Failed to attach disk: %s" % str(e))
|
||||
+ raise
|
||||
@ -285,7 +276,7 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ if self.vm.is_active():
|
||||
+ try:
|
||||
+ from xen.util import blkif
|
||||
+ devid = blkif.blkdev_name_to_number(disk.get_vdev())
|
||||
+ devid = blkif.blkdev_name_to_number(disk.get_vdev_str())
|
||||
+ run(['/usr/bin/xenstore-write',
|
||||
+ '/local/domain/0/backend/vbd/%d/%d/params' % (self.vm.get_id(), devid),
|
||||
+ disk.get_pdev()])
|
||||
@ -346,16 +337,22 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ disks = []
|
||||
+ for d in diskList:
|
||||
+ disks.append(vmdisks.Disk(d[1], vdev=d[3], vdevType=d[2],
|
||||
+ full_virt=self.options, vmname=self.options.vmname, disk_group=disks))
|
||||
+ full_virt=self.options.full_virt, vmname=self.options.vmname, disk_group=disks))
|
||||
+ max_disks = len(vmdisks.get_possible_vdevs(self.options.full_virt))
|
||||
+ self.disks_widget.set_max_disks(max_disks)
|
||||
+ self.disks_widget.set_disks(disks)
|
||||
+ self.disk_selected()
|
||||
+
|
||||
+ def prepare_network_list(self):
|
||||
+ nets = self.window.get_widget("network-view")
|
||||
+ netsModel = gtk.TreeStore(str,str,str,str)
|
||||
+ nets.set_model(netsModel)
|
||||
+ self.nets = nets = gtk.TreeView(netsModel)
|
||||
+ frame = gtk.Frame()
|
||||
+ frame.add(nets)
|
||||
+ frame.set_border_width(10)
|
||||
+
|
||||
+ notebook = self.window.get_widget("hw-panel")
|
||||
+ notebook.remove_page(3)
|
||||
+ notebook.insert_page(frame, None, 3)
|
||||
+
|
||||
+ netType_col = gtk.TreeViewColumn("Type")
|
||||
+ netType_text = gtk.CellRendererText()
|
||||
@ -385,15 +382,14 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
+ def populate_network_list(self):
|
||||
+ netList = self.vm.get_network_devices()
|
||||
+
|
||||
+ nets = self.window.get_widget("network-view")
|
||||
+ netsModel = nets.get_model()
|
||||
+ netsModel = self.nets.get_model()
|
||||
+ netsModel.clear()
|
||||
+ for d in netList:
|
||||
+ netsModel.append(None, d)
|
||||
|
||||
def prepare_hw_list(self):
|
||||
hw_list_model = gtk.ListStore(str, str, int, gtk.gdk.Pixbuf, int, gobject.TYPE_PYOBJECT)
|
||||
@@ -504,94 +690,11 @@ class vmmDetails(gobject.GObject):
|
||||
@@ -504,94 +693,11 @@ class vmmDetails(gobject.GObject):
|
||||
hwCol.add_attribute(hw_img, 'pixbuf', HW_LIST_COL_PIXBUF)
|
||||
self.window.get_widget("hw-list").append_column(hwCol)
|
||||
|
||||
@ -487,8 +483,8 @@ Index: virt-manager--devel/src/virtManager/details.py
|
||||
-
|
||||
- self.addhw.show()
|
||||
-
|
||||
+ hw_list_model.append(["Disk", None, 0, self.pixbuf_disk, HW_LIST_TYPE_DISK, []])
|
||||
+ hw_list_model.append(["Network", None, 0, self.pixbuf_network, HW_LIST_TYPE_NIC, []])
|
||||
+ hw_list_model.append(["Disk", gtk.STOCK_HARDDISK, gtk.ICON_SIZE_LARGE_TOOLBAR, None, HW_LIST_TYPE_DISK, []])
|
||||
+ hw_list_model.append(["Network", gtk.STOCK_NETWORK, gtk.ICON_SIZE_LARGE_TOOLBAR, None, HW_LIST_TYPE_NIC, []])
|
||||
|
||||
+ self.prepare_disk_list()
|
||||
+ self.prepare_network_list()
|
||||
|
@ -1,22 +0,0 @@
|
||||
Index: virt-manager--devel/src/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager--devel.orig/src/virtManager/console.py
|
||||
+++ virt-manager--devel/src/virtManager/console.py
|
||||
@@ -47,6 +47,7 @@ class vmmConsole(gobject.GObject):
|
||||
self.window = gtk.glade.XML(config.get_glade_dir() + "/vmm-console.glade", "vmm-console", domain="virt-manager")
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
+ self.grab_notifications = 1
|
||||
|
||||
topwin = self.window.get_widget("vmm-console")
|
||||
sens = (self.window.get_widget("menubar2"),
|
||||
@@ -134,6 +135,9 @@ class vmmConsole(gobject.GObject):
|
||||
def notify_grabbed(self, src):
|
||||
topwin = self.window.get_widget("vmm-console")
|
||||
topwin.set_title(_("Press Ctrl+Alt to release pointer.") + " " + self.title)
|
||||
+ if not self.grab_notifications:
|
||||
+ return
|
||||
+ self.grab_notifications -= 1
|
||||
|
||||
if self.config.show_console_grab_notify():
|
||||
try:
|
Loading…
Reference in New Issue
Block a user