diff --git a/tests/qemuagentdata/fsinfo.xml b/tests/qemuagentdata/fsinfo.xml
index 233968fc29..914c2828c6 100644
--- a/tests/qemuagentdata/fsinfo.xml
+++ b/tests/qemuagentdata/fsinfo.xml
@@ -5,7 +5,7 @@
   <currentMemory unit='KiB'>219136</currentMemory>
   <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='i686' machine='pc'>hvm</type>
+    <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
   <clock offset='utc'/>
@@ -13,7 +13,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='file' device='disk'>
       <source file='/tmp/idedisk.img'/>
       <target dev='hdc' bus='ide'/>
diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c
index 3c24a3139f..3287880241 100644
--- a/tests/qemuagenttest.c
+++ b/tests/qemuagenttest.c
@@ -1359,11 +1359,19 @@ testQemuAgentTimezone(const void *data)
 static int
 mymain(void)
 {
+    g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps();
+    g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref);
     int ret = 0;
 
     if (qemuTestDriverInit(&driver) < 0)
         return EXIT_FAILURE;
 
+    /* Some test cases need a real definition thus parse a XML. We need
+     * qemu capabilities for that. */
+    if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "",
+                               capslatest, capscache, NULL, NULL) < 0)
+        return EXIT_FAILURE;
+
     virEventRegisterDefaultImpl();
 
 #define DO_TEST(name) \