diff -u virt-manager-0.5.3/debian/patches/series virt-manager-0.5.3/debian/patches/series --- virt-manager-0.5.3/debian/patches/series +++ virt-manager-0.5.3/debian/patches/series @@ -14,0 +15 @@ +kvm_rw_test.patch diff -u virt-manager-0.5.3/debian/changelog virt-manager-0.5.3/debian/changelog --- virt-manager-0.5.3/debian/changelog +++ virt-manager-0.5.3/debian/changelog @@ -1,3 +1,12 @@ +virt-manager (0.5.3-0ubuntu10) hardy; urgency=low + + * debian/patches/kvm_rw_test.patch, debian/patches/series, + src/virtManager/create.py: Test read/write access to /dev/kvm before + trying to create a new virtual machine, display a message about missing + group membership if rw access fails. (LP: #187048) + + -- Dustin Kirkland Wed, 30 Apr 2008 01:03:39 -0500 + virt-manager (0.5.3-0ubuntu9) hardy; urgency=low [ Jamie Strandboge ] only in patch2: unchanged: --- virt-manager-0.5.3.orig/debian/patches/kvm_rw_test.patch +++ virt-manager-0.5.3/debian/patches/kvm_rw_test.patch @@ -0,0 +1,20 @@ +--- virt-manager-0.5.3/src/virtManager/create.py.orig 2008-01-10 19:17:51.000000000 -0600 ++++ virt-manager-0.5.3/src/virtManager/create.py 2008-04-30 01:07:37.783838895 -0500 +@@ -759,6 +759,17 @@ class vmmCreate(gobject.GObject): + + def validate(self, page_num): + ++ # Test read/write access to /dev/kvm ++ try: ++ f = open("/dev/kvm", "r+") ++ f.close() ++ except IOError, e: ++ username = pwd.getpwuid(os.getuid())[0] ++ msg = str(e) + "\n\nHint: `sudo adduser " + username + " kvm`\n" ++ msg += "Logout of this session, and then log back in.\n" ++ self._validation_error_box(_("Incorrect Group Membership"), _(msg)) ++ return False ++ + # Setting the values in the Guest/Disk/Network virtinst objects + # provides a lot of error checking for free, we just have to catch + # the messages