[RFC] Hotplug a new VM disk
by Crístian Viana
Hi,
I'd like to propose a new feature to hotplug a new disk to a VM.
This feature will be implemented only on the UI side. The backend
already has the methods needed to make it work.
Suppose a user wants to add a new disk to a running VM. Currently, they
have to create an empty disk using other tools outside of Kimchi and put
it into an existing storage pool. This might be challenging for some
users, as it requires the use of other tools, possibly involving the
command line (e.g. qemu-img). With this new feature, the user will only
select the storage pool and the size of the new disk they want to add;
Kimchi will create the disk in the appropriate pool and attach it to the VM.
In order to perform this feature, the UI will have to be updated to
allow the following steps:
1) Select an existing VM, "Actions" > "Edit".
2) Switch to the tab "Storage".
3) Click on the button "+".
4) On "Device type", select "disk" .
5) On "Storage pool", select any storage pool.
*6) On "Storage volume", select "New...".**
**7) Enter the desired disk size.*
8) Click on the button "Attach".
Steps 6 and 7 are the ones related to this feature and they need to be
implemented. The other steps already exist in the current UI.
When the user performs step 8, the UI should send the following requests
to the server:
POST /storagepools/<pool>/storagevolumes {'name': <vol>, 'capacity': <size>}
POST /vms/<vm>/storages {'name': <vol>}
Those requests already work, they just have to be executed in that order
in order to perform this new feature.
Any feedback will be very welcome.
Best regards,
Crístian.
9 years, 8 months
[RFC] Hotplug a VM network interface
by Crístian Viana
Hi,
I'd like to propose a new feature to hotplug a network interface to a
running VM.
A similar feature is already available for stopped VMs by selecting a VM
and clicking on "Actions" > "Edit", tab "Interface"; the user is able to
add or remove a network interface in that dialog. However, if the VM is
running, that tab disables the buttons to add and remove network
interfaces. This feature will allow those two operations to be performed
also on running VMs.
The API for adding and removing network interfaces to a VM already exist:
POST /vms/<vm>/ifaces {<iface data>}
DELETE /vms/<vm>/ifaces/<iface>
However, they currently raise an exception when the VM is running. This
feature will use those same commands in order to hotplug a network
interface, keeping the existing REST interface.
Any feedback will be very welcome.
Best regards,
Crístian.
9 years, 8 months
[RFC] Add suport for VM suspend/resume
by Crístian Viana
Hi,
I'd like to propose two new operations on virtual machines: *suspend*
and *resume*:
Suspend
----------
From libvirt.org: /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./
REST syntax:
POST /vms/<vm-name>/suspend
Return status:
200: OK
4xx: error
Return data:
None
Resume
----------
From libvirt.org: /Resume a suspended domain, the process is restarted
from the state where it was frozen by calling "suspend"./
REST syntax:
POST /vms/<vm-name>/resume
Return status:
200: OK
4xx: error
Return data:
None
--------------------
This feature has been partially implemented in previous patches ("[PATCH
0/3] VM suspend/resume", from Jan 21st), and its progress should be
resumed soon. The UI will have to be updated accordingly by adding
buttons to suspend and resume a VM, somewhat like the buttons which
start and stop a VM.
Any feedback will be very welcome.
Best regards,
Crístian.
9 years, 8 months
[PATCH v2 0/3] Fix issue #461 (backend)
by Crístian Viana
This is the changelog between this and the previous patchset:
- Don't allow mirrorlist and metalink to be specified at the same time;
according to the YUM documentation, that situation is invalid.
Crístian Viana (3):
Handle empty variables when updating YUM repository
Use more generic message in repo mirror list error
issue #461: Add 'metalink' support for YUM repositories
src/kimchi/API.json | 5 +++++
src/kimchi/i18n.py | 6 ++++--
src/kimchi/repositories.py | 31 +++++++++++++++++++++++++------
3 files changed, 34 insertions(+), 8 deletions(-)
--
2.1.0
9 years, 8 months
[PATCH V2] Update host number of cpus and total physical memory
by Jose Ricardo Ziviani
- The number of cpus and the total physical memory information
displayed in the host section can change, so them cannot be
static. This commit updates those values whenever a GET request
hits the backend looking for host information.
---
src/kimchi/model/host.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/model/host.py b/src/kimchi/model/host.py
index 4419bb3..588bb28 100644
--- a/src/kimchi/model/host.py
+++ b/src/kimchi/model/host.py
@@ -87,8 +87,8 @@ class HostModel(object):
res['cpu_model'] = line.split(':')[1].strip()
break
- res['cpus'] = psutil.NUM_CPUS
- res['memory'] = psutil.TOTAL_PHYMEM
+ res['cpus'] = 0
+ res['memory'] = 0L
# Include IBM PowerKVM name to supported distro names
_sup_distros = platform._supported_dists + ('ibm_powerkvm',)
@@ -102,6 +102,8 @@ class HostModel(object):
return res
def lookup(self, *name):
+ self.host_info['cpus'] = psutil._psplatform.get_num_cpus()
+ self.host_info['memory'] = psutil.phymem_usage().total
return self.host_info
def swupdate(self, *name):
--
1.9.1
9 years, 8 months
[PATCH V3] Number of CPUs and Physical Memory
by Jose Ricardo Ziviani
V3:
psutil has changed its interface to retrieve the number of CPUs, this
new V3 updates the code while supporting the old version (still needed).
Jose Ricardo Ziviani (1):
Update host number of cpus and total physical memory
src/kimchi/model/host.py | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--
1.9.1
9 years, 8 months
[PATCH][RFC] Kimchi and relative URLs
by Frédéric Bonnard
From: Frederic Bonnard <frediz(a)linux.vnet.ibm.com>
Hi,
many people and distros use a subdirectory in the configuration of the system's webserver
to configure different websites.
The usual way to setup a website is thus to :
1. use the distro's webserver to serve all the websites
2. have a subdirectory to copy the configuration file that makes available a website
by only restarting the webserver (and removing the website is just done by removing
the configuration file and restart). Concerning this point, the classical
configurations can be :
a) a sub web location : https://website.org/webapp
b) a virtual host : http://webapp.website.org
a) and b) correspond each to different configuration files that are just dropped into :
- Ubuntu/Debian : /etc/{apache,nginx,..}/sites-available/{webapp_subweb,webapp_virthost}.conf
- Fedora/Opensuse : /etc/{httpd,nginx,..}/conf.d/
At the moment kimchi is launched with a private instance of nginx, not the system's
installed one and it would be nice to have this improved and this is covered in another thread :
http://lists.ovirt.org/pipermail/kimchi-devel/2015-February/009642.html
Provided that previous patch, one can use the distro's webserver to run proxy kimchi
and that fullfills 1.
Then for 2. one need a configuration file for either b) (provided for apache in the
link above ; I have also one for nginx ) and a), which I provide in this patch.
But this nginx configuration file is not enough for a sub web location configuration
as kimchi relies on absolute path based on / from the http://server/.
I tried to make URLs paths relative so that kimchi doesn't have to know where it has
been placed on the webserver, for example https://server/kimchi/ which will probably
be the URL used in distros.
I'm not a web developer and I tried to modify all failing requests with a a) configuration
with relative paths in mind. So I'd like comments on the way this is done, and this
may need more extensive testing (paths I didn't test).
Though I used that code back on a virtualhost configuration and it worked as well.
Thanks for your help,
F.
Frederic Bonnard (1):
Making urls relative
docs/Makefile.am | 1 +
docs/nginx.conf.subsite.ex | 37 +++++++
src/kimchi/screenshot.py | 2 +-
ui/css/theme-default/template_add.css | 20 ++--
ui/css/theme-default/topbar.css | 2 +-
ui/js/src/kimchi.api.js | 176 +++++++++++++++++-----------------
ui/js/src/kimchi.login.js | 2 +-
ui/pages/guest.html.tmpl | 2 +-
ui/pages/help/dita-help.xsl | 4 +-
ui/pages/kimchi-ui.html.tmpl | 4 +-
ui/pages/storagepool-add.html.tmpl | 2 +-
ui/pages/tabs/storage.html.tmpl | 2 +-
ui/pages/template-add.html.tmpl | 2 +-
13 files changed, 147 insertions(+), 109 deletions(-)
create mode 100644 docs/nginx.conf.subsite.ex
--
1.9.1
9 years, 8 months
[PATCH v3] test_model: Power arch fixes
by Daniel Henrique Barboza
changes in v3:
- rebase to latest master
changes in v2:
- changed iso_path to reflect the new ISO being created (Ubuntu 14.04)
Daniel Henrique Barboza (1):
test/test_model: Power architecture fixes
tests/iso_gen.py | 3 ++-
tests/test_model.py | 12 +++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
--
1.9.3
9 years, 8 months
[kimchi-devel][PATCH] Issue #623: Fix mismatch in host device details query
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Commit #902d2957 began to use splitted devices names,
while get detailed device still use original names.
Mismatched name results in error raised when listing host devices.
Fix it by using splitted device name as well.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/disks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kimchi/disks.py b/src/kimchi/disks.py
index a092c17..5cf6885 100644
--- a/src/kimchi/disks.py
+++ b/src/kimchi/disks.py
@@ -64,7 +64,7 @@ def _get_dev_major_min(name):
dev_list = _get_lsblk_devs(keys)
for dev in dev_list:
- if dev['name'] == name:
+ if dev['name'].split()[0] == name:
maj_min = dev['maj:min']
break
else:
--
1.9.1
9 years, 8 months
[PATCH 0/3] Fix backend VM, POOL, NETWORK naming validation
by Rodrigo Trujillo
This patchset fixes the backend JSON name checkings when user creates
a new VM, POOL or NETWORK.
Rodrigo Trujillo (3):
Prohibits slashes '/' in VM name
Move slash checking in storagepool name from UI to backend
Fix Network create name checking in backend (slashes and quotes)
src/kimchi/API.json | 4 ++++
src/kimchi/i18n.py | 6 +++---
src/kimchi/model/utils.py | 3 ++-
ui/js/src/kimchi.storagepool_add_main.js | 5 -----
ui/pages/i18n.json.tmpl | 1 -
5 files changed, 9 insertions(+), 10 deletions(-)
--
2.1.0
9 years, 8 months