[PATCH] [Kimchi] Add support to passtrhough 3D graphic controllers
by Jose Ricardo Ziviani
- Any graphic controller is being blacklisted for PCI Passthrough by
Kimchi. However, newer cards is supported by qemu/libvirt.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/hostdev.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/model/hostdev.py b/model/hostdev.py
index 93c47d3..c9d9876 100644
--- a/model/hostdev.py
+++ b/model/hostdev.py
@@ -58,13 +58,14 @@ def _get_dev_info_tree(dev_infos):
def _is_pci_qualified(pci_dev):
# PCI bridge is not suitable to passthrough
- # KVM does not support passthrough graphic card now
+ # KVM does not support passthrough graphic card now but supports
+ # 3D controller
blacklist_classes = (0x030000, 0x060000)
with open(os.path.join(pci_dev['path'], 'class')) as f:
pci_class = int(f.readline().strip(), 16)
- if pci_class & 0xff0000 in blacklist_classes:
+ if pci_class != 0x030200 and pci_class & 0xff0000 in blacklist_classes:
return False
return True
--
1.9.1
8 years, 11 months
[RFC V2] Allow user to specify max virtual cpus in template and guest
by Lucio Correia
Proposal
--------
Allow user to specify the maximum number of virtual cpus for a template
or guest (when this one is offline - not running).
Changes required
----------------
1) Backend
A) Add "maxvcpus" optional field to both template and guest APIs
Restrictions to be implemented on this value:
- must be a positive integer
- must be equal to sockets * cores * threads
- must be less than or equal the maximum number of virtual cpus
supported by hypervisor
If not specified, the default value for maxvcpus will be the equivalent
to cpus.
B) Change the way number of sockets is calculated:
topology: cores=2 , threads=2 (specified by user)
maximum number of virtual cpus guest can use = 100 (specified by user)
cpus assigned to guest = 4 (specified by user)
number of virtual cpus per socket: cores * threads = 4 (from topology)
maximum number of sockets guest can have = int(100/4) = 25
maximum number of virtual cpus guest can use = 4 * 25 = 100
That would result in:
<vcpu placement='static' current='4'>100</vcpu>
<cpu>
<topology sockets='25' cores='2' threads='2'/>
</cpu>
C) Update/Add unit tests
2) Frontend
A) Edit Template, at "Processor" tab:
- change the current "CPU number" field to a -[]+ input field
(increase/decrease)
- add a new -[]+ input field "Max CPU number" (increase/decrease) for
user input of "max virtual CPUs". Restrictions from 1.A) apply here.
Despite it's in a different place, we may use a "More Options" artifact
similar to the one proposed by Rodrigo Trujillo at "[RFC][Kimchi] Guest
Max memory setup and update", to keep the same format.
B) Edit Guest, at "General" tab:
- add a new -[]+ input field "Max CPUs" (increase/decrease in terms of
core * threads) for user input of "max virtual CPUs". This new field is
only enabled if guest is not running. Restrictions from 1.A) apply here.
Let me know if any questions/doubts.
Thanks,
--
Lucio Correia
Software Engineer
IBM LTC Brazil
8 years, 11 months
[Kimchi] Add opensuse LEAP to remote ISOs
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
distros.d/opensuse.json | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/distros.d/opensuse.json b/distros.d/opensuse.json
index f51de97..7df2d86 100644
--- a/distros.d/opensuse.json
+++ b/distros.d/opensuse.json
@@ -19,5 +19,12 @@
"os_arch": "x86_64",
"os_version": "13.2",
"path": "http://suse.mirrors.tds.net/pub/opensuse/distribution/13.2/iso/openSUSE-1..."
+ },
+ {
+ "name": "opensuse-42.1",
+ "os_distro": "opensuse",
+ "os_arch": "x86_64",
+ "os_version": "42.1",
+ "path": "http://suse.mirrors.tds.net/pub/opensuse/distribution/leap/42.1/iso/openS..."
}
]
--
2.1.0
8 years, 11 months
[Kimchi] Issue #816: kimchi.conf isn't pointing to libvirt service on ubuntu 15.10
by Ramon Medeiros
Ubuntu uses libvirt service as libvirt-bin, not libvirtd.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 6 +++++-
contrib/kimchid.service.ubuntu | 7 +++++++
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 contrib/kimchid.service.ubuntu
diff --git a/Makefile.am b/Makefile.am
index 1c5af68..b8e952e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -139,7 +139,11 @@ ChangeLog:
install-data-local:
@if test -d "$(systemdsystemunitdir)" ; then \
mkdir -p $(DESTDIR)/etc/systemd/system/wokd.service.d; \
- $(INSTALL_DATA) contrib/kimchid.service.fedora $(DESTDIR)/etc/systemd/system/wokd.service.d/kimchi.conf; \
+ if test -f /etc/debian_version; then \
+ $(INSTALL_DATA) contrib/kimchid.service.ubuntu $(DESTDIR)/etc/systemd/system/wokd.service.d/kimchi.conf; \
+ else \
+ $(INSTALL_DATA) contrib/kimchid.service.fedora $(DESTDIR)/etc/systemd/system/wokd.service.d/kimchi.conf; \
+ fi; \
fi; \
$(MKDIR_P) $(DESTDIR)/$(localstatedir)/lib/kimchi/
$(MKDIR_P) $(DESTDIR)$(kimchidir)
diff --git a/contrib/kimchid.service.ubuntu b/contrib/kimchid.service.ubuntu
new file mode 100644
index 0000000..1c7d63f
--- /dev/null
+++ b/contrib/kimchid.service.ubuntu
@@ -0,0 +1,7 @@
+[Unit]
+Requires=libvirt-bin.service wokd.service
+After=libvirt-bin.service wokd.service
+
+[Service]
+Nice=0
+PrivateTmp=yes
--
2.1.0
8 years, 11 months
[PATCH V2] [Wok] Adding typeahead library to wok
by peterpnns@gmail.com
From: peterpennings <peterpnns(a)gmail.com>
This library is necessary to replace wok.comboBox() in iSCSI Server and target when defining a new storage pool and when loading sysmodules in Ginger.
V2 = Fixed header message
peterpennings (1):
Adding typeahead library to wok
configure.ac | 1 +
ui/libs/Makefile.am | 2 +-
ui/libs/typeahead/LICENSE | 19 +++++++++++++++++++
ui/libs/typeahead/Makefile.am | 20 ++++++++++++++++++++
ui/libs/typeahead/typeahead.bundle.min.js | 8 ++++++++
ui/pages/wok-ui.html.tmpl | 1 +
6 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 ui/libs/typeahead/LICENSE
create mode 100644 ui/libs/typeahead/Makefile.am
create mode 100644 ui/libs/typeahead/typeahead.bundle.min.js
--
1.9.1
8 years, 11 months
[PATCH] [Wok] Allow wok.form.js to support "number" inputs
by peterpnns@gmail.com
From: peterpennings <peterpnsn(a)gmail.com>
This patch adds "number" input type support to wok forms. This can be seen in edit guests after applying memory hot plug patch.
peterpennings (1):
Allow wok.form.js to support number inputs
ui/js/src/wok.form.js | 3 +++
1 file changed, 3 insertions(+)
--
2.5.0
8 years, 11 months
[RFC] Allow user to specify max virtual cpus in template and guest
by Lucio Correia
Current State
-------------
Currently we have the following values defined for a KVM guest created
by Kimchi:
<vcpu placement='static' current='4'>252</vcpu>
<cpu>
<topology sockets='63' cores='2' threads='2'/>
</cpu>
User specifies the processor topology (optional) and the number of
virtual CPUs and sockets are calculated by Kimchi based on maximum
supported by the hypervisor (varies with distro) this way:
maximum number of virtual cpus supported = 255 (taken from hypervisor)
processor topology: cores=2 , threads=2 (optionally specified by user)
number of virtual cpus per socket: cores * threads = 4 (from topology)
maximum number of sockets guest can have = int(255/4) = 63
maximum number of virtual cpus guest can use = 4 * 63 = 252
Proposal
--------
Allow user to specify the maximum number of virtual cpus for a template
or guest (when this one is offline - not running).
Changes required
----------------
1) Backend
A) Add "maxvcpus" optional field to both template and guest APIs
Restrictions to be implemented on this value:
- must be a positive integer
- must be a multiple of (cores * threads)
- must be less than or equal the maximum number of virtual cpus
supported by hypervisor
If not specified, the default value for maxvcpus will be the equivalent
to one socket (that is, core * threads).
B) Change the way number of sockets is calculated:
maximum number of virtual cpus supported = 255 (taken from hypervisor)
topology: cores=2 , threads=2 (specified by user)
maximum number of virtual cpus guest can use = 100 (specified by user)
number of virtual cpus per socket: cores * threads = 4 (from topology)
maximum number of sockets guest can have = int(100/4) = 25
maximum number of virtual cpus guest can use = 4 * 25 = 100
That would result in:
<vcpu placement='static' current='4'>100</vcpu>
<cpu>
<topology sockets='25' cores='2' threads='2'/>
</cpu>
C) Update/Add unit tests
2) Frontend
A) Edit Template, at "Processor" tab:
- change the current "CPU number" field to a -[]+ input field
(increase/decrease)
- add a new -[]+ input field "Max CPU number" (increase/decrease) for
user input of "max virtual CPUs". Restrictions from 1.A) apply here.
Despite it's in a different place, we may use a "More Options" artifact
similar to the one proposed by Rodrigo Trujillo at "[RFC][Kimchi] Guest
Max memory setup and update", to keep the same format.
B) Edit Guest, at "General" tab:
- add a new -[]+ input field "Max CPUs" (increase/decrease in terms of
core * threads) for user input of "max virtual CPUs". This new field is
only enabled if guest is not running. Restrictions from 1.A) apply here.
Let me know your thoughts.
Thanks,
--
Lucio Correia
Software Engineer
IBM LTC Brazil
8 years, 11 months
[PATCH] [Kimchi 0/3] Start up websockify on localhost
by Aline Manera
This patch set depends on Wok patch: [PATCH] [Wok 0/6] Configure nginx to proxy connections to the websocket server
Aline Manera (2):
Update /plugins/kimchi/config API to only return information related
to Kimchi
Update README
Rob Lemley (1):
Start up websockify on localhost
docs/API.md | 3 +-
docs/Makefile.am | 10 +-
docs/README.md | 239 +++++++++--------------------------
docs/fedora-deps.md | 53 ++++++++
docs/kimchi-guest.png | Bin 192281 -> 0 bytes
docs/kimchi-guests.png | Bin 0 -> 55954 bytes
docs/kimchi-login.png | Bin 318041 -> 0 bytes
docs/kimchi-templates.png | Bin 329678 -> 60887 bytes
docs/opensuse-deps.md | 48 +++++++
docs/ubuntu-deps.md | 34 +++++
docs/wok-login.png | Bin 0 -> 20140 bytes
model/config.py | 10 +-
tests/test_rest.py | 4 +-
ui/js/src/kimchi.api.js | 29 ++---
ui/spice-html5/pages/spice_auto.html | 2 +-
vnc.py | 8 +-
16 files changed, 220 insertions(+), 220 deletions(-)
create mode 100644 docs/fedora-deps.md
delete mode 100644 docs/kimchi-guest.png
create mode 100644 docs/kimchi-guests.png
delete mode 100644 docs/kimchi-login.png
create mode 100644 docs/opensuse-deps.md
create mode 100644 docs/ubuntu-deps.md
create mode 100644 docs/wok-login.png
--
2.5.0
8 years, 11 months
[PATCH] [Kimchi] Fix issue #810
by Lucio Correia
Add an error message asking user to disable NetworkManager.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
i18n.py | 1 +
model/config.py | 2 ++
model/networks.py | 8 ++++++++
3 files changed, 11 insertions(+)
diff --git a/i18n.py b/i18n.py
index 7a72a86..a575922 100644
--- a/i18n.py
+++ b/i18n.py
@@ -273,6 +273,7 @@ messages = {
"KCHNET0024E": _("Unable to redefine interface %(name)s. Details: %(err)s"),
"KCHNET0025E": _("Unable to create bridge %(name)s. Details: %(err)s"),
"KCHNET0026E": _("Open VSwitch bridges can only host bridged networks."),
+ "KCHNET0027E": _("Unable to create bridge with NetworkManager enabled. Disable it and try again."),
"KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
diff --git a/model/config.py b/model/config.py
index e552edb..5a26957 100644
--- a/model/config.py
+++ b/model/config.py
@@ -54,6 +54,7 @@ class CapabilitiesModel(object):
self.libvirt_stream_protocols = []
self.fc_host_support = False
self.kernel_vfio = False
+ self.nm_running = False
self.mem_hotplug_support = False
# Subscribe function to set host capabilities to be run when cherrypy
@@ -90,6 +91,7 @@ class CapabilitiesModel(object):
self.nfs_target_probe = FeatureTests.libvirt_support_nfs_probe(conn)
self.fc_host_support = FeatureTests.libvirt_support_fc_host(conn)
self.kernel_vfio = FeatureTests.kernel_support_vfio()
+ self.nm_running = FeatureTests.is_nm_running()
self.mem_hotplug_support = FeatureTests.has_mem_hotplug_support(conn)
self.libvirt_stream_protocols = []
diff --git a/model/networks.py b/model/networks.py
index bfe8d2a..fba181f 100644
--- a/model/networks.py
+++ b/model/networks.py
@@ -32,6 +32,7 @@ from wok.xmlutils.utils import xpath_get_text
from wok.plugins.kimchi import netinfo
from wok.plugins.kimchi import network as knetwork
+from wok.plugins.kimchi.model.config import CapabilitiesModel
from wok.plugins.kimchi.osinfo import defaults as tmpl_defaults
from wok.plugins.kimchi.xmlutils.interface import get_iface_xml
from wok.plugins.kimchi.xmlutils.network import create_linux_bridge_xml
@@ -49,6 +50,8 @@ class NetworksModel(object):
if self.conn.isQemuURI():
self._check_default_networks()
+ self.caps = CapabilitiesModel(**kargs)
+
def _check_default_networks(self):
networks = list(set(tmpl_defaults['networks']))
conn = self.conn.get()
@@ -192,6 +195,11 @@ class NetworksModel(object):
# User wants Linux bridge network, but didn't specify bridge interface
elif params['connection'] == "bridge":
+
+ # libvirt will fail to create bridge if NetworkManager is enabled
+ if self.caps.nm_running:
+ raise InvalidParameter('KCHNET0027E')
+
# create Linux bridge interface first and use it as actual iface
iface = self._create_linux_bridge(iface)
params['bridge'] = iface
--
1.9.1
8 years, 11 months