[PATCH] [Kimchi] Issue #809: PCI filter does not seem to work
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch fixes issue #809 "PCI filter does not seem to work". This fix requires "Added jquery.containsNC to enable case insensitive pseudo-selector in JS" applied since it uses this snippet to allow case insensitive filter.
Samuel Guimarães (1):
Issue #809: PCI filter does not seem to work
ui/js/src/kimchi.guest_edit_main.js | 49 ++++++++++++++++++++-----------------
ui/pages/guest-edit.html.tmpl | 8 +++---
2 files changed, 31 insertions(+), 26 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH] [Kimchi] Issue #818: Frontend doesn't update the PCI tab after a PCI attachment
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
Tested with real environment. The "Save" button is disabled by default when switching to a tab that has inline editing feature, so this patch doesn't cover issue #847 yet.
Samuel Guimarães (1):
Issue #818: Frontend doesn't update the PCI tab after a PCI attachment
ui/js/src/kimchi.guest_edit_main.js | 40 ++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 18 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH] [Kimchi] Fix problem when removing window size fo GPU
by Jose Ricardo Ziviani
- This patch fixes errors when removing the window size command from
libvirt qemu:commandline xml.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 32 ++++++++++----------------------
1 file changed, 10 insertions(+), 22 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 2a62249..5f33d10 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -290,7 +290,8 @@ class VMHostDevsModel(object):
new_xml = self._add_win_memory_size(dom, size)
# update the XML
- self.conn.get().defineXML(new_xml)
+ if new_xml is not None:
+ self.conn.get().defineXML(new_xml)
def _update_win_memory_size(self, dom, counter, wnd_size):
root = objectify.fromstring(dom.XMLDesc(0))
@@ -304,12 +305,11 @@ class VMHostDevsModel(object):
if not arg.values()[0].startswith(CMDLINE_FIELD_NAME):
continue
- # update mem_win_size value
if counter > 1:
arg.set('value', CMDLINE_FIELD_NAME + '=' + wnd_size)
- # remove mem_win_size
- elif counter <= 1:
+ else:
+ line.remove(arg.getprevious())
line.remove(arg)
return etree.tostring(root, encoding='utf-8',
@@ -330,25 +330,12 @@ class VMHostDevsModel(object):
root.append(etree.fromstring(get_qemucmdline_xml(args)))
return etree.tostring(root, encoding='utf-8', pretty_print=True)
- # <qemu:commandline> exists and already has the tag
- # <qemu:arg value='-global'> (user could already been using this for
- # something else), so we just add our <qemu:arg...> missing.
- found = False
- for arg in cmdline.iterchildren():
- if arg.values()[0] == '-global':
- EM = ElementMaker(namespace=QEMU_NAMESPACE,
- nsmap={'qemu': QEMU_NAMESPACE})
- cmdline.append(EM.arg(value=val))
- found = True
- break
-
# <qemu:commandline> exists but there is no <qemu:arg value global>
# so, we add those missing arguments inside the exising cmdline
- if not found:
- EM = ElementMaker(namespace=QEMU_NAMESPACE,
- nsmap={'qemu': QEMU_NAMESPACE})
- cmdline.append(EM.arg(value='-global'))
- cmdline.append(EM.arg(value=val))
+ EM = ElementMaker(namespace=QEMU_NAMESPACE,
+ nsmap={'qemu': QEMU_NAMESPACE})
+ cmdline.append(EM.arg(value='-global'))
+ cmdline.append(EM.arg(value=val))
return etree.tostring(root, encoding='utf-8', pretty_print=True)
@@ -443,7 +430,8 @@ class VMHostDevModel(object):
if e.attrib['type'] == 'pci':
self._delete_affected_pci_devices(dom, dev_name, pci_devs)
if is_3D_device:
- self.update_mmio_guest(vmid, False)
+ devsmodel = VMHostDevsModel(conn=self.conn)
+ devsmodel.update_mmio_guest(vmid, False)
break
else:
raise NotFoundError('KCHVMHDEV0001E',
--
1.9.1
8 years, 8 months
probleme for kimchi
by Nicolas Naud
Hi, I'm problem after install kimchi on debian:
"KCHVM0019E: Impossible de démarrer la machine virtuelle test. Détails :
unsupported configuration: Memory cgroup is not available on this host"
Thanks you
--
Nicolas Naud
Technicien informatique
SFA - Administration générale - Service Informatique Général
TSA 51106
9, Rue C C Chenou Bât B5
86073 POITIERS POITIERS CEDEX 9
Tél : +33 5 49 45 38 16
Port : 06.19.13.20.59
Courriel : nicolas.naud(a)univ-poitiers.fr
8 years, 8 months
[PATCH] [Kimchi] Issue 814: UI just show exported NFS path when clicked twice at field
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
I wasn't able to reproduce the issue with a nfs path pointing to localhost but I did tested with two NFS paths in a NFS server and found that wok.combobox() and wok.selectFilter() dropdowns were showing an empty list. If the list is empty their objects are destroyed but the validation still occurs when the user types a valid ip address and a nfs path.
Samuel Guimarães (1):
Issue 814: UI just show exported NFS path when clicked twice at field
ui/js/src/kimchi.storagepool_add_main.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH v2] [Kimchi 0/4] Fix issues on web serial console
by Jose Ricardo Ziviani
v2:
- applied code review
This patchset contains some issues found in the web serial console code
as well as some small improvements.
Jose Ricardo Ziviani (4):
Move unix socket files from /tmp to /run
Improve log messages printed by the serial console
Make serial console timeout configurable
Check if guest is listening to serial before connecting to it
i18n.py | 2 +
kimchi.conf | 3 ++
model/vms.py | 26 ++++++++--
serialconsole.py | 117 +++++++++++++++++++++++++++++++--------------
tests/test_model.py | 4 +-
ui/serial/html/serial.html | 4 --
6 files changed, 109 insertions(+), 47 deletions(-)
--
1.9.1
8 years, 8 months
[PATCH] [Kimchi] Issue #847: Save button is having wrong behavior when edit a running Guest
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch addresses the Save Button in Edit Guests modal window when the user switches to different tabs and goes back to General tab if a VM is running.
Samuel Guimarães (1):
Issue #847: Save button is having wrong behavior when edit a running
Guest
ui/js/src/kimchi.guest_edit_main.js | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH] [Kimchi] Added support for CentOS 7 iso images
by rkoch@rk-it.at
From: Rene Koch <rkoch(a)rk-it.at>
CentOS 7 x86_64 minimal ISO is labled "CentOS 7 x86_64", so operating system is not recognized by Kimchi. This patch adds support for CentOS 7 minimal ISO.
Rene Koch (1):
Issue #861: CentOS 7 image not recognized
isoinfo.py | 2 ++
1 file changed, 2 insertions(+)
--
2.5.0
8 years, 8 months
[PATCH][Kimchi] Remove useless function 'validate_repo_url' from Kimchi
by Rodrigo Trujillo
This function was moved to GingerBase. It is not used in any part of
Kimchi.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
utils.py | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/utils.py b/utils.py
index 87d7d9b..eae16d5 100644
--- a/utils.py
+++ b/utils.py
@@ -87,22 +87,6 @@ def check_url_path(path, redirected=0):
return True
-def validate_repo_url(url):
- url_parts = url.split('://') # [0] = prefix, [1] = rest of URL
-
- if url_parts[0] == '':
- raise InvalidParameter("KCHREPOS0002E")
-
- if url_parts[0] in ['http', 'https', 'ftp']:
- if not check_url_path(url):
- raise InvalidParameter("WOKUTILS0001E", {'url': url})
- elif url_parts[0] == 'file':
- if not os.path.exists(url_parts[1]):
- raise InvalidParameter("WOKUTILS0001E", {'url': url})
- else:
- raise InvalidParameter("KCHREPOS0002E")
-
-
def upgrade_objectstore_data(item, old_uri, new_uri):
"""
Upgrade the value of a given JSON's item of all Template and VM entries
--
2.1.0
8 years, 8 months
[PATCH v2] [Kimchi] Fixed "Add a Storage Device to VM" modal behavior
by Socorro Stoppler
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
v2:
Change default to qcow2 format
Signed-off-by: Socorro Stoppler <socorro(a)linux.vnet.ibm.com>
Signed-off-by: Samuel Guimarães <sguimaraes943(a)gmail.com>
---
ui/js/src/kimchi.guest_storage_add.main.js | 41 ++++++++++++++++--------------
ui/pages/guest-storage-add.html.tmpl | 2 +-
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index 3f416e7..fb7fed3 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -83,12 +83,13 @@ kimchi.guest_storage_add_main = function() {
}
formatTextbox.empty();
formatTextbox.append(selectFormatHTML);
- $(formatTextbox).change();
+ formatTextbox.val("qcow2");
+ $(formatTextbox).trigger('change');
formatTextbox.selectpicker();
$('.selectpicker').selectpicker('refresh');
};
- typeTextbox.change(function() {
+ typeTextbox.on('change',function() {
var pathObject = {'cdrom': ".path-section", 'disk': '.volume-section'};
selectType = $(this).val();
$.each(pathObject, function(type, value) {
@@ -105,13 +106,13 @@ kimchi.guest_storage_add_main = function() {
if ($('#new-disk').checked) {
$('#existing-disk-box').addClass('hidden');
$(newPoolTextbox).val('default');
- $(newPoolTextbox).change();
+ $(newPoolTextbox).trigger('change');
$(formatTextbox).val('qcow2');
- $(formatTextbox).change();
+ $(formatTextbox).trigger('change');
} else if ($('#existing-disk').checked) {
$('#new-disk-box').addClass('hidden');
$(poolTextbox).val('default');
- $(poolTextbox).change();
+ $(poolTextbox).trigger('change');
} else {
//Goes here the first time since radiobuttons are undefined
if (rbExisting === 'true') {
@@ -119,7 +120,7 @@ kimchi.guest_storage_add_main = function() {
} else {
$('#existing-disk-box').addClass('hidden');
$(formatTextbox).val('qcow2');
- $(formatTextbox).change();
+ $(formatTextbox).trigger('change');
}
}
} else {
@@ -159,13 +160,13 @@ kimchi.guest_storage_add_main = function() {
if (radioButton === 'existing') {
poolTextbox.empty();
poolTextbox.append(selectStoragePoolHTML);
- $(poolTextbox).change();
+ $(poolTextbox).trigger('change');
poolTextbox.selectpicker();
$('.selectpicker').selectpicker('refresh');
} else if (radioButton === 'new') { //new disk
newPoolTextbox.empty();
newPoolTextbox.append(selectStoragePoolHTML);
- $(newPoolTextbox).val("qcow2");
+ $(newPoolTextbox).val("ISO");
newPoolTextbox.selectpicker();
getFormatList();
}
@@ -176,7 +177,7 @@ kimchi.guest_storage_add_main = function() {
//First time retrieving list of Storage Pools - defaulting to new disk
getStoragePools('new');
- poolTextbox.change(function() {
+ poolTextbox.on('change',function() {
var options = [];
selectStorageVolHTML = '';
volTextbox.empty();
@@ -198,7 +199,7 @@ kimchi.guest_storage_add_main = function() {
}
volTextbox.append(selectStorageVolHTML);
$(volTextbox).val(options[0].value);
- $(volTextbox).change();
+ $(volTextbox).trigger('change');
$(volTextbox).prop('disabled',false);
}else {
$(volTextbox).prop('disabled',true);
@@ -213,7 +214,7 @@ kimchi.guest_storage_add_main = function() {
}, null, false);
});
- typeTextbox.change(function() {
+ typeTextbox.on('change',function() {
var pathObject = {'cdrom': ".path-section", 'disk': '.volume-section'};
var selectType = $(this).val();
$.each(pathObject, function(type, value) {
@@ -226,7 +227,7 @@ kimchi.guest_storage_add_main = function() {
});
var currentPage = 'new-disk-box';
- $('#existing-disk').change(function() {
+ $('#existing-disk').on('change',function() {
if (this.checked) {
rbExisting = 'true';
if (currentPage === 'new-disk-box') {
@@ -246,10 +247,10 @@ kimchi.guest_storage_add_main = function() {
}
});
- $('#new-disk').change(function() {
+ $('#new-disk').on('change',function() {
if (this.checked) {
$(formatTextbox).val("qcow2");
- $(formatTextbox).change();
+ $(formatTextbox).trigger('change');
rbExisting = 'false';
if (currentPage === 'existing-disk-box') {
kimchi.switchPage(currentPage, 'new-disk-box', 'right');
@@ -268,19 +269,21 @@ kimchi.guest_storage_add_main = function() {
}
});
+ var selectType = $(typeTextbox).val();
if (kimchi.thisVMState === 'running') {
- types =typesRunning;
- $(typeTextbox).val('disk');
- typeTextbox.change();
- poolTextbox.change();
+ types = typesRunning;
}
- var selectType = $(typeTextbox).val();
for (var i = 0; i < types.length; i++) {
selectStorageTypeHTML += '<option value="'+ types[i].value + '">' + types[i].label + '</option>';
}
typeTextbox.append(selectStorageTypeHTML);
typeTextbox.find('option:first').attr('selected','selected');
typeTextbox.selectpicker();
+ if (kimchi.thisVMState === 'running') {
+ $(typeTextbox).val('disk');
+ typeTextbox.trigger('change');
+ poolTextbox.trigger('change');
+ }
var validateCDROM = function(settings) {
if (/^((https|http|ftp|ftps|tftp|\/).*)+$/.test(settings['path'])){
diff --git a/ui/pages/guest-storage-add.html.tmpl b/ui/pages/guest-storage-add.html.tmpl
index 18da825..afc72c8 100644
--- a/ui/pages/guest-storage-add.html.tmpl
+++ b/ui/pages/guest-storage-add.html.tmpl
@@ -39,7 +39,7 @@
<label>$_("Device Type")</label>
<select id="guest-storage-type" class="selectpicker col-md-12 col-lg-12">
</select>
- <p class="help-block"><i class="fa fa-info-circle"></i> $_("The device type. Currently, \"cdrom\" and \"disk\" are supported.")</p>
+ <p class="help-block"><i class="fa fa-info-circle"></i> $_("The device type. Currently, \"cdrom\" and \"disk\" are supported. If the guest is running, only \"disk\" is supported.")</p>
</div>
<div class="volume-section hidden form-group">
<div class="template-modal-container">
--
1.9.1
8 years, 8 months