[PATCH v3 0/5] Allow creating VM storages with ref_cnt > 0
by Crístian Deives
The difference between this and the previous patchset (v2) is:
- Patch 2 has been added.
- The UI code has been updated in order to display all volumes from a
storage volume when attaching a disk to a VM.
Crístian Deives (5):
fix: Use correct path when setting 'ref_cnt' to a new volume
Handle invalid path in 'get_disk_ref_cnt'
Replace storage volume 'ref_cnt' with 'used_by'
Allow creating VM storages with non-empty 'used_by'
Set 'used_by' to [] when creating some volumes
docs/API.md | 4 +--
src/kimchi/control/storagevolumes.py | 2 +-
src/kimchi/i18n.py | 1 -
src/kimchi/mockmodel.py | 4 +--
src/kimchi/model/diskutils.py | 20 ++++++------
src/kimchi/model/storagevolumes.py | 33 ++++++++++----------
src/kimchi/model/vms.py | 14 ++++++---
src/kimchi/model/vmstorages.py | 50 ++++++++++++++++--------------
tests/test_model.py | 6 ++++
tests/test_model_storagevolume.py | 2 +-
tests/test_rest.py | 2 +-
ui/js/src/kimchi.guest_storage_add.main.js | 2 +-
ui/js/src/kimchi.storage_main.js | 2 +-
13 files changed, 76 insertions(+), 66 deletions(-)
--
2.1.0
9 years, 7 months
[PATCH 0/4 V5] Storage volume upload
by Aline Manera
This patch set depends on
"[Kimchi-devel] [PATCH v2 1/4] fix: Use correct path when setting 'ref_cnt' to a new volume",
so I included it to this patch set to help testing.
v4 -> v5:
- Reduce number of locks
- Update MockModel and test cases accordingly
Aline Manera (2):
Upload storage volume
Remove storage volume creation from file
Crístian Deives (1):
fix: Use correct path when setting 'ref_cnt' to a new volume
Royce Lv (1):
Update controller to make update accept formdata params
docs/API.md | 8 +++-
src/kimchi/API.json | 22 +++++++++
src/kimchi/control/base.py | 6 +--
src/kimchi/i18n.py | 6 +++
src/kimchi/mockmodel.py | 34 +++++++++-----
src/kimchi/model/storagevolumes.py | 93 ++++++++++++++++++++++----------------
tests/test_model_storagevolume.py | 89 ++++++++++++++++++++++++++++++------
tests/test_rest.py | 45 +-----------------
8 files changed, 187 insertions(+), 116 deletions(-)
--
2.1.0
9 years, 7 months
[PATCH] Bug fix: Build default pools list according to user input
by Aline Manera
Instead of predefine a default pools list, build it according to user
input to make it will be always accurated.
Specially in case to import the StoragePoolsModel multiple times.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/kimchi/model/storagepools.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index e82d6ed..f022deb 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -35,9 +35,6 @@ from kimchi.utils import add_task, kimchi_log, pool_name_from_uri, run_command
from kimchi.xmlutils.utils import xpath_get_text
-DEFAULT_POOLS = {'default': {'path': '/var/lib/libvirt/images'},
- 'ISO': {'path': '/var/lib/kimchi/isos'}}
-
ISO_POOL_NAME = u'kimchi_isos'
POOL_STATE_MAP = {0: 'inactive',
@@ -71,25 +68,27 @@ class StoragePoolsModel(object):
self._check_default_pools()
def _check_default_pools(self):
+ pools = {}
+
default_pool = tmpl_defaults['storagepool']
default_pool = default_pool.split('/')[2]
- if default_pool != 'default':
- del DEFAULT_POOLS['default']
- DEFAULT_POOLS[default_pool] = {}
+ pools[default_pool] = {}
+ if default_pool == 'default':
+ pools[default_pool] = {'path': '/var/lib/libvirt/images'}
- if config.get("server", "create_iso_pool") != "true":
- del DEFAULT_POOLS['ISO']
+ if config.get("server", "create_iso_pool") == "true":
+ pools['ISO'] = {'path': '/var/lib/kimchi/isos'}
error_msg = ("Please, check the configuration in %s/template.conf to "
"ensure it has a valid storage pool." % paths.conf_dir)
conn = self.conn.get()
- for pool_name in DEFAULT_POOLS:
+ for pool_name in pools:
try:
pool = conn.storagePoolLookupByName(pool_name)
except libvirt.libvirtError, e:
- pool_path = DEFAULT_POOLS[pool_name].get('path')
+ pool_path = pools[pool_name].get('path')
if pool_path is None:
msg = "Fatal: Unable to find storage pool %s. " + error_msg
kimchi_log.error(msg % pool_name)
--
2.1.0
9 years, 7 months
[PATCH] Fix for section in man page
by Frédéric Bonnard
From: Frederic Bonnard <frediz(a)linux.vnet.ibm.com>
Fixed the section number to 8 as in the filename.
F.
Frederic Bonnard (1):
Fixed section number within the man page itself
docs/kimchid.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
1.9.1
9 years, 7 months
[PATCH] PPC: Templates have memory always set to 1280. Set minimal memory to 2048
by Rodrigo Trujillo
There is a bug in the osinfo.py when Kimchi generates templates for ppc
guests. The amount of memory will always be 1280, in other other, it is
overwriting the value set in src/template.conf.
This patch fixes this problem and sets the minimal memory for ppc guests
as 2048, because there are issues reported by users that 1280 is not
sufficient and cause installation hangs.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/osinfo.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 67d85be..5c315ea 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -43,28 +43,26 @@ template_specs = {'x86': {'old': dict(disk_bus='ide',
cdrom_bus='scsi',
kbd_type="kbd",
kbd_bus='usb', mouse_bus='usb',
- tablet_bus='usb', memory=1280),
+ tablet_bus='usb'),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="kbd",
- mouse_bus='usb', tablet_bus='usb',
- memory=1280)},
+ mouse_bus='usb', tablet_bus='usb')},
'ppc64le': {'old': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
- mouse_bus='usb', tablet_bus='usb',
- memory=1280),
+ mouse_bus='usb', tablet_bus='usb'),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
- mouse_bus='usb', tablet_bus='usb',
- memory=1280)}}
+ mouse_bus='usb',
+ tablet_bus='usb')}}
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
@@ -185,6 +183,10 @@ def lookup(distro, version):
if params["arch"] == "ppc64le":
params["arch"] = "ppc64"
+ # set up minimal default amount of memory for powerpc guests
+ if params["arch"] in ("ppc", "ppc64") and params["memory"] < 2048:
+ params["memory"] = 2048
+
if distro in modern_version_bases[arch]:
if LooseVersion(version) >= LooseVersion(
modern_version_bases[arch][distro]):
--
2.1.0
9 years, 7 months
[PATCH 0/5] View/Edit guest MAC address
by Jose Ricardo Ziviani
This patchset implements a new feature in Kimchi, it allows users to view and/or edit a guest MAC address.
I have a fork of kimchi in my github, so if you prefer to use their diff tool (syntax highlight) you can check this link out:
https://github.com/kimchi-project/kimchi/compare/master...jrziviani:guest...
Jose Ricardo Ziviani (5):
Display MAC Address in guest interface tab
Fix URI format of guest interfaces
Implement backend code to edit MAC address of a guest
Implement frontend code to edit MAC address of a guest
Update test cases to reflect MAC address update changes
src/kimchi/API.json | 13 +++++++
src/kimchi/control/vm/ifaces.py | 2 +-
src/kimchi/i18n.py | 4 +-
src/kimchi/model/vmifaces.py | 60 +++++++++++++++++++++---------
tests/test_model.py | 17 +++++++--
tests/test_rest.py | 12 +++---
ui/css/theme-default/guest-edit.css | 2 +-
ui/js/src/kimchi.guest_edit_main.js | 74 ++++++++++++++++++++++++++++++-------
ui/pages/guest-edit.html.tmpl | 8 +++-
9 files changed, 149 insertions(+), 43 deletions(-)
--
1.9.1
9 years, 7 months
[PATCH] Increase template minimal memory to 2048 for PPC guests
by Rodrigo Trujillo
Users have seen issues when installing PPC64 and PPC64LE guests using
the default 1280M. This patch increases the amount of memory to 2G.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/osinfo.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 67d85be..d80f717 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -43,28 +43,28 @@ template_specs = {'x86': {'old': dict(disk_bus='ide',
cdrom_bus='scsi',
kbd_type="kbd",
kbd_bus='usb', mouse_bus='usb',
- tablet_bus='usb', memory=1280),
+ tablet_bus='usb', memory=2048),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="kbd",
mouse_bus='usb', tablet_bus='usb',
- memory=1280)},
+ memory=2048)},
'ppc64le': {'old': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
mouse_bus='usb', tablet_bus='usb',
- memory=1280),
+ memory=2048),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
mouse_bus='usb', tablet_bus='usb',
- memory=1280)}}
+ memory=2048)}}
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
--
2.1.0
9 years, 7 months
[PATCH 0/9] Issue #450 - "test_delete_running_vm" fails on Fedora 20
by Ramon Medeiros
Libvirt does not support special characters on name tag. This patch make Kimchi writes
the special name at title tag and use an ascii version in name tag.
Ramon Medeiros (9):
Create title tag
Change the way that get_vm() and vm_list() search for VMs
Use get_vm() instead of conn.lookupByName
Encode vm_name to generate VNC token
Reflect the unicode conversion on token creation
Redefine title tag on vm update
Fix functions that uses connection as parameter
Return name with special characters when taking snapshot
Template_test: check assert that verifies the vm name
src/kimchi/model/vms.py | 82 +++++++++++++++++++++++++++++++++++------
src/kimchi/model/vmsnapshots.py | 7 ++++
src/kimchi/model/vmstorages.py | 7 +---
src/kimchi/vmtemplate.py | 4 +-
tests/test_vmtemplate.py | 8 +++-
ui/js/src/kimchi.api.js | 4 +-
6 files changed, 92 insertions(+), 20 deletions(-)
--
2.1.0
9 years, 7 months
[PATCH] Add documentation for VM suspend/resume
by Crístian Deives
Commit 82e5658 has added support for VM suspend/resume but the project
documentation hasn't been updated with the new commands.
Add documentation for the VM commands "suspend" and "resume".
Signed-off-by: Crístian Deives <cristiandeives(a)gmail.com>
---
docs/API.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 922ded1..62e4063 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -140,6 +140,13 @@ the following general conventions:
volume, it will be created on the pool 'default'. This action returns
a Task.
+* suspend: Suspend an active domain. The process is frozen without further
+ access to CPU resources and I/O but the memory used by the domain at
+ the hypervisor level will stay allocated.
+
+* resume: Resume a suspended domain. The process is restarted from the state
+ where it was frozen by calling "suspend".
+
### Sub-resource: Virtual Machine Screenshot
**URI:** /vms/*:name*/screenshot
--
2.1.0
9 years, 7 months
[PATCH v2 0/4] Allow creating VM storages with ref_cnt > 0
by Crístian Deives
The difference between this and the previous patchset is:
- Patches 1 and 4 have been added to fix some related bugs.
- Patch 2 has been added to change ref_cnt to used_by. ref_cnt indicated how
many VMs used a storage volume, whereas used_by indicate which VMs use a
storage volume.
Crístian Deives (4):
fix: Use correct path when setting 'ref_cnt' to a new volume
Replace storage volume 'ref_cnt' with 'used_by'
Allow creating VM storages with non-empty 'used_by'
Set 'used_by' to [] when creating some volumes
docs/API.md | 4 +--
src/kimchi/control/storagevolumes.py | 2 +-
src/kimchi/i18n.py | 1 -
src/kimchi/mockmodel.py | 4 +--
src/kimchi/model/diskutils.py | 18 ++++++-------
src/kimchi/model/storagevolumes.py | 33 ++++++++++++------------
src/kimchi/model/vms.py | 14 ++++++----
src/kimchi/model/vmstorages.py | 50 +++++++++++++++++++-----------------
tests/test_model.py | 6 +++++
tests/test_model_storagevolume.py | 2 +-
tests/test_rest.py | 2 +-
11 files changed, 73 insertions(+), 63 deletions(-)
--
2.1.0
9 years, 7 months