Accepting request 84969 from Virtualization
Added several upstream patches OBS-URL: https://build.opensuse.org/request/show/84969 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=62
This commit is contained in:
commit
70dce1cca3
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 21 11:29:17 MDT 2011 - carnold@novell.com
|
||||
|
||||
- KVM: Add missing qed support to virtinst
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 21 09:40:09 MDT 2011 - carnold@novell.com
|
||||
|
||||
- Upstream bug fixes
|
||||
virtman-netstats-fix.diff
|
||||
virtman-finish-button-fix.diff
|
||||
virtman-shutoff-fix.diff
|
||||
virtman-set-has-window-fix.diff
|
||||
virtman-grep-fix.diff
|
||||
virtman-no-cd-present-fix.diff
|
||||
virtman-resize-menu-fix.diff
|
||||
virtman-vcpu-count-fix.diff
|
||||
virtman-storage-pool-fix.diff
|
||||
virtman-domain-name-fix.diff
|
||||
virtman-unapplied-changes-fix.diff
|
||||
virtman-details-fix.diff
|
||||
virtman-delete-fix.diff
|
||||
virtman-collidelist-fix.diff
|
||||
virtman-char-device-mode-fix.diff
|
||||
virtinst-hv-version-fix.diff
|
||||
virtinst-initrd-inject-fix.diff
|
||||
virtinst-initrd-inject2-fix.diff
|
||||
virtinst-no-volume-fix.diff
|
||||
virtinst-prompts-fix.diff
|
||||
virtinst-cpu-model-name-fix.diff
|
||||
virtinst-xml-clear-fix.diff
|
||||
virtinst-remote-storage-fix.diff
|
||||
virtinst-error-message-fix.diff
|
||||
virtinst-typo-fix.diff
|
||||
virtinst-cdrom.diff
|
||||
virtinst-storage-ocfs2.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 20 09:05:19 MDT 2011 - carnold@novell.com
|
||||
|
||||
|
@ -38,6 +38,21 @@ Source0: virt-manager-%{version}.tar.bz2
|
||||
Source1: %{virtinst_name}.tar.bz2
|
||||
# see https://bugzilla.redhat.com/show_bug.cgi?id=620216,
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=641981
|
||||
Patch1: virtman-netstats-fix.diff
|
||||
Patch2: virtman-finish-button-fix.diff
|
||||
Patch3: virtman-shutoff-fix.diff
|
||||
Patch4: virtman-set-has-window-fix.diff
|
||||
Patch5: virtman-grep-fix.diff
|
||||
Patch6: virtman-no-cd-present-fix.diff
|
||||
Patch7: virtman-resize-menu-fix.diff
|
||||
Patch8: virtman-vcpu-count-fix.diff
|
||||
Patch9: virtman-storage-pool-fix.diff
|
||||
Patch10: virtman-domain-name-fix.diff
|
||||
Patch11: virtman-unapplied-changes-fix.diff
|
||||
Patch12: virtman-details-fix.diff
|
||||
Patch13: virtman-delete-fix.diff
|
||||
Patch14: virtman-collidelist-fix.diff
|
||||
Patch15: virtman-char-device-mode-fix.diff
|
||||
Patch50: virtman-desktop.diff
|
||||
Patch51: virtman-vminstall.diff
|
||||
Patch52: virtman-cdrom.diff
|
||||
@ -50,8 +65,19 @@ Patch61: virtman-autorestart.diff
|
||||
Patch62: virtman-storage-pool.diff
|
||||
Patch63: virtman-eepro100.diff
|
||||
Patch64: virtman-qed.diff
|
||||
Patch81: virtinst-cdrom.diff
|
||||
Patch82: virtinst-storage-ocfs2.diff
|
||||
Patch100: virtinst-hv-version-fix.diff
|
||||
Patch101: virtinst-initrd-inject-fix.diff
|
||||
Patch102: virtinst-initrd-inject2-fix.diff
|
||||
Patch103: virtinst-no-volume-fix.diff
|
||||
Patch104: virtinst-prompts-fix.diff
|
||||
Patch105: virtinst-cpu-model-name-fix.diff
|
||||
Patch106: virtinst-xml-clear-fix.diff
|
||||
Patch107: virtinst-remote-storage-fix.diff
|
||||
Patch108: virtinst-error-message-fix.diff
|
||||
Patch109: virtinst-typo-fix.diff
|
||||
Patch110: virtinst-cdrom.diff
|
||||
Patch111: virtinst-storage-ocfs2.diff
|
||||
Patch112: virtinst-qed.diff
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%gconf_schemas_prereq
|
||||
@ -133,6 +159,21 @@ Authors:
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -b 1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
@ -146,8 +187,19 @@ Authors:
|
||||
%patch63 -p1
|
||||
%patch64 -p1
|
||||
pushd $RPM_BUILD_DIR/%{virtinst_name}
|
||||
%patch81 -p1
|
||||
%patch82 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
popd
|
||||
# sed -i -e "s@sr\@Latn@sr\@latin@" configure
|
||||
# mv po/sr@Latn.po po/sr@latin.po
|
||||
|
@ -2,7 +2,7 @@ Index: virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/VirtualDisk.py
|
||||
+++ virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
@@ -1703,14 +1703,18 @@ class VirtualDisk(VirtualDevice):
|
||||
@@ -1718,14 +1718,18 @@ class VirtualDisk(VirtualDevice):
|
||||
self.target = "hdc"
|
||||
return self.target
|
||||
|
||||
|
48
virtinst-cpu-model-name-fix.diff
Normal file
48
virtinst-cpu-model-name-fix.diff
Normal file
@ -0,0 +1,48 @@
|
||||
|
||||
Subject: virt-install: Don't lowercase --cpu model name
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 11:53:05 2011 -0400
|
||||
Date: Mon Aug 29 11:53:05 2011 -0400:
|
||||
Git: 36c0e33c0ec1b725726679f6c904374578e25eba
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/tests/cli-test-xml/compare/qemu-plain.xml
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/tests/cli-test-xml/compare/qemu-plain.xml
|
||||
+++ virtinst-0.600.0/tests/cli-test-xml/compare/qemu-plain.xml
|
||||
@@ -11,6 +11,9 @@
|
||||
<features>
|
||||
<acpi/><apic/><pae/>
|
||||
</features>
|
||||
+ <cpu match='exact'>
|
||||
+ <model>Penryn</model>
|
||||
+ </cpu>
|
||||
<clock offset="utc"/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
Index: virtinst-0.600.0/tests/clitest.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/tests/clitest.py
|
||||
+++ virtinst-0.600.0/tests/clitest.py
|
||||
@@ -678,7 +678,8 @@ args_dict = {
|
||||
# xenner
|
||||
("--os-variant fedora14 --nodisks --boot hd --paravirt", "kvm-xenner"),
|
||||
# plain qemu
|
||||
- ("--os-variant fedora14 --nodisks --boot cdrom --virt-type qemu",
|
||||
+ ("--os-variant fedora14 --nodisks --boot cdrom --virt-type qemu "
|
||||
+ "--cpu Penryn",
|
||||
"qemu-plain"),
|
||||
# 32 on 64
|
||||
("--os-variant fedora14 --nodisks --boot network --nographics --arch i686",
|
||||
Index: virtinst-0.600.0/virtinst/cli.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/cli.py
|
||||
+++ virtinst-0.600.0/virtinst/cli.py
|
||||
@@ -1149,7 +1149,7 @@ def parse_optstr_tuples(optstr, compress
|
||||
opt_type, opt_val = opt.split("=", 1)
|
||||
optlist.append((opt_type.lower(), opt_val))
|
||||
else:
|
||||
- optlist.append((opt.lower(), None))
|
||||
+ optlist.append((opt, None))
|
||||
|
||||
return optlist
|
||||
|
20
virtinst-error-message-fix.diff
Normal file
20
virtinst-error-message-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: util: Fix name validation error message
|
||||
From: Cole Robinson crobinso@redhat.com Thu Sep 1 13:12:44 2011 -0400
|
||||
Date: Thu Sep 1 13:12:44 2011 -0400:
|
||||
Git: 72de7f4fba5e3536a0b68a23473ca9c81869882f
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/_util.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/_util.py
|
||||
+++ virtinst-0.600.0/virtinst/_util.py
|
||||
@@ -152,7 +152,7 @@ def validate_uuid(val):
|
||||
|
||||
def validate_name(name_type, val, lencheck=False):
|
||||
if type(val) is not str or len(val) == 0:
|
||||
- raise ValueError(_("%s name must be a string"))
|
||||
+ raise ValueError(_("%s name must be a string") % name_type)
|
||||
|
||||
if lencheck:
|
||||
if len(val) > 50:
|
28
virtinst-hv-version-fix.diff
Normal file
28
virtinst-hv-version-fix.diff
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
Subject: support: If getting HV version fails, just use 0
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 1 16:16:01 2011 -0400
|
||||
Date: Mon Aug 1 16:16:01 2011 -0400:
|
||||
Git: c11616761952697dadb2b9a88b761d9816060c54
|
||||
|
||||
If libvirt has issues building qemu caps, version can fail.
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/support.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/support.py
|
||||
+++ virtinst-0.600.0/virtinst/support.py
|
||||
@@ -373,9 +373,12 @@ def _hv_ver(conn, uri):
|
||||
if not _try_command(cmd, args):
|
||||
return 0
|
||||
|
||||
- ret = cmd(*args)
|
||||
- if type(ret) == tuple:
|
||||
- ret = ret[1]
|
||||
+ try:
|
||||
+ ret = cmd(*args)
|
||||
+ if type(ret) == tuple:
|
||||
+ ret = ret[1]
|
||||
+ except libvirt.libvirtError:
|
||||
+ ret = 0
|
||||
|
||||
return ret
|
||||
|
50
virtinst-initrd-inject-fix.diff
Normal file
50
virtinst-initrd-inject-fix.diff
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
Subject: virt-install: Fix --initrd-inject
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:35:32 2011 -0400
|
||||
Date: Tue Aug 23 15:35:32 2011 -0400:
|
||||
Git: b7054426336929abb0ab0d822ad208a11d418904
|
||||
|
||||
And add unit tests for it!
|
||||
|
||||
Index: virtinst-0.600.0/tests/clitest.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/tests/clitest.py
|
||||
+++ virtinst-0.600.0/tests/clitest.py
|
||||
@@ -265,6 +265,11 @@ args_dict = {
|
||||
"--arch i486 --pxe",
|
||||
# Directory tree URL install
|
||||
"--hvm --location %(TREEDIR)s",
|
||||
+ # initrd-inject
|
||||
+ "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
||||
+ # initrd-inject with manual kernel/initrd
|
||||
+ "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
||||
+ # Directory tree URL install with extra-args
|
||||
# Directory tree URL install with extra-args
|
||||
"--hvm --location %(TREEDIR)s --extra-args console=ttyS0",
|
||||
# Directory tree CDROM install
|
||||
Index: virtinst-0.600.0/virtinst/DistroInstaller.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/DistroInstaller.py
|
||||
+++ virtinst-0.600.0/virtinst/DistroInstaller.py
|
||||
@@ -270,11 +270,10 @@ class DistroInstaller(Installer.Installe
|
||||
transient=transient)
|
||||
self.install_devices.append(disk)
|
||||
|
||||
- def _perform_initrd_injections(self):
|
||||
+ def _perform_initrd_injections(self, initrd):
|
||||
"""
|
||||
Insert files into the root directory of the initial ram disk
|
||||
"""
|
||||
- initrd = self._install_bootconfig.initrd
|
||||
tempdir = tempfile.mkdtemp(dir=self.scratchdir)
|
||||
os.chmod(tempdir, 0775)
|
||||
|
||||
@@ -379,7 +378,7 @@ class DistroInstaller(Installer.Installe
|
||||
self._tmpfiles.append(initrdfn)
|
||||
|
||||
if self._initrd_injections:
|
||||
- self._perform_initrd_injections()
|
||||
+ self._perform_initrd_injections(initrdfn)
|
||||
|
||||
# If required, upload media to an accessible guest location
|
||||
kernelfn, initrdfn = self._upload_media(guest, meter,
|
43
virtinst-initrd-inject2-fix.diff
Normal file
43
virtinst-initrd-inject2-fix.diff
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
Subject: virt-install: Error if initrd-inject and not --location
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:55:20 2011 -0400
|
||||
Date: Tue Aug 23 15:55:20 2011 -0400:
|
||||
Git: 178276dbc8978342c842081f67ee7bd06a146282
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/tests/clitest.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/tests/clitest.py
|
||||
+++ virtinst-0.600.0/tests/clitest.py
|
||||
@@ -267,9 +267,6 @@ args_dict = {
|
||||
"--hvm --location %(TREEDIR)s",
|
||||
# initrd-inject
|
||||
"--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
||||
- # initrd-inject with manual kernel/initrd
|
||||
- "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
||||
- # Directory tree URL install with extra-args
|
||||
# Directory tree URL install with extra-args
|
||||
"--hvm --location %(TREEDIR)s --extra-args console=ttyS0",
|
||||
# Directory tree CDROM install
|
||||
@@ -309,6 +306,8 @@ args_dict = {
|
||||
"--hvm --pxe --boot menu=foobar",
|
||||
# cdrom fail w/ extra-args
|
||||
"--hvm --cdrom %(EXISTIMG1)s --extra-args console=ttyS0",
|
||||
+ # initrd-inject with manual kernel/initrd
|
||||
+ "--hvm --boot kernel=%(TREEDIR)s/pxeboot/vmlinuz,initrd=%(TREEDIR)s/pxeboot/initrd.img --initrd-inject virt-install",
|
||||
],
|
||||
}, # category "install"
|
||||
|
||||
Index: virtinst-0.600.0/virt-install
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virt-install
|
||||
+++ virtinst-0.600.0/virt-install
|
||||
@@ -415,6 +415,8 @@ def check_option_collisions(options, gue
|
||||
|
||||
if not options.location and options.extra:
|
||||
fail(_("--extra-args only work if specified with --location."))
|
||||
+ if not options.location and options.initrd_injections:
|
||||
+ fail(_("--initrd-inject only works if specified with --location."))
|
||||
|
||||
|
||||
##########################
|
20
virtinst-no-volume-fix.diff
Normal file
20
virtinst-no-volume-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: DistroInstaller: Warn if failed to find upload volume
|
||||
From: Cole Robinson crobinso@redhat.com Wed Aug 24 17:45:50 2011 -0400
|
||||
Date: Wed Aug 24 17:45:50 2011 -0400:
|
||||
Git: b4189ff03fef319d61862d4254b6aa232974ebb6
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/DistroInstaller.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/DistroInstaller.py
|
||||
+++ virtinst-0.600.0/virtinst/DistroInstaller.py
|
||||
@@ -111,6 +111,8 @@ def _upload_file(conn, meter, destpool,
|
||||
|
||||
disk.setup_dev(meter=meter)
|
||||
vol = disk.vol_object
|
||||
+ if not vol:
|
||||
+ raise RuntimeError(_("Failed to lookup scratch media volume"))
|
||||
|
||||
try:
|
||||
# Register upload
|
122
virtinst-prompts-fix.diff
Normal file
122
virtinst-prompts-fix.diff
Normal file
@ -0,0 +1,122 @@
|
||||
|
||||
Subject: virt-install: Fix several prompting scenarios
|
||||
From: Cole Robinson crobinso@redhat.com Thu Aug 25 13:50:21 2011 -0400
|
||||
Date: Thu Aug 25 16:00:06 2011 -0400:
|
||||
Git: de8aaf09157a31aa8ca66036371751100b3d0edb
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/virt-install
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virt-install
|
||||
+++ virtinst-0.600.0/virt-install
|
||||
@@ -146,20 +146,22 @@ def get_disk(diskopts, size, sparse, gue
|
||||
|
||||
guest.disks.append(d)
|
||||
|
||||
-def get_disks(guest, file_paths, disk_paths, size, sparse):
|
||||
+def get_disks(guest, file_paths, disk_paths, size, sparse, need_storage):
|
||||
is_file_path = (file_paths or (not disk_paths and cli.is_prompt()))
|
||||
- disk = (file_paths or disk_paths)
|
||||
+ disks = (file_paths or disk_paths)
|
||||
+ if not disks and need_storage and cli.is_prompt():
|
||||
+ disks = [None]
|
||||
|
||||
def padlist(l, padsize):
|
||||
l = cli.listify(l)
|
||||
l.extend((padsize - len(l)) * [None])
|
||||
return l
|
||||
|
||||
- disk = padlist(disk, 0)
|
||||
- size = padlist(size, len(disk))
|
||||
+ disklist = padlist(disks, 0)
|
||||
+ sizelist = padlist(size, len(disklist))
|
||||
|
||||
- for idx in range(len(disk)):
|
||||
- get_disk(disk[idx], size[idx], sparse, guest, is_file_path)
|
||||
+ for idx in range(len(disklist)):
|
||||
+ get_disk(disklist[idx], sizelist[idx], sparse, guest, is_file_path)
|
||||
|
||||
def get_networks(guest, options):
|
||||
networks, macs = cli.digest_networks(guest, options)
|
||||
@@ -288,11 +290,11 @@ def get_virt_type(conn, options):
|
||||
# Install media setup/validation #
|
||||
##################################
|
||||
|
||||
-def get_install_media(guest, location, cdpath):
|
||||
+def get_install_media(guest, location, cdpath, need_install):
|
||||
manual_cdrom = cdrom_specified(guest)
|
||||
cdinstall = bool(not location and (cdpath or cdrom_specified(guest)))
|
||||
|
||||
- if not (location or cdpath or manual_cdrom):
|
||||
+ if not (location or cdpath or manual_cdrom or need_install):
|
||||
return
|
||||
|
||||
try:
|
||||
@@ -347,26 +349,33 @@ def validate_required_options(options, g
|
||||
# Required config. Don't error right away if nothing is specified,
|
||||
# aggregate the errors to help first time users get it right
|
||||
msg = ""
|
||||
- if cli.is_prompt():
|
||||
- return
|
||||
+ need_storage = False
|
||||
+ need_install = False
|
||||
|
||||
if not options.name:
|
||||
msg += "\n" + cli.name_missing
|
||||
+
|
||||
if not options.memory:
|
||||
msg += "\n" + cli.ram_missing
|
||||
+
|
||||
if (not guest.installer.is_container() and
|
||||
not storage_specified(options.file_paths, options.diskopts,
|
||||
options.nodisks, options.filesystems)):
|
||||
msg += "\n" + disk_missing
|
||||
+ need_storage = True
|
||||
+
|
||||
if (not guest.installer.is_container() and
|
||||
(not install_specified(options.location, options.cdrom,
|
||||
options.pxe, options.import_install)) and
|
||||
(not cdrom_specified(guest, options.diskopts))):
|
||||
msg += "\n" + install_missing
|
||||
+ need_install = True
|
||||
|
||||
- if msg:
|
||||
+ if msg and not cli.is_prompt():
|
||||
fail(msg)
|
||||
|
||||
+ return need_storage, need_install
|
||||
+
|
||||
def check_option_collisions(options, guest):
|
||||
# Disk collisions
|
||||
if options.nodisks and (options.file_paths or
|
||||
@@ -508,15 +517,15 @@ def build_guest_instance(conn, options):
|
||||
|
||||
# Do this after setting up all optional parameters, so we report error
|
||||
# about those first.
|
||||
- validate_required_options(options, guest)
|
||||
+ need_storage, need_install = validate_required_options(options, guest)
|
||||
|
||||
# Actually set required options
|
||||
cli.get_name(options.name, guest)
|
||||
cli.get_memory(options.memory, guest)
|
||||
if not options.nodisks:
|
||||
get_disks(guest, options.file_paths, options.diskopts,
|
||||
- options.disksize, options.sparse)
|
||||
- get_install_media(guest, options.location, options.cdrom)
|
||||
+ options.disksize, options.sparse, need_storage)
|
||||
+ get_install_media(guest, options.location, options.cdrom, need_install)
|
||||
|
||||
# Various little validations about option collisions. Need to do
|
||||
# this after setting guest.installer at least
|
||||
Index: virtinst-0.600.0/virtinst/cli.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/cli.py
|
||||
+++ virtinst-0.600.0/virtinst/cli.py
|
||||
@@ -549,6 +549,7 @@ def prompt_for_input(noprompt_err, promp
|
||||
fail(noprompt_err)
|
||||
|
||||
print_stdout(prompt + " ", do_force=True)
|
||||
+ sys.stdout.flush()
|
||||
return sys.stdin.readline().strip()
|
||||
|
||||
def prompt_for_yes_or_no(warning, question):
|
111
virtinst-qed.diff
Normal file
111
virtinst-qed.diff
Normal file
@ -0,0 +1,111 @@
|
||||
Index: virtinst-0.600.0/virtinst/Storage.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/Storage.py
|
||||
+++ virtinst-0.600.0/virtinst/Storage.py
|
||||
@@ -1291,8 +1291,8 @@ class FileVolume(StorageVolume):
|
||||
_file_type = VIR_STORAGE_VOL_FILE
|
||||
|
||||
formats = ["raw", "bochs", "cloop", "cow", "dmg", "iso", "qcow",
|
||||
- "qcow2", "vmdk", "vpc"]
|
||||
- create_formats = ["raw", "cow", "qcow", "qcow2", "vmdk", "vpc"]
|
||||
+ "qcow2", "qed", "vmdk", "vpc"]
|
||||
+ create_formats = ["raw", "cow", "qcow", "qcow2", "qed", "vmdk", "vpc"]
|
||||
|
||||
# Register applicable property methods from parent class
|
||||
perms = property(StorageObject.get_perms, StorageObject.set_perms)
|
||||
Index: virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/VirtualDisk.py
|
||||
+++ virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
@@ -292,10 +292,11 @@ class VirtualDisk(VirtualDevice):
|
||||
|
||||
DRIVER_TAP_RAW = "aio"
|
||||
DRIVER_TAP_QCOW = "qcow"
|
||||
+ DRIVER_TAP_QED = "qed"
|
||||
DRIVER_TAP_VMDK = "vmdk"
|
||||
DRIVER_TAP_VDISK = "vdisk"
|
||||
driver_types = [DRIVER_TAP_RAW, DRIVER_TAP_QCOW,
|
||||
- DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
|
||||
+ DRIVER_TAP_QED, DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
|
||||
|
||||
CACHE_MODE_NONE = "none"
|
||||
CACHE_MODE_WRITETHROUGH = "writethrough"
|
||||
Index: virtinst-0.600.0/virtinst/ImageParser.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/ImageParser.py
|
||||
+++ virtinst-0.600.0/virtinst/ImageParser.py
|
||||
@@ -200,6 +200,7 @@ class Disk:
|
||||
FORMAT_ISO = "iso"
|
||||
FORMAT_QCOW = "qcow"
|
||||
FORMAT_QCOW2 = "qcow2"
|
||||
+ FORMAT_QED = "qed"
|
||||
FORMAT_VMDK = "vmdk"
|
||||
|
||||
USE_SYSTEM = "system"
|
||||
@@ -227,7 +228,7 @@ class Disk:
|
||||
csumtype = xpathString(d, "@type")
|
||||
csumvalue = xpathString(d, "")
|
||||
self.csum[csumtype] = csumvalue
|
||||
- formats = [Disk.FORMAT_RAW, Disk.FORMAT_QCOW, Disk.FORMAT_QCOW2, Disk.FORMAT_VMDK, Disk.FORMAT_ISO]
|
||||
+ formats = [Disk.FORMAT_RAW, Disk.FORMAT_QCOW, Disk.FORMAT_QCOW2, Disk.FORMAT_QED, Disk.FORMAT_VMDK, Disk.FORMAT_ISO]
|
||||
validate(formats.count(self.format) > 0,
|
||||
_("The format for disk %s must be one of %s") %
|
||||
(self.file, ",".join(formats)))
|
||||
Index: virtinst-0.600.0/virtconv/diskcfg.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtconv/diskcfg.py
|
||||
+++ virtinst-0.600.0/virtconv/diskcfg.py
|
||||
@@ -35,6 +35,7 @@ DISK_FORMAT_VDISK = 3
|
||||
DISK_FORMAT_QCOW = 4
|
||||
DISK_FORMAT_QCOW2 = 5
|
||||
DISK_FORMAT_COW = 6
|
||||
+DISK_FORMAT_QED 7
|
||||
|
||||
DISK_TYPE_DISK = 0
|
||||
DISK_TYPE_CDROM = 1
|
||||
@@ -50,6 +51,7 @@ disk_suffixes = {
|
||||
DISK_FORMAT_QCOW: ".qcow",
|
||||
DISK_FORMAT_QCOW2: ".qcow2",
|
||||
DISK_FORMAT_COW: ".cow",
|
||||
+ DISK_FORMAT_QED: ".qed",
|
||||
}
|
||||
|
||||
qemu_formats = {
|
||||
@@ -59,6 +61,7 @@ qemu_formats = {
|
||||
DISK_FORMAT_QCOW: "qcow",
|
||||
DISK_FORMAT_QCOW2: "qcow2",
|
||||
DISK_FORMAT_COW: "cow",
|
||||
+ DISK_FORMAT_QED: "qed",
|
||||
}
|
||||
|
||||
disk_format_names = {
|
||||
@@ -69,6 +72,7 @@ disk_format_names = {
|
||||
"qcow": DISK_FORMAT_QCOW,
|
||||
"qcow2": DISK_FORMAT_QCOW2,
|
||||
"cow": DISK_FORMAT_COW,
|
||||
+ "qed": DISK_FORMAT_QED,
|
||||
}
|
||||
|
||||
checksum_types = {
|
||||
@@ -260,7 +264,8 @@ class disk(object):
|
||||
out_format == DISK_FORMAT_VMDK or
|
||||
out_format == DISK_FORMAT_QCOW or
|
||||
out_format == DISK_FORMAT_QCOW2 or
|
||||
- out_format == DISK_FORMAT_COW):
|
||||
+ out_format == DISK_FORMAT_COW or
|
||||
+ out_format == DISK_FORMAT_QED):
|
||||
raise NotImplementedError(_("Cannot convert to disk format %s") %
|
||||
output_format)
|
||||
|
||||
Index: virtinst-0.600.0/virtconv/parsers/virtimage.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtconv/parsers/virtimage.py
|
||||
+++ virtinst-0.600.0/virtconv/parsers/virtimage.py
|
||||
@@ -246,6 +246,7 @@ class virtimage_parser(formats.parser):
|
||||
ImageParser.Disk.FORMAT_VMDK: diskcfg.DISK_FORMAT_VMDK,
|
||||
ImageParser.Disk.FORMAT_QCOW: diskcfg.DISK_FORMAT_QCOW,
|
||||
ImageParser.Disk.FORMAT_QCOW2: diskcfg.DISK_FORMAT_QCOW2,
|
||||
+ ImageParser.Disk.FORMAT_QED: diskcfg.DISK_FORMAT_QED,
|
||||
}
|
||||
|
||||
fmt = None
|
62
virtinst-remote-storage-fix.diff
Normal file
62
virtinst-remote-storage-fix.diff
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
Subject: VirtualDisk: Fix logic error determining if we are creating storage
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:54:47 2011 -0400
|
||||
Date: Tue Aug 30 14:54:47 2011 -0400:
|
||||
Git: 9ad2e3a68b8f5cc1b5c11588dc1c4d5edcca3deb
|
||||
|
||||
If creating a storage volume, the logic would fall through and check if
|
||||
the path existed locally. This isn't valid for remote connections.
|
||||
|
||||
Addtionally cleanup similar functions to be easier to read and hopefully
|
||||
avoid these problems in the future.
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/VirtualDisk.py
|
||||
+++ virtinst-0.600.0/virtinst/VirtualDisk.py
|
||||
@@ -1123,23 +1123,38 @@ class VirtualDisk(VirtualDevice):
|
||||
Return bool representing if managed storage parameters have
|
||||
been explicitly specified or filled in
|
||||
"""
|
||||
- return (self.vol_object != None or self.vol_install != None or
|
||||
- self._pool_object != None)
|
||||
+ return bool(self.vol_object != None or
|
||||
+ self.vol_install != None or
|
||||
+ self._pool_object != None)
|
||||
|
||||
def __creating_storage(self):
|
||||
"""
|
||||
Return True if the user requested us to create a device
|
||||
"""
|
||||
- return not (self.__no_storage() or
|
||||
- (self.__managed_storage() and
|
||||
- self.vol_object or self._pool_object) or
|
||||
- (self.path and os.path.exists(self.path)))
|
||||
+ if self.__no_storage():
|
||||
+ return False
|
||||
+
|
||||
+ if self.__managed_storage():
|
||||
+ if self.vol_object or self._pool_object:
|
||||
+ return False
|
||||
+ return True
|
||||
+
|
||||
+ if (not self.is_remote() and
|
||||
+ self.path and
|
||||
+ os.path.exists(self.path)):
|
||||
+ return False
|
||||
+
|
||||
+ return True
|
||||
|
||||
def __no_storage(self):
|
||||
"""
|
||||
Return True if no path or storage was specified
|
||||
"""
|
||||
- return (not self.__managed_storage() and not self.path)
|
||||
+ if self.__managed_storage():
|
||||
+ return False
|
||||
+ if self.path:
|
||||
+ return False
|
||||
+ return True
|
||||
|
||||
|
||||
def _storage_security_label(self):
|
20
virtinst-typo-fix.diff
Normal file
20
virtinst-typo-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: Fix typo s/type/managed
|
||||
From: Marc-André Lureau marcandre.lureau@gmail.com Fri Sep 2 03:21:16 2011 +0200
|
||||
Date: Mon Sep 12 13:06:40 2011 -0400:
|
||||
Git: 7a1966edb2182c3219f1646e39528a6db8a4f99f
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/VirtualHostDevice.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/VirtualHostDevice.py
|
||||
+++ virtinst-0.600.0/virtinst/VirtualHostDevice.py
|
||||
@@ -120,7 +120,7 @@ class VirtualHostDevice(VirtualDevice.Vi
|
||||
return self._managed
|
||||
def set_managed(self, val):
|
||||
self._managed = bool(val)
|
||||
- managed = _xml_property(get_type, set_type,
|
||||
+ managed = _xml_property(get_managed, set_managed,
|
||||
get_converter=lambda s, x: bool(x == "yes"),
|
||||
set_converter=lambda s, x: x and "yes" or "no",
|
||||
xpath="./@managed")
|
21
virtinst-xml-clear-fix.diff
Normal file
21
virtinst-xml-clear-fix.diff
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
Subject: VirtualDeviceAddress: Only clear XML if not building from scratch
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 13:12:32 2011 -0400
|
||||
Date: Mon Aug 29 13:12:32 2011 -0400:
|
||||
Git: 061668208fa6cd8f45cf66dd921a56386de3f3b5
|
||||
|
||||
|
||||
Index: virtinst-0.600.0/virtinst/VirtualDevice.py
|
||||
===================================================================
|
||||
--- virtinst-0.600.0.orig/virtinst/VirtualDevice.py
|
||||
+++ virtinst-0.600.0/virtinst/VirtualDevice.py
|
||||
@@ -170,7 +170,8 @@ class VirtualDeviceAddress(XMLBuilderDom
|
||||
self._unit = None
|
||||
self._port = None
|
||||
|
||||
- self._remove_child_xpath("./address")
|
||||
+ if self._is_parse():
|
||||
+ self._remove_child_xpath("./address")
|
||||
|
||||
def _get_type(self):
|
||||
return self._type
|
@ -2,7 +2,7 @@ Index: virt-manager-0.9.0/src/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/details.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/details.py
|
||||
@@ -2005,11 +2005,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -2008,11 +2008,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
|
||||
return self._change_config_helper(df, da, hf, ha)
|
||||
|
||||
@ -17,7 +17,7 @@ Index: virt-manager-0.9.0/src/virtManager/details.py
|
||||
if self.editted(EDIT_AUTOSTART):
|
||||
auto = self.widget("config-autostart")
|
||||
try:
|
||||
@@ -2019,6 +2017,11 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -2022,6 +2020,11 @@ class vmmDetails(vmmGObjectUI):
|
||||
(_("Error changing autostart value: %s") % str(e)))
|
||||
return False
|
||||
|
||||
@ -29,7 +29,7 @@ Index: virt-manager-0.9.0/src/virtManager/details.py
|
||||
if self.editted(EDIT_BOOTORDER):
|
||||
bootdevs = self.get_config_boot_devs()
|
||||
add_define(self.vm.set_boot_device, bootdevs)
|
||||
@@ -2355,6 +2358,8 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -2359,6 +2362,8 @@ class vmmDetails(vmmGObjectUI):
|
||||
buttons=gtk.BUTTONS_OK,
|
||||
dialog_type=dtype)
|
||||
|
||||
|
35
virtman-char-device-mode-fix.diff
Normal file
35
virtman-char-device-mode-fix.diff
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
Subject: virt-manager: fix char device source mode
|
||||
From: Marc-André Lureau marcandre.lureau@gmail.com Tue Aug 30 21:03:27 2011 +0200
|
||||
Date: Thu Sep 1 13:23:54 2011 -0400:
|
||||
Git: df4dfd7362d33410e3af368293edcc096553aead
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/addhardware.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/addhardware.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/addhardware.py
|
||||
@@ -1251,6 +1251,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
def validate_page_char(self):
|
||||
chartype = self.get_char_type()
|
||||
+ modebox = self.widget("char-mode")
|
||||
devbox = self.widget("char-device-type")
|
||||
devtype = devbox.get_model()[devbox.get_active()][0]
|
||||
conn = self.conn.vmm
|
||||
@@ -1258,6 +1259,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
devclass = VirtualCharDevice.get_dev_instance(conn, chartype, devtype)
|
||||
|
||||
source_path = self.widget("char-path").get_text()
|
||||
+ source_mode = modebox.get_model()[modebox.get_active()][0]
|
||||
source_host = self.widget("char-host").get_text()
|
||||
bind_host = self.widget("char-bind-host").get_text()
|
||||
source_port = self.widget("char-port").get_adjustment().value
|
||||
@@ -1271,6 +1273,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
value_mappings = {
|
||||
"source_path" : source_path,
|
||||
+ "source_mode" : source_mode,
|
||||
"source_host" : source_host,
|
||||
"source_port" : source_port,
|
||||
"bind_port": bind_port,
|
31
virtman-collidelist-fix.diff
Normal file
31
virtman-collidelist-fix.diff
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Subject: util: get_default_path: Handle 'None' in collidelist
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:29:08 2011 -0400
|
||||
Date: Tue Aug 30 14:29:08 2011 -0400:
|
||||
Git: 9a46aa41e092e73ed1596c361acbca65ac3cbe95
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/util.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/util.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/util.py
|
||||
@@ -126,14 +126,14 @@ def get_default_path(conn, name, collide
|
||||
target, ignore, suffix = get_ideal_path_info(conn, name)
|
||||
|
||||
# Sanitize collidelist to work with the collision checker
|
||||
- for c in collidelist[:]:
|
||||
- collidelist.remove(c)
|
||||
- if os.path.dirname(c) == pool.get_target_path():
|
||||
- collidelist.append(os.path.basename(c))
|
||||
+ newcollidelist = []
|
||||
+ for c in collidelist:
|
||||
+ if c and os.path.dirname(c) == pool.get_target_path():
|
||||
+ newcollidelist.append(os.path.basename(c))
|
||||
|
||||
path = virtinst.Storage.StorageVolume.find_free_name(name,
|
||||
pool_object=pool.pool, suffix=suffix,
|
||||
- collidelist=collidelist)
|
||||
+ collidelist=newcollidelist)
|
||||
|
||||
path = os.path.join(target, path)
|
||||
|
24
virtman-delete-fix.diff
Normal file
24
virtman-delete-fix.diff
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
Subject: domain: Remove managed save state before delete
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 14:03:50 2011 -0400
|
||||
Date: Mon Aug 29 14:03:50 2011 -0400:
|
||||
Git: b36ec4b8c2ec7ed72404db7f71cadfaecfea719e
|
||||
|
||||
Newer libvirt forbids 'undefine' in this case
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/domain.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/domain.py
|
||||
@@ -1055,6 +1055,11 @@ class vmmDomain(vmmLibvirtObject):
|
||||
self.force_update_status()
|
||||
|
||||
def delete(self):
|
||||
+ if self.hasSavedImage():
|
||||
+ try:
|
||||
+ self._backend.managedSaveRemove(0)
|
||||
+ except:
|
||||
+ logging.exception("Failed to remove managed save state")
|
||||
self._backend.undefine()
|
||||
|
||||
def resume(self):
|
20
virtman-details-fix.diff
Normal file
20
virtman-details-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: delete: Properly raise 'undefine' errors
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 14:01:40 2011 -0400
|
||||
Date: Mon Aug 29 14:01:40 2011 -0400:
|
||||
Git: db21a2a8331c8518f27b136d0013a56cf84df7e6
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/delete.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/delete.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/delete.py
|
||||
@@ -183,7 +183,7 @@ class vmmDeleteDialog(vmmGObjectUI):
|
||||
for errinfo in storage_errors:
|
||||
storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1])
|
||||
|
||||
- if not storage_errstr:
|
||||
+ if not storage_errstr and not details:
|
||||
return
|
||||
|
||||
# We had extra storage errors. If there was another error message,
|
@ -25,7 +25,7 @@ Index: virt-manager-0.9.0/src/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/details.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/details.py
|
||||
@@ -2242,6 +2242,17 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -2245,6 +2245,17 @@ class vmmDetails(vmmGObjectUI):
|
||||
text1=(_("Are you sure you want to remove this device?"))):
|
||||
return
|
||||
|
||||
|
76
virtman-domain-name-fix.diff
Normal file
76
virtman-domain-name-fix.diff
Normal file
@ -0,0 +1,76 @@
|
||||
|
||||
Subject: manager: Properly show domain names with reserved XML characters
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:11:43 2011 -0400
|
||||
Date: Mon Aug 29 12:11:43 2011 -0400:
|
||||
Git: 8a513361522780fcc126ec2ded48839ecc24ef6e
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/delete.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/delete.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/delete.py
|
||||
@@ -91,7 +91,7 @@ class vmmDeleteDialog(vmmGObjectUI):
|
||||
|
||||
# Set VM name in title'
|
||||
title_str = ("<span size='x-large'>%s '%s'</span>" %
|
||||
- (_("Delete"), self.vm.get_name()))
|
||||
+ (_("Delete"), util.xml_escape(self.vm.get_name())))
|
||||
self.widget("delete-main-label").set_markup(title_str)
|
||||
|
||||
self.widget("delete-cancel").grab_focus()
|
||||
Index: virt-manager-0.9.0/src/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/manager.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/manager.py
|
||||
@@ -701,12 +701,12 @@ class vmmManager(vmmGObjectUI):
|
||||
return hint
|
||||
|
||||
def _build_conn_markup(self, conn, row):
|
||||
+ name = util.xml_escape(row[ROW_NAME])
|
||||
+ text = name
|
||||
if conn.state == conn.STATE_DISCONNECTED:
|
||||
- text = str(row[ROW_NAME]) + " - " + _("Not Connected")
|
||||
+ text += " - " + _("Not Connected")
|
||||
elif conn.state == conn.STATE_CONNECTING:
|
||||
- text = str(row[ROW_NAME]) + " - " + _("Connecting...")
|
||||
- else:
|
||||
- text = str(row[ROW_NAME])
|
||||
+ text += " - " + _("Connecting...")
|
||||
|
||||
markup = "<span size='smaller'>%s</span>" % text
|
||||
return markup
|
||||
@@ -720,7 +720,7 @@ class vmmManager(vmmGObjectUI):
|
||||
|
||||
def _build_vm_markup(self, row):
|
||||
domtext = ("<span size='smaller' weight='bold'>%s</span>" %
|
||||
- row[ROW_NAME])
|
||||
+ util.xml_escape(row[ROW_NAME]))
|
||||
statetext = "<span size='smaller'>%s</span>" % row[ROW_STATUS]
|
||||
return domtext + "\n" + statetext
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/migrate.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/migrate.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/migrate.py
|
||||
@@ -122,7 +122,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||
|
||||
def reset_state(self):
|
||||
title_str = ("<span size='large' color='white'>%s '%s'</span>" %
|
||||
- (_("Migrate"), self.vm.get_name()))
|
||||
+ (_("Migrate"), util.xml_escape(self.vm.get_name())))
|
||||
self.widget("migrate-main-label").set_markup(title_str)
|
||||
|
||||
self.widget("migrate-cancel").grab_focus()
|
||||
Index: virt-manager-0.9.0/src/virtManager/util.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/util.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/util.py
|
||||
@@ -29,6 +29,8 @@ import virtinst
|
||||
|
||||
running_config = None
|
||||
|
||||
+xml_escape = virtinst.util.xml_escape
|
||||
+
|
||||
# FIXME: selinux policy also has a ~/VirtualMachines/isos dir
|
||||
def get_default_pool_path(conn):
|
||||
if conn.is_session_uri():
|
71
virtman-finish-button-fix.diff
Normal file
71
virtman-finish-button-fix.diff
Normal file
@ -0,0 +1,71 @@
|
||||
|
||||
Subject: Fixed the Finish button on the start pool command.
|
||||
From: Darryl L. Pierce dpierce@redhat.com Fri Jul 22 11:05:15 2011 -0400
|
||||
Date: Sat Jul 30 07:53:47 2011 -0400:
|
||||
Git: 2b5b8a8b35b79977a0e9aacf6a6fb6f48edf475f
|
||||
|
||||
The Finish button is now shown on the final page, and the final page
|
||||
displays confirmation that a pool was stopped.
|
||||
|
||||
Subject: Fixed the Finish button on the stop pool command.
|
||||
From: Darryl L. Pierce dpierce@redhat.com Fri Jul 22 11:20:15 2011 -0400
|
||||
Date: Sat Jul 30 07:53:47 2011 -0400:
|
||||
Git: 4ad89abd508d37e27df39de669c9ea83a77c22ac
|
||||
|
||||
The Finish button is now displayed on the last page where the stopping
|
||||
is confirmed to the user.
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManagerTui/startpool.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManagerTui/startpool.py
|
||||
+++ virt-manager-0.9.0/src/virtManagerTui/startpool.py
|
||||
@@ -37,10 +37,6 @@ class StartStoragePoolConfigScreen(Stora
|
||||
def page_has_next(self, page):
|
||||
return page is LIST_POOLS_PAGE and self.has_selectable_pools()
|
||||
|
||||
- def page_has_back(self, page):
|
||||
- ignore = page
|
||||
- return False
|
||||
-
|
||||
def page_has_finish(self, page):
|
||||
return page is FINAL_PAGE
|
||||
|
||||
@@ -55,10 +51,10 @@ class StartStoragePoolConfigScreen(Stora
|
||||
def process_input(self, page):
|
||||
if page is LIST_POOLS_PAGE:
|
||||
self.get_libvirt().create_storage_pool(self.get_selected_pool())
|
||||
- self.set_finished()
|
||||
|
||||
def get_final_page(self, screen):
|
||||
ignore = screen
|
||||
+ self.set_finished()
|
||||
return [snack.Label("Storage pool started: %s" % self.get_selected_pool())]
|
||||
|
||||
def StartStoragePool():
|
||||
Index: virt-manager-0.9.0/src/virtManagerTui/stoppool.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManagerTui/stoppool.py
|
||||
+++ virt-manager-0.9.0/src/virtManagerTui/stoppool.py
|
||||
@@ -37,10 +37,6 @@ class StopStoragePoolConfigScreen(Storag
|
||||
def page_has_next(self, page):
|
||||
return page is LIST_POOLS_PAGE and self.has_selectable_pools()
|
||||
|
||||
- def page_has_back(self, page):
|
||||
- ignore = page
|
||||
- return False
|
||||
-
|
||||
def page_has_finish(self, page):
|
||||
return page is FINAL_PAGE
|
||||
|
||||
@@ -55,10 +51,10 @@ class StopStoragePoolConfigScreen(Storag
|
||||
def process_input(self, page):
|
||||
if page is LIST_POOLS_PAGE:
|
||||
self.get_libvirt().destroy_storage_pool(self.get_selected_pool())
|
||||
- self.set_finished()
|
||||
|
||||
def get_final_page(self, screen):
|
||||
ignore = screen
|
||||
+ self.set_finished()
|
||||
return [snack.Label("Storage pool stopped: %s" % self.get_selected_pool())]
|
||||
|
||||
def StopStoragePool():
|
31
virtman-grep-fix.diff
Normal file
31
virtman-grep-fix.diff
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Subject: grep -q Portability
|
||||
From: Richard Laager rlaager@wiktel.com Mon Aug 8 15:42:18 2011 -0500
|
||||
Date: Tue Aug 9 11:33:31 2011 -0400:
|
||||
Git: d078def94fda124304da95733d41844384e739ad
|
||||
|
||||
I don't think I've sent this one to the list yet.
|
||||
|
||||
The nc -q autodetection code fails if the target system's grep does not
|
||||
have a -q argument (quite the ironic coincidence). I believe -q is
|
||||
specified by POSIX, but Solaris 11's /bin/grep does not support -q.
|
||||
Redirecting to /dev/null works portably. (In fact, this is even
|
||||
recommended in favor of -q for portability by GNU grep's man page.)
|
||||
|
||||
This needs to be changed in virt-manager's src/virtManager/console.py.
|
||||
|
||||
Richard
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/console.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/console.py
|
||||
@@ -93,7 +93,7 @@ class Tunnel(object):
|
||||
nc_params = "%s %s" % (gaddr, gport)
|
||||
|
||||
nc_cmd = (
|
||||
- """nc -q 2>&1 | grep -q "requires an argument";"""
|
||||
+ """nc -q 2>&1 | grep "requires an argument" >/dev/null;"""
|
||||
"""if [ $? -eq 0 ] ; then"""
|
||||
""" CMD="nc -q 0 %(nc_params)s";"""
|
||||
"""else"""
|
20
virtman-netstats-fix.diff
Normal file
20
virtman-netstats-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: domain: Fix typo that broke net stats gathering
|
||||
From: Cole Robinson crobinso@redhat.com Wed Jul 27 12:02:29 2011 -0400
|
||||
Date: Wed Jul 27 12:02:29 2011 -0400:
|
||||
Git: 62a762e77f2f5e5298ececda6fb4638b8488da4a
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/domain.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/domain.py
|
||||
@@ -1448,7 +1448,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||
def _sample_network_traffic(self):
|
||||
rx = 0
|
||||
tx = 0
|
||||
- if (not self._stats_net_supported or not
|
||||
+ if (not self._stats_net_supported or
|
||||
not self._enable_net_poll or
|
||||
not self.is_active()):
|
||||
return rx, tx
|
68
virtman-no-cd-present-fix.diff
Normal file
68
virtman-no-cd-present-fix.diff
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
Subject: Fixes the TUI error when no CD is present for a CD installation.
|
||||
From: Darryl L. Pierce dpierce@redhat.com Fri Aug 5 10:43:52 2011 -0400
|
||||
Date: Tue Aug 9 11:53:36 2011 -0400:
|
||||
Git: a885407aa106fb2cddf2fc5576634a93b60a460b
|
||||
|
||||
Before displaying the install media selection list it first ensures that
|
||||
there is data to display.
|
||||
|
||||
If no install media was detected, a message is shown and the user cannot
|
||||
proceed. They instead must move back and select another installation
|
||||
path.
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManagerTui/adddomain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManagerTui/adddomain.py
|
||||
+++ virt-manager-0.9.0/src/virtManagerTui/adddomain.py
|
||||
@@ -150,7 +150,7 @@ class DomainConfigScreen(VmmTuiConfigScr
|
||||
elif page is SELECT_CDROM_PAGE:
|
||||
if self.__install_media.getSelection() != None:
|
||||
if len(self.get_libvirt().list_installable_volumes()) == 0:
|
||||
- errors.append("No installable media is available.")
|
||||
+ errors.append("No installable media detected.")
|
||||
else:
|
||||
return True
|
||||
else:
|
||||
@@ -349,6 +349,8 @@ class DomainConfigScreen(VmmTuiConfigScr
|
||||
return self.__has_pools
|
||||
elif page is SELECT_VOLUME_PAGE:
|
||||
return self.__has_volumes
|
||||
+ elif page is SELECT_CDROM_PAGE:
|
||||
+ return self.__has_install_media
|
||||
elif page < CONFIRM_PAGE:
|
||||
return True
|
||||
|
||||
@@ -384,17 +386,23 @@ class DomainConfigScreen(VmmTuiConfigScr
|
||||
grid]
|
||||
|
||||
def get_select_cdrom_page(self, screen):
|
||||
- drives = []
|
||||
+ fields = []
|
||||
+ self.__has_install_media = False
|
||||
devs = self.get_libvirt().list_installable_volumes()
|
||||
- for dev in devs:
|
||||
- row = [dev.pretty_label(), dev.get_path(),
|
||||
- self.__config.is_install_media(dev.get_path())]
|
||||
- drives.append(row)
|
||||
- self.__install_media = snack.RadioBar(screen, (drives))
|
||||
- grid = snack.Grid(1, 1)
|
||||
- grid.setField(self.__install_media, 0, 0)
|
||||
+ if len(devs) > 0:
|
||||
+ drives = []
|
||||
+ for dev in devs:
|
||||
+ row = [dev.pretty_label(), dev.get_path(),
|
||||
+ self.__config.is_install_media(dev.get_path())]
|
||||
+ drives.append(row)
|
||||
+ if len(drives) > 0:
|
||||
+ self.__has_install_media = True
|
||||
+ self.__install_media = snack.RadioBar(screen, (drives))
|
||||
+ fields.append((self.__install_media, None))
|
||||
+ if self.__has_install_media == False:
|
||||
+ fields.append(("No media detected.", None))
|
||||
return [snack.Label("Select the install media"),
|
||||
- grid]
|
||||
+ self.create_grid_from_fields(fields)]
|
||||
|
||||
def get_select_iso_page(self, screen):
|
||||
ignore = screen
|
38
virtman-resize-menu-fix.diff
Normal file
38
virtman-resize-menu-fix.diff
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
Subject: virt-manager: Fix "Resize to VM" menu option
|
||||
From: Marc Deslauriers marc.deslauriers@canonical.com Fri Aug 19 11:50:11 2011 -0400
|
||||
Date: Tue Aug 23 15:48:30 2011 -0400:
|
||||
Git: a815fa17a7c643ddde8ea326399e2bee449dff98
|
||||
|
||||
Hello,
|
||||
|
||||
This patch fixes the "Resize to VM" menu option by correcting inverted return
|
||||
values in autodrawer.py.
|
||||
|
||||
Thanks,
|
||||
|
||||
Marc.
|
||||
|
||||
commit 8e666f4b87926c866ed35e58eb82213d2c514e89
|
||||
Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
|
||||
Date: Fri Aug 19 11:46:48 2011 -0400
|
||||
|
||||
Fix inverted width and height
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/autodrawer.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/autodrawer.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/autodrawer.py
|
||||
@@ -271,10 +271,10 @@ class OverBox(parentclass):
|
||||
self.underWin = None
|
||||
|
||||
def do_size_request(self, req):
|
||||
- height, width = self._size_request()
|
||||
+ width, height = self._size_request()
|
||||
|
||||
- req.height = height
|
||||
req.width = width
|
||||
+ req.height = height
|
||||
|
||||
def do_size_allocate(self, newalloc):
|
||||
self.allocation = newalloc
|
73
virtman-set-has-window-fix.diff
Normal file
73
virtman-set-has-window-fix.diff
Normal file
@ -0,0 +1,73 @@
|
||||
|
||||
Subject: autodrawer: Make it work on RHEL6
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 2 12:54:21 2011 -0400
|
||||
Date: Tue Aug 2 12:55:02 2011 -0400:
|
||||
Git: 347b02b29fbe984f63c05f705d76ef95b3545c96
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/autodrawer.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/autodrawer.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/autodrawer.py
|
||||
@@ -27,6 +27,21 @@ import gtk
|
||||
|
||||
parentclass = gtk.VBox
|
||||
|
||||
+def _set_has_window(widget, val):
|
||||
+ if hasattr(widget, "set_has_window"):
|
||||
+ # Only available on gtk 2.18 or later
|
||||
+ widget.set_has_window(val)
|
||||
+ elif val:
|
||||
+ widget.set_flags(widget.flags() & ~gtk.NO_WINDOW)
|
||||
+ else:
|
||||
+ widget.set_flags(widget.flags() | gtk.NO_WINDOW)
|
||||
+
|
||||
+def _is_toplevel(widget):
|
||||
+ if hasattr(widget, "is_toplevel"):
|
||||
+ # Only available on gtk 2.18 or later
|
||||
+ return widget.is_toplevel()
|
||||
+ return bool(widget.flags() & gtk.TOPLEVEL)
|
||||
+
|
||||
class OverBox(parentclass):
|
||||
"""
|
||||
Implementation of an overlapping box
|
||||
@@ -44,7 +59,7 @@ class OverBox(parentclass):
|
||||
self._fraction = 0
|
||||
self.verticalOffset = 0
|
||||
|
||||
- self.set_has_window(True)
|
||||
+ _set_has_window(self, True)
|
||||
|
||||
####################
|
||||
# Internal helpers #
|
||||
@@ -418,7 +433,7 @@ class AutoDrawer(Drawer):
|
||||
|
||||
def _update(self, do_immediate):
|
||||
toplevel = self.get_toplevel()
|
||||
- if not toplevel or not toplevel.is_toplevel():
|
||||
+ if not toplevel or not _is_toplevel(toplevel):
|
||||
# The autoDrawer cannot function properly without a toplevel.
|
||||
return
|
||||
|
||||
@@ -535,10 +550,10 @@ class AutoDrawer(Drawer):
|
||||
def _on_hierarchy_changed(self, oldTopLevel, ignore):
|
||||
newTopLevel = self.get_toplevel()
|
||||
|
||||
- if oldTopLevel and oldTopLevel.is_toplevel():
|
||||
+ if oldTopLevel and _is_toplevel(oldTopLevel):
|
||||
oldTopLevel.disconnect_by_func(self._set_focus)
|
||||
|
||||
- if newTopLevel and newTopLevel.is_toplevel():
|
||||
+ if newTopLevel and _is_toplevel(newTopLevel):
|
||||
newTopLevel.connect_after("set_focus", self._set_focus)
|
||||
|
||||
self._update(True)
|
||||
@@ -589,7 +604,7 @@ class AutoDrawer(Drawer):
|
||||
|
||||
def drawer_close(self):
|
||||
toplevel = self.get_toplevel()
|
||||
- if not toplevel or not toplevel.is_toplevel():
|
||||
+ if not toplevel or not _is_toplevel(toplevel):
|
||||
# The autoDrawer cannot function properly without a toplevel.
|
||||
return
|
||||
|
40
virtman-shutoff-fix.diff
Normal file
40
virtman-shutoff-fix.diff
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
Subject: virt-manager: Show if the shut off vm has a saved image
|
||||
From: Miklos Vajna vmiklos@frugalware.org Sat Jul 30 22:15:44 2011 +0200
|
||||
Date: Mon Aug 1 16:16:40 2011 -0400:
|
||||
Git: 927daf1e1354c282373f468e3ae50e1ca1c1d246
|
||||
|
||||
Hi,
|
||||
|
||||
So far in virt-manager one had to click on a shut off vm in the
|
||||
"Shutoff" state to see if it has a saved image: once the item is
|
||||
selected then the "play" icon will be "Run" or "Restore". This means
|
||||
that in case one has a lot of VMs, it's hard to get an overview of what
|
||||
VM has a saved image and what not.
|
||||
|
||||
The attached patch changes the "Shutoff" status message to "Saved" in
|
||||
case the vm has a saved image.
|
||||
|
||||
Thanks.
|
||||
|
||||
>From 14445dc510fcc55c267649295246984972691885 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@frugalware.org>
|
||||
Date: Sat, 30 Jul 2011 22:02:48 +0200
|
||||
Subject: [PATCH] domain: Show if the shut off vm has a saved image
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/domain.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/domain.py
|
||||
@@ -1334,7 +1334,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
elif self.status() == libvirt.VIR_DOMAIN_SHUTDOWN:
|
||||
return _("Shutting Down")
|
||||
elif self.status() == libvirt.VIR_DOMAIN_SHUTOFF:
|
||||
- return _("Shutoff")
|
||||
+ if self.hasSavedImage():
|
||||
+ return _("Saved")
|
||||
+ else:
|
||||
+ return _("Shutoff")
|
||||
elif self.status() == libvirt.VIR_DOMAIN_CRASHED:
|
||||
return _("Crashed")
|
||||
|
20
virtman-storage-pool-fix.diff
Normal file
20
virtman-storage-pool-fix.diff
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Subject: storagepool: Fix RHEL6 gtk compat issue
|
||||
From: Cole Robinson crobinso@redhat.com Wed Aug 24 12:52:46 2011 -0400
|
||||
Date: Wed Aug 24 12:52:46 2011 -0400:
|
||||
Git: 14586040349d40e4a437361ea09e6bb98776a34f
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/createpool.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/createpool.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/createpool.py
|
||||
@@ -391,7 +391,7 @@ class vmmCreatePool(vmmGObjectUI):
|
||||
|
||||
def get_config_iqn(self):
|
||||
iqn = self.widget("pool-iqn")
|
||||
- if iqn.get_sensitive() and iqn.get_property("visible"):
|
||||
+ if iqn.get_property("sensitive") and iqn.get_property("visible"):
|
||||
return iqn.get_text().strip()
|
||||
return None
|
||||
|
49
virtman-unapplied-changes-fix.diff
Normal file
49
virtman-unapplied-changes-fix.diff
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
Subject: details: Fix confusion when removing device with unapplied changes
|
||||
From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:47:44 2011 -0400
|
||||
Date: Mon Aug 29 12:53:02 2011 -0400:
|
||||
Git: 41e6d7b0f4eacb3991710a047a5dc708c7ef97a6
|
||||
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/details.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/details.py
|
||||
@@ -1098,7 +1098,10 @@ class vmmDetails(vmmGObjectUI):
|
||||
def get_boot_selection(self):
|
||||
return self.get_selected_row(self.widget("config-boot-list"))
|
||||
|
||||
- def set_hw_selection(self, page):
|
||||
+ def set_hw_selection(self, page, disable_apply=True):
|
||||
+ if disable_apply:
|
||||
+ self.widget("config-apply").set_sensitive(False)
|
||||
+
|
||||
hwlist = self.widget("hw-list")
|
||||
selection = hwlist.get_selection()
|
||||
selection.select_path(str(page))
|
||||
@@ -1119,7 +1122,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
page = self.get_hw_selection(HW_LIST_COL_TYPE)
|
||||
if page is None:
|
||||
page = HW_LIST_TYPE_GENERAL
|
||||
- self.widget("hw-list").get_selection().select_path(0)
|
||||
+ self.set_hw_selection(0)
|
||||
|
||||
return page
|
||||
|
||||
@@ -1168,7 +1171,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
if self.compare_hw_rows(model[idx], oldrow):
|
||||
pageidx = idx
|
||||
break
|
||||
- self.set_hw_selection(pageidx)
|
||||
+ self.set_hw_selection(pageidx, disable_apply=False)
|
||||
else:
|
||||
self.oldhwrow = newrow
|
||||
self.hw_selected()
|
||||
@@ -2259,6 +2262,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
detach_err = (str(e), "".join(traceback.format_exc()))
|
||||
|
||||
if not detach_err:
|
||||
+ self.widget("config-apply").set_sensitive(False)
|
||||
return
|
||||
|
||||
self.err.show_err(
|
25
virtman-vcpu-count-fix.diff
Normal file
25
virtman-vcpu-count-fix.diff
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Subject: domain: Don't fetch XML on tick to get vcpu count
|
||||
From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:47:31 2011 -0400
|
||||
Date: Tue Aug 23 15:48:30 2011 -0400:
|
||||
Git: 9dc799af9c3d4fab926ee41685d68642c95593fe
|
||||
|
||||
It's available in the domain info structure. Saves us from hammering
|
||||
xenstored and just plain doing to much work on every tick.
|
||||
|
||||
Index: virt-manager-0.9.0/src/virtManager/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.9.0.orig/src/virtManager/domain.py
|
||||
+++ virt-manager-0.9.0/src/virtManager/domain.py
|
||||
@@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
|
||||
if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF,
|
||||
libvirt.VIR_DOMAIN_CRASHED]):
|
||||
+ guestcpus = info[3]
|
||||
cpuTime = info[4] - prevCpuTime
|
||||
cpuTimeAbs = info[4]
|
||||
hostcpus = self.conn.host_active_processor_count()
|
||||
- guestcpus = self.vcpu_count()
|
||||
|
||||
pcentbase = (((cpuTime) * 100.0) /
|
||||
((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0))
|
Loading…
Reference in New Issue
Block a user