[Bug 351365] Re: Libvirt detection of KVM 64 bit abilities is broke

2009-05-07 Thread Soren Hansen
This is fixed in Jaunty (and was in fact fixed three days before your
bug was filed) :)

Also, never, ever, ever, *ever* manually touch the files in
/etc/libvirt/. Always use virsh.

** Changed in: libvirt (Ubuntu)
   Status: New => Fix Released

-- 
Libvirt detection of KVM 64 bit abilities is broke
https://bugs.launchpad.net/bugs/351365
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 351365] Re: Libvirt detection of KVM 64 bit abilities is broke

2009-03-30 Thread quentusrex
Alright, to fix this issue, here is a work around:

Either edit the files directly for your 'guests' in
/etc/libvirt/qemu/*.xml

or you just run the command virsh edit 

To see a list of the domains do: virsh list

Now, just edit the arch to what it needs to be. For me I had to edit
from 'i686' to 'x86_64'.

-- 
Libvirt detection of KVM 64 bit abilities is broke
https://bugs.launchpad.net/bugs/351365
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 351365] Re: Libvirt detection of KVM 64 bit abilities is broke

2009-03-30 Thread quentusrex
Index: libvirt-0.6.1/src/capabilities.c
===
--- libvirt-0.6.1.orig/src/capabilities.c   2009-03-19 15:18:09.483317579 
+0100
+++ libvirt-0.6.1/src/capabilities.c2009-03-19 15:42:31.027341187 +0100
@@ -468,14 +468,26 @@
  */
 extern const char *
 virCapabilitiesDefaultGuestArch(virCapsPtr caps,
-const char *ostype)
+const char *ostype,
+const char *domain)
 {
-int i;
+int i, j;
+const char *arch = NULL;
 for (i = 0 ; i < caps->nguests ; i++) {
-if (STREQ(caps->guests[i]->ostype, ostype))
-return caps->guests[i]->arch.name;
+if (STREQ(caps->guests[i]->ostype, ostype)) {
+for (j = 0 ; j < caps->guests[i]->arch.ndomains ; j++) {
+if (STREQ(caps->guests[i]->arch.domains[j]->type, domain)) {
+/* Use the first match... */
+if (!arch)
+arch = caps->guests[i]->arch.name;
+/* ...unless we can match the host's architecture. */
+if (STREQ(caps->guests[i]->arch.name, caps->host.arch))
+return caps->guests[i]->arch.name;
+}
+}
+}
 }
-return NULL;
+return arch;
 }

 /**
Index: libvirt-0.6.1/src/capabilities.h
===
--- libvirt-0.6.1.orig/src/capabilities.h   2009-03-19 15:18:09.507338228 
+0100
+++ libvirt-0.6.1/src/capabilities.h2009-03-19 15:42:31.027341187 +0100
@@ -177,7 +177,8 @@

 extern const char *
 virCapabilitiesDefaultGuestArch(virCapsPtr caps,
-const char *ostype);
+const char *ostype,
+const char *domain);
 extern const char *
 virCapabilitiesDefaultGuestMachine(virCapsPtr caps,
const char *ostype,
Index: libvirt-0.6.1/src/domain_conf.c
===
--- libvirt-0.6.1.orig/src/domain_conf.c2009-03-19 15:18:09.531341976 
+0100
+++ libvirt-0.6.1/src/domain_conf.c 2009-03-19 15:42:31.031345327 +0100
@@ -2146,7 +2146,7 @@
 goto error;
 }
 } else {
-const char *defaultArch = virCapabilitiesDefaultGuestArch(caps, 
def->os.type);
+const char *defaultArch = virCapabilitiesDefaultGuestArch(caps, 
def->os.type, virDomainVirtTypeToString(def->virtType));
 if (defaultArch == NULL) {
 virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
  _("no supported architecture for os type 
'%s'"),
Index: libvirt-0.6.1/src/xm_internal.c
===
--- libvirt-0.6.1.orig/src/xm_internal.c2009-03-19 15:18:09.559316828 
+0100
+++ libvirt-0.6.1/src/xm_internal.c 2009-03-19 15:42:45.807318313 +0100
@@ -695,7 +695,7 @@
 if (!(def->os.type = strdup(hvm ? "hvm" : "xen")))
 goto no_memory;

-defaultArch = virCapabilitiesDefaultGuestArch(priv->caps, def->os.type);
+defaultArch = virCapabilitiesDefaultGuestArch(priv->caps, def->os.type, 
virDomainVirtTypeToString(def->virtType));
 if (defaultArch == NULL) {
 xenXMError(conn, VIR_ERR_INTERNAL_ERROR,
_("no supported architecture for os type '%s'"),

--

-- 
Libvirt detection of KVM 64 bit abilities is broke
https://bugs.launchpad.net/bugs/351365
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs