[PATCH 0/2 V2] Add option to add/remove fonts files in rpm packages
by alinefm@linux.vnet.ibm.com
From: Aline Manera <alinefm(a)linux.vnet.ibm.com>
V1 - V2:
- Remove useless fonts
- Set SUBDIRS according to FONTS (Zheng Sheng)
- Set --enable-fonts as default behavior
- Explict verify with_fonts value to enable its use outside make process
- Add the same behavior to suse spec file
Aline Manera (1):
Remove useless fonts
ShaoHe Feng (1):
Add option to add/remove fonts files in rpm packages
Makefile.am | 8 +++++++-
configure.ac | 12 ++++++++++++
contrib/kimchi.spec.fedora.in | 19 ++++++++++++++-----
contrib/kimchi.spec.suse.in | 11 ++++++++++-
ui/css/Makefile.am | 6 +++++-
ui/css/fonts/Makefile.am | 4 ----
ui/css/fonts/fontawesome-webfont.eot | Bin 25395 -> 0 bytes
ui/css/fonts/fontawesome-webfont.ttf | Bin 55096 -> 0 bytes
ui/css/fonts/fontawesome-webfont.woff | Bin 29380 -> 0 bytes
9 files changed, 48 insertions(+), 12 deletions(-)
delete mode 100644 ui/css/fonts/fontawesome-webfont.eot
delete mode 100644 ui/css/fonts/fontawesome-webfont.ttf
delete mode 100644 ui/css/fonts/fontawesome-webfont.woff
--
1.9.3
10 years, 5 months
[PATCH v7 0/4] Host device passthrough: Summary
by Zhou Zheng Sheng
Hi,
This patch series is to enable Kimchi to assign hos devices directly to
a VM, thus greately improve VM performance. Currently we support assigning
PCI device, USB device and SCSI LUN. For example, we can assign an NIC
to VM to improve guest network throughput, or passthrough a USB camera
to enable the guest OS to record video.
Host devices form a tree. We can assign most of the devices in the tree
to VM. By assigning a device, all the devices in its sub-tree are also
assigned. It might not make sense to assign a USB controller, because
the host may be using one of the devices connected to the controller.
Instead, Kimchi just presents the "leaf" devices to assign to guest.
In recent Linux kernel and KVM, it is able to recognize the IOMMU group
of a PCI device. The "leaf" PCI devices in the same IOMMU group should
be assigned and dismissed together. The IOMMU group is the actual
smallest isolation granularity of the PCI devices.
The first patch is to list all host devices information. It's useful on
its own to show host devices information.
The second patch is to list all eligible host devices to assign, as well
as the "affected" devices in the same IOMMU group.
The third patch creates a sub-collection "hostdevs" to the VM resource,
and deals with assigning and dismissing devices.
The fourth patch adds a sub-collection "vm_holders" to the host device
resource. It's to list all VMs that are holding the device.
I'll update API and unit test once everyone is happy with the interface
and logic.
v7:
Some minor coding style improvements.
v6:
Do not passthrough PCI device of class code 0x07. It might contains
system device not suitable to assign to guest.
v5:
Filter ealigible pci devices according to pci class. When assigning a
device to VM, check if there are other VMs holding it. Use
"kimchi.model.utils.get_vm_config_flag()" to correctly set the device
attaching API flag.
v4:
Add new sub-collection to host device to list the VMs holding the device.
v3:
Fix a small naming error introduced by rebase.
v2:
Handle the devices in VM's sub-collection "hostdevs".
v1:
Handle the devices in VM template.
Zhou Zheng Sheng (4):
Host device passthrough: List all types of host devices
Host device passthrough: List eligible device to passthrough
Host device passthrough: Directly assign and dissmis host device from
VM
Host device passthrough: List VMs that are holding a host device
docs/API.md | 11 +-
src/kimchi/control/host.py | 16 ++
src/kimchi/control/vm/hostdevs.py | 44 +++++
src/kimchi/featuretests.py | 10 +-
src/kimchi/hostdev.py | 311 +++++++++++++++++++++++++++++++
src/kimchi/i18n.py | 9 +
src/kimchi/mockmodel.py | 7 +-
src/kimchi/model/config.py | 2 +
src/kimchi/model/host.py | 32 ++--
src/kimchi/model/libvirtstoragepool.py | 18 +-
src/kimchi/model/vmhostdevs.py | 323 +++++++++++++++++++++++++++++++++
src/kimchi/rollbackcontext.py | 3 +
src/kimchi/xmlutils.py | 26 ++-
tests/test_rest.py | 6 +-
tests/test_storagepool.py | 7 +-
15 files changed, 786 insertions(+), 39 deletions(-)
create mode 100644 src/kimchi/control/vm/hostdevs.py
create mode 100644 src/kimchi/hostdev.py
create mode 100644 src/kimchi/model/vmhostdevs.py
--
1.9.3
10 years, 5 months
[PATCH] Have the quote deleted from the url located in "lastPage"
by wenwang@linux.vnet.ibm.com
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
Enabled Redirection for reload by having the quote deleted from
the url located in "lastPage"
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.login.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ui/js/src/kimchi.login.js b/ui/js/src/kimchi.login.js
index a547999..0c11e45 100644
--- a/ui/js/src/kimchi.login.js
+++ b/ui/js/src/kimchi.login.js
@@ -55,7 +55,7 @@ kimchi.login_main = function() {
}
else {
// lastPage is displayed with " ". How to exclude " " from string?
- var lastPage = kimchi.cookie.get('lastPage');
+ var lastPage = kimchi.cookie.get('lastPage').replace(/\"/g,'');
var next_url = lastPage ? lastPage : "/"
}
window.location.replace(next_url)
--
1.7.1
10 years, 5 months
[PATCH 0/2] Doc and testcases: Create template from image
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
This patch is to present the api definition and clean original cdrom based template
creation implementation.
Royce Lv (2):
Change doc and api specification
Change 'cdrom' to a optional param
docs/API.md | 3 ++-
src/kimchi/API.json | 8 +++++++-
src/kimchi/control/templates.py | 2 +-
src/kimchi/i18n.py | 3 ++-
src/kimchi/mockmodel.py | 26 ++++++++++++++++++++------
src/kimchi/model/templates.py | 13 ++++++++-----
src/kimchi/vmtemplate.py | 12 ++++++++++--
tests/test_rest.py | 2 +-
8 files changed, 51 insertions(+), 18 deletions(-)
--
1.8.3.2
10 years, 5 months
[PATCHv2] Add image probe function
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
v1>v2, Add handling exception.
Image file probe will be used in identify image file os info and
generate reasonable configuration for it.
This will be useful when import image and create a vm from it.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
docs/README.md | 9 ++++++---
src/kimchi/exception.py | 4 ++++
src/kimchi/i18n.py | 4 ++++
src/kimchi/imageinfo.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 62 insertions(+), 3 deletions(-)
create mode 100644 src/kimchi/imageinfo.py
diff --git a/docs/README.md b/docs/README.md
index ab03918..24537e1 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -54,7 +54,8 @@ Install Dependencies
qemu-kvm python-psutil python-ethtool sos \
python-ipaddr python-lxml nfs-utils \
iscsi-initiator-utils libxslt pyparted nginx \
- policycoreutils-python
+ policycoreutils-python python-libguestfs \
+ libguestfs-tools
# If using RHEL6, install the following additional packages:
$ sudo yum install python-unittest2 python-ordereddict
# Restart libvirt to allow configuration changes to take effect
@@ -76,7 +77,8 @@ for more information on how to configure your system to access this repository.
python-pam python-m2crypto python-jsonschema \
qemu-kvm libtool python-psutil python-ethtool \
sosreport python-ipaddr python-lxml nfs-common \
- open-iscsi lvm2 xsltproc python-parted nginx firewalld
+ open-iscsi lvm2 xsltproc python-parted nginx \
+ firewalld python-guestfs libguestfs-tools
Packages version requirement:
python-jsonschema >= 1.3.0
@@ -90,7 +92,8 @@ for more information on how to configure your system to access this repository.
python-pam python-M2Crypto python-jsonschema \
rpm-build kvm python-psutil python-ethtool \
python-ipaddr python-lxml nfs-client open-iscsi \
- libxslt-tools python-xml python-parted
+ libxslt-tools python-xml python-parted \
+ python-libguestfs guestfs-tools
Packages version requirement:
python-psutil >= 0.6.0
diff --git a/src/kimchi/exception.py b/src/kimchi/exception.py
index fcf60cc..6b4c913 100644
--- a/src/kimchi/exception.py
+++ b/src/kimchi/exception.py
@@ -89,5 +89,9 @@ class IsoFormatError(KimchiException):
pass
+class ImageFormatError(KimchiException):
+ pass
+
+
class TimeoutExpired(KimchiException):
pass
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 91684b6..daeeed8 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -61,6 +61,10 @@ messages = {
"'%(user)s' to the ISO path group, or (not recommended) 'chmod -R o+x 'path_to_iso'."
"Details: %(err)s" ),
+ "KCHIMG0001E": _("Error occurs when probing image os information."),
+ "KCHIMG0002E": _("No os information found in given image."),
+ "KCHIMG0003E": _("Unable to find/read image file %(filename)s"),
+
"KCHVM0001E": _("Virtual machine %(name)s already exists"),
"KCHVM0002E": _("Virtual machine %(name)s does not exist"),
"KCHVM0003E": _("Unable to rename virtual machine %(name)s. The name %(new_name)s already exists or it is not powered off."),
diff --git a/src/kimchi/imageinfo.py b/src/kimchi/imageinfo.py
new file mode 100644
index 0000000..26a9480
--- /dev/null
+++ b/src/kimchi/imageinfo.py
@@ -0,0 +1,48 @@
+#
+# Kimchi
+#
+# Copyright IBM Corp, 2013
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+import sys
+import guestfs
+
+from kimchi.exception import ImageFormatError
+
+def probe_image(image_path):
+ g = guestfs.GuestFS(python_return_dict=True)
+ g.add_drive_opts(image_path, readonly=1)
+ g.launch()
+ if not os.access(image_path, os.R_OK):
+ raise ImageFormatError("KCHIMG0003E", {'filename': image_path})
+ try:
+ roots = g.inspect_os()
+ except:
+ raise ImageFormatError("KCHIMG0001E")
+ if len(roots) == 0:
+ raise ImageFormatError("KCHIMG0002E")
+
+ for root in roots:
+ version = "%d.%d" % (g.inspect_get_major_version(root),
+ g.inspect_get_minor_version(root))
+ distro = "%s" % (g.inspect_get_distro(root))
+
+ return (distro, version)
+
+
+if __name__ == '__main__':
+ print probe_image(sys.argv[1])
--
1.8.3.2
10 years, 5 months
[PATCH 0/2] authorization: Backend changes
by alinefm@linux.vnet.ibm.com
From: Aline Manera <alinefm(a)linux.vnet.ibm.com>
This patchset provides the backend changes discussed in "[Kimchi-devel] RFC: Design of Authorization in Kimchi"
Aline Manera (2):
authorization: Update /login to return user roles instead of sudo
parameter
authorization: Add "mode" attribute to describe user view
config/ui/tabs.xml | 10 +++++-----
src/kimchi/auth.py | 12 ++++++++----
tests/test_rest.py | 6 ++++++
tests/utils.py | 6 +++---
4 files changed, 22 insertions(+), 12 deletions(-)
--
1.9.3
10 years, 5 months
[PATCH V2] add an option do not build fonts files in rpm packages
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
ui/css/fonts/novnc/Makefile and ui/css/fonts/Makefile
will not install fonts when build fonts are disabled.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
Makefile.am | 6 +++++-
configure.ac | 12 ++++++++++++
contrib/kimchi.spec.fedora.in | 4 +++-
ui/css/fonts/Makefile.am | 4 ++++
ui/css/fonts/novnc/Makefile.am | 4 ++++
5 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9785de9..e6ff673 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,10 @@
SUBDIRS = src ui docs contrib tests po config plugins
+if FONTS
+WITH_FONTS = --define="with_fonts 1"
+endif
+
ACLOCAL_AMFLAGS = --install -I m4
EXTRA_DIST = \
@@ -134,7 +138,7 @@ rpm: dist kimchi.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/kimchi.spec rpm/SPECS/kimchi.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
- rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
+ rpmbuild -ba $(WITH_FONTS) --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
fedora-rpm: contrib/kimchi.spec.fedora
ln -sf contrib/kimchi.spec.fedora kimchi.spec
diff --git a/configure.ac b/configure.ac
index e5e6441..43cf35f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,18 @@ else
AC_SUBST([ENABLE_SAMPLE], [False])
fi
+AC_ARG_ENABLE(
+ [fonts],
+ [AS_HELP_STRING(
+ [--enable-fonts],
+ [Build fonts files in package @<:@default=no@:>@]
+ )],
+ ,
+ [enable_fonts="no"]
+)
+
+AM_CONDITIONAL([FONTS], [test "${enable_fonts}" = "yes"])
+
AC_CONFIG_FILES([
po/Makefile.in
po/gen-pot
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index 993fd6f..4e863f5 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -61,7 +61,7 @@ Web server application to manage KVM/Qemu virtual machines
%build
-%configure
+%configure %{?with_fonts:--enable-fonts}
make
@@ -154,8 +154,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/kimchi/doc/kimchi-templates.png
%{_datadir}/kimchi/mo/*/LC_MESSAGES/kimchi.mo
%{_datadir}/kimchi/config/ui/*.xml
+%if 0%{?with_fonts}
%{_datadir}/kimchi/ui/css/fonts/fontawesome-webfont.*
%{_datadir}/kimchi/ui/css/fonts/novnc/Orbitron700.*
+%endif
%{_datadir}/kimchi/ui/css/novnc/base.css
%{_datadir}/kimchi/ui/css/theme-default.min.css
%{_datadir}/kimchi/ui/images/*.png
diff --git a/ui/css/fonts/Makefile.am b/ui/css/fonts/Makefile.am
index 63df038..1de082f 100644
--- a/ui/css/fonts/Makefile.am
+++ b/ui/css/fonts/Makefile.am
@@ -19,4 +19,8 @@ SUBDIRS = novnc
fontdir = $(datadir)/kimchi/ui/css/fonts
+if FONTS
dist_font_DATA = fontawesome-webfont.*
+else
+dist_noinst_DATA = fontawesome-webfont.*
+endif
diff --git a/ui/css/fonts/novnc/Makefile.am b/ui/css/fonts/novnc/Makefile.am
index 50f6050..31c428e 100644
--- a/ui/css/fonts/novnc/Makefile.am
+++ b/ui/css/fonts/novnc/Makefile.am
@@ -17,4 +17,8 @@
fontdir = $(datadir)/kimchi/ui/css/fonts/novnc
+if FONTS
dist_font_DATA = Orbitron700.*
+else
+dist_noinst_DATA = Orbitron700.*
+endif
--
1.9.3
10 years, 5 months
[PATCH] add an option do not build fonts files in rpm packages
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
configure will do not generate ui/css/fonts/novnc/Makefile and
ui/css/fonts/Makefile when build fonts are disabled.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
Makefile.am | 6 +++++-
configure.ac | 24 ++++++++++++++++++++++--
contrib/kimchi.spec.fedora.in | 4 +++-
ui/css/Makefile.am | 4 ++++
4 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9785de9..e6ff673 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,10 @@
SUBDIRS = src ui docs contrib tests po config plugins
+if FONTS
+WITH_FONTS = --define="with_fonts 1"
+endif
+
ACLOCAL_AMFLAGS = --install -I m4
EXTRA_DIST = \
@@ -134,7 +138,7 @@ rpm: dist kimchi.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/kimchi.spec rpm/SPECS/kimchi.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
- rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
+ rpmbuild -ba $(WITH_FONTS) --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
fedora-rpm: contrib/kimchi.spec.fedora
ln -sf contrib/kimchi.spec.fedora kimchi.spec
diff --git a/configure.ac b/configure.ac
index e5e6441..2b71cf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,26 @@ else
AC_SUBST([ENABLE_SAMPLE], [False])
fi
+AC_ARG_ENABLE(
+ [fonts],
+ [AS_HELP_STRING(
+ [--enable-fonts],
+ [Build fonts files in package @<:@default=no@:>@]
+ )],
+ ,
+ [enable_fonts="no"]
+)
+
+AM_CONDITIONAL([FONTS], [test "${enable_fonts}" = "yes"])
+
+if test "${enable_fonts}" = "yes"; then
+AC_SUBST([ONVNCFONTS], [ui/css/fonts/novnc/Makefile])
+AC_SUBST([UIFONTS], [ui/css/fonts/Makefile])
+else
+AC_SUBST([ONVNCFONTS], [''])
+AC_SUBST([UIFONTS], [])
+fi
+
AC_CONFIG_FILES([
po/Makefile.in
po/gen-pot
@@ -86,8 +106,6 @@ AC_CONFIG_FILES([
ui/Makefile
ui/css/Makefile
ui/css/novnc/Makefile
- ui/css/fonts/Makefile
- ui/css/fonts/novnc/Makefile
ui/images/Makefile
ui/images/theme-default/Makefile
ui/js/Makefile
@@ -113,6 +131,8 @@ AC_CONFIG_FILES([
tests/Makefile
config/Makefile
config/ui/Makefile
+ $UIFONTS
+ $ONVNCFONTS
],[
chmod +x po/gen-pot
])
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index 993fd6f..4e863f5 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -61,7 +61,7 @@ Web server application to manage KVM/Qemu virtual machines
%build
-%configure
+%configure %{?with_fonts:--enable-fonts}
make
@@ -154,8 +154,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/kimchi/doc/kimchi-templates.png
%{_datadir}/kimchi/mo/*/LC_MESSAGES/kimchi.mo
%{_datadir}/kimchi/config/ui/*.xml
+%if 0%{?with_fonts}
%{_datadir}/kimchi/ui/css/fonts/fontawesome-webfont.*
%{_datadir}/kimchi/ui/css/fonts/novnc/Orbitron700.*
+%endif
%{_datadir}/kimchi/ui/css/novnc/base.css
%{_datadir}/kimchi/ui/css/theme-default.min.css
%{_datadir}/kimchi/ui/images/*.png
diff --git a/ui/css/Makefile.am b/ui/css/Makefile.am
index db65799..020f859 100644
--- a/ui/css/Makefile.am
+++ b/ui/css/Makefile.am
@@ -15,7 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+if FONTS
SUBDIRS = novnc fonts
+else
+SUBDIRS = novnc
+endif
EXTRA_DIST = theme-default
--
1.9.3
10 years, 5 months
[PATCH] Change ISO stream feature test and kvm user test for PPC
by Rodrigo Trujillo
This patch removes X86 hardcoded tags from test XMLs in order to allow
run the tests in PPC machines.
It also increases the amount of memory used in User test xml, because
PPC only creates VMs with more then 128M.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/featuretests.py | 2 +-
src/kimchi/kvmusertests.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py
index 5192361..fd9b7d8 100644
--- a/src/kimchi/featuretests.py
+++ b/src/kimchi/featuretests.py
@@ -37,7 +37,7 @@ ISO_STREAM_XML = """
<name>ISO_STREAMING</name>
<memory unit='KiB'>1048576</memory>
<os>
- <type arch='x86_64' machine='pc-1.2'>hvm</type>
+ <type>hvm</type>
<boot dev='cdrom'/>
</os>
<devices>
diff --git a/src/kimchi/kvmusertests.py b/src/kimchi/kvmusertests.py
index 1757725..3a44ae3 100644
--- a/src/kimchi/kvmusertests.py
+++ b/src/kimchi/kvmusertests.py
@@ -31,9 +31,9 @@ class UserTests(object):
<domain type='kvm'>
<name>%s</name>
<uuid>%s</uuid>
- <memory unit='KiB'>10240</memory>
+ <memory unit='KiB'>262144</memory>
<os>
- <type arch='x86_64' machine='pc'>hvm</type>
+ <type>hvm</type>
<boot dev='hd'/>
</os>
</domain>"""
--
1.9.3
10 years, 5 months
[PATCH 1/2] Add PPC support to ISO Stream feature test
by Rodrigo Trujillo
This patch removes hardcoded tags from iso stream xml. Tags are related
to machine type and architecture and are set in running type.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/featuretests.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/featuretests.py b/src/kimchi/featuretests.py
index 5192361..277dd56 100644
--- a/src/kimchi/featuretests.py
+++ b/src/kimchi/featuretests.py
@@ -20,6 +20,7 @@
import cherrypy
import libvirt
import lxml.etree as ET
+import platform
import socket
import subprocess
import threading
@@ -37,7 +38,7 @@ ISO_STREAM_XML = """
<name>ISO_STREAMING</name>
<memory unit='KiB'>1048576</memory>
<os>
- <type arch='x86_64' machine='pc-1.2'>hvm</type>
+ <type arch='%(arch)s' machine='%(machine)s'>hvm</type>
<boot dev='cdrom'/>
</os>
<devices>
@@ -100,7 +101,14 @@ class FeatureTests(object):
@staticmethod
def libvirt_supports_iso_stream(protocol):
- xml = ISO_STREAM_XML % {'protocol': protocol}
+ if platform.machine().startswith('ppc'):
+ arch = "ppc64"
+ machine = "pseries"
+ else:
+ arch = "x86_64"
+ machine = "pc-1.2"
+ xml = ISO_STREAM_XML % {'protocol': protocol, 'arch': arch,
+ 'machine': machine}
conn = None
try:
FeatureTests.disable_screen_error_logging()
--
1.9.3
10 years, 5 months