RFC - Guest memory usage
by Daniel Henrique Barboza
I was looking at the following item in the backlog:
Guests Stats: Display memory utilization (use virt-df or virt-top or ...)
If I understood it right, the idea here is to show the -inner- memory
allocation of the guest. If you have a VM with 4Gb of RAM running an
Ubuntu, we want to know how much memory the Ubuntu OS and its processes
are using.
I've done an investigation and I haven't found any tool to accomplish
this. "virt-top", "virsh dommemstat" and the libvirt API retrieves the
information of the memory usage of the guest relative to the host. In
the example mentioned before, supposing that the host has 64Gb of RAM,
all these tools would show that the VM is using 12% of the host RAM.
They do not dive in the VM and shows the actual mem usage of the Ubuntu
and its processes running there.
Haven't found anything useful in other MLs and forums. The common answer
is 'run top in a terminal inside the VM', which of course does not suit
us. My question is: any thoughts about how we can implement this
feature? Because I am starting to think that, in the end, this kind of
info is strict to the guest OS and can't be polled from the outside.
Thanks!
9 years, 2 months
[PATCH 0/4] Improve VM CPU update code
by Crístian Deives
This patchset refactors part of the code related to updating VM CPUs.
I am aware of two tests which are failing with this patchset. They'll be worked
on before the final version.
Crístian Deives (4):
Use locks to prevent concurrent updates to VMs
Update VCPU by using libvirt function
Set max VCPU count to the max supported value
Check if the VM update params are valid for the current state
src/kimchi/i18n.py | 3 ++-
src/kimchi/mockmodel.py | 48 ++++++++++++++------------------------
src/kimchi/model/vms.py | 62 ++++++++++++++++++++++++++++++++++++++-----------
tests/test_rest.py | 3 ++-
4 files changed, 71 insertions(+), 45 deletions(-)
--
2.4.3
9 years, 3 months
New branches upstream
by Aline Manera
Hi all,
As we decided for a stabilization release after 1.5, I will create a new
branch named 'next' to apply the patches not related to bug fixes.
Once we get 1.5.1 released, the 'next' branch will be merged into 'master'
I will also create the 'wok' branch to handle the wok framework and the
new UI development.
I want to use the 1.5.1 time frame to test as much as we can the wok
framework and the new UI we can release all that right after 1.5.1
Summary:
- master: current release development
- next <https://github.com/kimchi-project/kimchi/tree/next>: new features
- wok <https://github.com/kimchi-project/kimchi/tree/wok>: disruptive
features (wok framework + new UI)
The current 'wok' branch is a copy of the master branch.
I am working with Lucio to get the new UI patches merged with the 'wok'
patches so we can update the upstream branch accordingly.
Regards,
Aline Manera
9 years, 5 months
[PATCH 2/2] Review changes for Kimchi
by Kersten
Made changes to 3 files per comments from Aline.
Signed-off-by: Kersten <kersten(a)us.ibm.com>
---
ui/pages/help/en_US/guests.dita | 30 +++++++++++++++---------------
ui/pages/help/en_US/storage.dita | 8 ++++----
ui/pages/help/en_US/templates.dita | 15 +++++++++------
3 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/ui/pages/help/en_US/guests.dita b/ui/pages/help/en_US/guests.dita
index 7d0d453..45cf7da 100644
--- a/ui/pages/help/en_US/guests.dita
+++ b/ui/pages/help/en_US/guests.dita
@@ -10,14 +10,14 @@ https://w3.opensource.ibm.com/projects/dita-cshelp/-->
<cshelp id="kimhvirtm" xml:lang="en-us">
<title>Guests</title>
<shortdesc>The <wintitle>Guests</wintitle> page lists the defined
-guests or virtual machines.</shortdesc>
+guests for your server.</shortdesc>
<csbody>
<p>For each guest, the following information is displayed:<dl><dlentry>
<dt>Name</dt>
-<dd>Name of the virtual machine.</dd>
+<dd>Name of the guest.</dd>
</dlentry><dlentry>
<dt>CPU</dt>
-<dd>Percentage of processor utilization in the virtual machine.</dd>
+<dd>Percentage of processor utilization in the guest.</dd>
</dlentry><dlentry>
<dt>Disk I/O</dt>
<dd>Disk input/output transmission rate in KB per seconds.</dd>
@@ -53,16 +53,16 @@ existing guest. Guests can be edited only while stopped.</li>
<li>Select <uicontrol>Power Off</uicontrol> to force an immediate
shut down of the guest.</li>
<li>Select <uicontrol>Delete</uicontrol> to delete the guest.</li>
-</ul>To create a guest, or virtual machine, click the <uicontrol>plus
-(+)</uicontrol> icon on the page.</p>
+</ul>To create a guest, click the <uicontrol>plus (+)</uicontrol> icon
+on the page.</p>
</csbody>
<cshelp id="kimhvirtmcrt" xml:lang="en-us">
-<title>Create a guest (virtual machine)</title>
+<title>Create a guest</title>
<shortdesc>Create a guest by using an existing template.</shortdesc>
<csbody>
<p> <ol>
-<li>Type the name to be used to identify the virtual machine.</li>
-<li rev="rev1">Select a template. <ul>
+<li>Type the name to be used to identify the guest.</li>
+<li>Select a template. <ul>
<li>If templates exist, select from displayed templates.</li>
<li>If no templates exist, click <uicontrol>Create a template</uicontrol> to
create a template.</li>
@@ -73,9 +73,9 @@ create a template.</li>
</cshelp>
<cshelp id="kimhvirtmedit" xml:lang="en-us">
<title>Edit guest</title>
-<shortdesc>Edit the properties of an existing virtual machine. Some
-properties can be edited only while guest is stopped. Others will
-take effect in next boot.</shortdesc>
+<shortdesc>Edit the properties of an existing guest. Some properties
+can be edited only while guest is stopped. Others will take effect
+in next boot.</shortdesc>
<csbody>
<dl><dlentry>
<dt>General</dt>
@@ -124,11 +124,11 @@ guest.</li>
iSCSI volumes or if the target pool does not have enough space, the
clone will be created on a default storage pool. </note></li>
</ol>
-<p>A guest appears in your list with the label "cloning..." When the
-process is complete, the cloned guest is available to use.</p><?Pub
-Caret 54?>
+<p>A guest appears in your list with the label <uicontrol>Cloning...</uicontrol> When
+the process is complete, the cloned guest is available to use.</p><?Pub
+Caret 45?>
</csbody>
</cshelp>
<?tm 1391540919 3?>
</cshelp>
-<?Pub *0000005359?>
+<?Pub *0000005287?>
diff --git a/ui/pages/help/en_US/storage.dita b/ui/pages/help/en_US/storage.dita
index e6f995d..53d1404 100644
--- a/ui/pages/help/en_US/storage.dita
+++ b/ui/pages/help/en_US/storage.dita
@@ -94,16 +94,16 @@ pool is created, it will be created for you.</li>
</cshelp>
<cshelp id="kimhdefstor" xml:lang="en-us">
<title>Add volume</title>
-<shortdesc>Adds volume to a storage pool.</shortdesc><?Pub Caret 0?>
+<shortdesc>Adds volume to a storage pool.</shortdesc>
<csbody>
<dl><dlentry>
<dt>Fetch from remote URL</dt>
-<dd>Specifies a location to upload the volume from. For example: <filepath>https://my-server/fedora22.img</filepath>.</dd>
+<dd>Specifies a location to download the volume from. For example: <filepath>https://my-server/fedora22.img</filepath>.</dd>
</dlentry><dlentry>
<dt>Upload a file</dt>
<dd>Specifies a location on your local system.</dd>
-</dlentry></dl>
+</dlentry></dl><?Pub Caret 57?>
</csbody>
</cshelp>
</cshelp>
-<?Pub *0000004413?>
+<?Pub *0000004416?>
diff --git a/ui/pages/help/en_US/templates.dita b/ui/pages/help/en_US/templates.dita
index 1c03016..ad3747c 100644
--- a/ui/pages/help/en_US/templates.dita
+++ b/ui/pages/help/en_US/templates.dita
@@ -55,7 +55,7 @@ You can select multiple networks.</dd>
<dd>In the <uicontrol>CPU Number</uicontrol> field, specify the number
of processors that are defined for the template.</dd>
<dd>Select to Manually set CPU topology for each guest.</dd>
-</dlentry></dl><?Pub Caret 322?>
+</dlentry></dl>
</csbody>
</cshelp>
<cshelp id="kimhaddtempl">
@@ -69,16 +69,19 @@ ISO image to 'ISO' storage pool for following discovery.</shortdesc>
<dd>Select to scan storage pools for installation ISO images available
on the system.</dd>
</dlentry><dlentry>
+<dt>Local Image File</dt>
+<dd>Select to specify a path to the local image file.</dd>
+</dlentry><dlentry>
<dt>Remote ISO image</dt>
<dd>Select to specify a remote location for an installation ISO image.</dd>
</dlentry></dl>
</csbody>
</cshelp>
<cshelp id="kimhaddloct">
-<title>Add template - local ISO image</title>
-<shortdesc>Add a template from a local ISO image.</shortdesc>
+<title>Add template - ISO image</title>
+<shortdesc>Add a template from a ISO image.</shortdesc>
<csbody>
-<p>The ISO images available on the system are displayed.</p>
+<p>The ISO images available on the system ore remotely are displayed.</p>
<dl><dlentry>
<dt>OS</dt>
<dd>Name of the operating system or distribution.</dd>
@@ -105,7 +108,7 @@ specify a path to the ISO image.</li>
ISO images.</li>
</ul></li>
</ul>
-</csbody>
+</csbody><?Pub Caret -2?>
</cshelp>
</cshelp>
-<?Pub *0000004089?>
+<?Pub *0000004194?>
--
1.9.5.msysgit.1
9 years, 5 months
[PATCH] Help updates for Kimchi
by Kersten
From: Kersten Richter <kersten(a)us.ibm.com>
includes all of the dita files for kimchi. cleaned up coding a bit and
simplified help. Also added new tasks and information (storage volume
shutdown versus power off.
Signed-off-by: unknown <kersten(a)ADMINIB-EI291RC.rchland.ibm.com>
---
ui/pages/help/en_US/guests.dita | 124 ++++++++++++++++++-------------------
ui/pages/help/en_US/host.dita | 22 +++----
ui/pages/help/en_US/network.dita | 7 +--
ui/pages/help/en_US/storage.dita | 50 +++++++++------
ui/pages/help/en_US/templates.dita | 86 +++++++++++--------------
5 files changed, 141 insertions(+), 148 deletions(-)
diff --git a/ui/pages/help/en_US/guests.dita b/ui/pages/help/en_US/guests.dita
index 1bb437a..7d0d453 100644
--- a/ui/pages/help/en_US/guests.dita
+++ b/ui/pages/help/en_US/guests.dita
@@ -10,7 +10,7 @@ https://w3.opensource.ibm.com/projects/dita-cshelp/-->
<cshelp id="kimhvirtm" xml:lang="en-us">
<title>Guests</title>
<shortdesc>The <wintitle>Guests</wintitle> page lists the defined
-KVM virtual machines.</shortdesc>
+guests or virtual machines.</shortdesc>
<csbody>
<p>For each guest, the following information is displayed:<dl><dlentry>
<dt>Name</dt>
@@ -19,12 +19,12 @@ KVM virtual machines.</shortdesc>
<dt>CPU</dt>
<dd>Percentage of processor utilization in the virtual machine.</dd>
</dlentry><dlentry>
-<dt>Network I/O</dt>
-<dd>Network input/output transmission rate in KB per seconds.</dd>
-</dlentry><dlentry>
<dt>Disk I/O</dt>
<dd>Disk input/output transmission rate in KB per seconds.</dd>
</dlentry><dlentry>
+<dt>Network I/O</dt>
+<dd>Network input/output transmission rate in KB per seconds.</dd>
+</dlentry><dlentry>
<dt>Livetile</dt>
<dd>State of guest operating system console, or an icon that represents
the <tm tmtype="tm" trademark="Linux">Linux</tm> distribution if the
@@ -42,18 +42,23 @@ the power is off; if the icon is green, the power is on.</dd>
<p>The following actions can be selected for each guest:<ul>
<li>Select <uicontrol>Connect</uicontrol> to connect to the remote
console for the guest operating system.</li>
-<li>Select <uicontrol>Manage media</uicontrol> to change the path
-to the installation media.</li>
-<li>Select <uicontrol>Reset</uicontrol> to reset the guest.</li>
+<li>Select <uicontrol>Clone</uicontrol> to copy an existing guest
+definition to create a guest.</li>
+<li>Select <uicontrol>Reset</uicontrol> to reset the guest. You can
+only reset a guest that is started.</li>
<li>Select <uicontrol>Edit</uicontrol> to edit the properties of an
existing guest. Guests can be edited only while stopped.</li>
+<li>Select <uicontrol>Start</uicontrol> to start a guest</li>
+<li>Select <uicontrol>Shut Down</uicontrol> to shut down a guest gracefully.</li>
+<li>Select <uicontrol>Power Off</uicontrol> to force an immediate
+shut down of the guest.</li>
<li>Select <uicontrol>Delete</uicontrol> to delete the guest.</li>
</ul>To create a guest, or virtual machine, click the <uicontrol>plus
-(+)</uicontrol> icon in the upper right of the page.</p>
+(+)</uicontrol> icon on the page.</p>
</csbody>
<cshelp id="kimhvirtmcrt" xml:lang="en-us">
-<title>Create virtual machine</title>
-<shortdesc>Create a virtual machine by using an existing template.</shortdesc>
+<title>Create a guest (virtual machine)</title>
+<shortdesc>Create a guest by using an existing template.</shortdesc>
<csbody>
<p> <ol>
<li>Type the name to be used to identify the virtual machine.</li>
@@ -61,76 +66,69 @@ existing guest. Guests can be edited only while stopped.</li>
<li>If templates exist, select from displayed templates.</li>
<li>If no templates exist, click <uicontrol>Create a template</uicontrol> to
create a template.</li>
-</ul></li>
+</ul>You can view information about a template by hovering over it.</li>
<li>Click <uicontrol>Create</uicontrol>.</li>
</ol> </p>
</csbody>
</cshelp>
<cshelp id="kimhvirtmedit" xml:lang="en-us">
<title>Edit guest</title>
-<shortdesc>Edit the properties of an existing virtual machine. Some properties
-can be edited only while guest is stopped. Others will take effect in next boot.</shortdesc>
-<csprolog><csmetadata></csmetadata></csprolog>
+<shortdesc>Edit the properties of an existing virtual machine. Some
+properties can be edited only while guest is stopped. Others will
+take effect in next boot.</shortdesc>
<csbody>
-<p>For each guest, the following information is displayed on the <wintitle>General</wintitle> tab:<dl>
-<dlentry>
-<dt>Name</dt>
-<dd>Name of the virtual machine. (can only be edited while guest is stopped)</dd>
-</dlentry><dlentry>
-<dt>CPUs</dt>
-<dd>Number of processors. (if guest is running, new amount will take effect
-in next boot)</dd>
-</dlentry><dlentry>
-<dt>Memory</dt>
-<dd>Amount of memory in MB. (if guest is running, new amount will take effect
-in next boot)</dd>
-</dlentry><dlentry>
-<dt>Icon</dt>
-<dd>Graphic image representing the Linux distribution to be displayed
-in place of current status (Livetile) when the guest is not active.</dd>
-</dlentry></dl></p>
-<p>The following information is displayed on the <wintitle>Storage</wintitle> tab.</p>
<dl><dlentry>
+<dt>General</dt>
+<dd>Displays information about your guest, including name, CPUs, memory,
+and icon to use for your guest. You can edit the name of a stopped
+guest. Changing the CPUs and memory takes effect after the next boot.</dd>
+</dlentry><dlentry>
<dt>Storage</dt>
-<dd>Displays the location of the ISO file used for installation.</dd>
-</dlentry></dl><?Pub Caret -2?>
+<dd>Displays the device and path for storage for the selected guest.
+You can add, edit, and remove storage devices for your guest.</dd>
+</dlentry></dl>
+<dl><dlentry>
+<dt>Interface</dt>
+<dd>Displays network information for the guest, including name, type,
+and MAC address. You can add, edit, and remove interfaces for your
+guest.</dd>
+</dlentry></dl>
+<dl><dlentry>
+<dt>Permission</dt>
+<dd>Displays the users and groups that are authorized for the guest. </dd>
+</dlentry></dl>
+<dl><dlentry>
+<dt>Host PCI Device</dt>
+<dd>Displays a list of all PCI devices available on the host. </dd>
+</dlentry></dl>
+<dl><dlentry>
+<dt>Snapshot</dt>
+<dd>Displays snapshots of the guest. You can create, edit, or delete
+a snapshot. By selecting a snapshot and selecting revert, the guest
+is restored to a point in the past, determined by the snapshot data,
+and discards any changes made beyond that point in time.</dd>
+</dlentry></dl>
<p> Fields that are not disabled can be edited. After you edit a field,
click <uicontrol>Save</uicontrol>. </p>
</csbody>
</cshelp>
-<cshelp id="kimstoragedevice" xml:lang="en-us">
-<title>Add, replace, or detach a storage device</title>
-<shortdesc rev="rev1">You can add, replace, or detach a storage device
-to your virtual machine. The only supported device is CDROM. To edit
-your storage devices, follow these steps:</shortdesc>
-<csbody>
-<ol>
-<li>On the <wintitle>Edit Guest</wintitle> window, select <wintitle>Storage</wintitle>.</li>
-<li>To replace a storage device, click the first icon with the <uicontrol>orange
-slash (/)</uicontrol>. Enter the ISO file path and click <uicontrol>Replace</uicontrol>.</li>
-<li>To detach a storage device, click the second icon with the <uicontrol>red
-dash (-)</uicontrol>. Confirm the deletion and click <uicontrol>OK</uicontrol>.</li>
-<li>To add a storage device, click the third icon with the green <uicontrol>plus
-sign (+)</uicontrol>. Enter a device name and ISO file path and click <uicontrol>Attach</uicontrol>.</li>
-</ol>
-</csbody>
-</cshelp>
-<cshelp id="kimreplacemedia" xml:lang="en-us">
-<title>Replace a CDROM of VM</title>
-<shortdesc rev="rev1">You can replace the contents of the CDROM for
-a virtual machine after the installation is complete.</shortdesc>
+<cshelp id="kimhvirtmclone" xml:lang="en-us">
+<title>Cloning a guest</title>
+<shortdesc>Cloning a guests allows you to create a copy of a guest.</shortdesc>
<csbody>
+<p>To clone a guest:</p>
<ol>
-<li>Ensure that the virtual machine is started.</li>
-<li>From the Actions menu, select <uicontrol>Manage Media</uicontrol>.</li>
-<li>To change what is currently loaded in the CDROM, click the <uicontrol>orange
-slash (/)</uicontrol> icon next to the hdc field.</li>
-<li>On the <wintitle>Replace a CDROM of VM</wintitle> page, enter
-the ISO file path. The other two fields are read-only.</li>
-<li>Click <uicontrol>Replace</uicontrol>.</li>
+<li>Select <uicontrol>Clone</uicontrol> from the Action menu of a
+guest.</li>
+<li>Accept the warning. <note>When a target guest is using SCSI or
+iSCSI volumes or if the target pool does not have enough space, the
+clone will be created on a default storage pool. </note></li>
</ol>
+<p>A guest appears in your list with the label "cloning..." When the
+process is complete, the cloned guest is available to use.</p><?Pub
+Caret 54?>
</csbody>
</cshelp>
<?tm 1391540919 3?>
</cshelp>
-<?Pub *0000005541?>
+<?Pub *0000005359?>
diff --git a/ui/pages/help/en_US/host.dita b/ui/pages/help/en_US/host.dita
index 0dcb670..4af3498 100644
--- a/ui/pages/help/en_US/host.dita
+++ b/ui/pages/help/en_US/host.dita
@@ -20,18 +20,16 @@ system.</li>
<li>Select <uicontrol>Connect</uicontrol> to open a VNC connection
to the host system, if it is not already connected.</li>
</ul></p>
-<p>Click the following sections to display information about the host:<dl>
-<dlentry>
+<p>Click the following sections to display information about the host:</p>
+<dl><dlentry>
<dt>Basic information</dt>
<dd>This section displays the host operating system distribution,
-version, and code name, as well as the processor type, the number of
-online CPUs and amount of memory in GB.</dd>
+version, and code name, as well as the processor type, the number
+of online CPUs and amount of memory in GB.</dd>
</dlentry><dlentry>
<dt>System statistics</dt>
<dd>This section displays graphs to show statistics for CPU, memory,
-disk I/O, and network I/O for the host. Select <uicontrol>Collecting
-data after leaving this page</uicontrol> to continue collecting data
-when the host tab is out of view.</dd>
+disk I/O, and network I/O for the host. </dd>
</dlentry><dlentry>
<dt>Software Updates</dt>
<dd>This section displays information for all of the packages that
@@ -49,8 +47,8 @@ If your system is Ubuntu or Debian, then add <filepath>deb</filepath> repositori
you are working with yum repositories, you can add a GPG check to
verify that a package from this repository have not been corrupted.
Select a repository and then <uicontrol>Edit</uicontrol>. Select <uicontrol>Yes</uicontrol> to
-enable GPG Check and then enter a URL to the GPG key file for the
-repository.</p><?Pub Caret 156?></dd>
+enable <uicontrol>GPG Check</uicontrol> and then enter a URL to the
+GPG key file for the repository.</p></dd>
</dlentry><dlentry>
<dt>Debug reports</dt>
<dd>This section displays debug reports, including name and file path.
@@ -63,8 +61,8 @@ configuration and diagnostic information, such as the running kernel
version, loaded modules, and system and service configuration files.
The command also runs external programs to collect further information
and stores this output in the resulting archive.</p> </dd>
-</dlentry></dl></p>
-</csbody>
+</dlentry></dl>
+</csbody><?Pub Caret -1?>
<?tm 1392659967 1?>
</cshelp>
-<?Pub *0000003492?>
+<?Pub *0000003410?>
diff --git a/ui/pages/help/en_US/network.dita b/ui/pages/help/en_US/network.dita
index 25c05ff..9f67070 100644
--- a/ui/pages/help/en_US/network.dita
+++ b/ui/pages/help/en_US/network.dita
@@ -35,8 +35,7 @@ connection.</li>
<li>Select <uicontrol>Stop</uicontrol> to end the network connection.</li>
<li>Select <uicontrol>Delete</uicontrol> to delete the connection
information.</li>
-</ul>To create a network, click the <uicontrol>plus (+)</uicontrol> icon
-in the upper right of the display.</p>
+</ul>To create a network, click the <uicontrol>plus (+)</uicontrol> icon.</p>
</csbody>
<cshelp id="kimhnetwcrt" xml:lang="en-us">
<title>Create a network</title>
@@ -59,10 +58,10 @@ initiate communication to guests.</dd>
be contacted by external systems as if they were physical systems
on the network. For bridged mode, you must specify additional destination
and VLAN information.</dd>
-</dlentry></dl><?Pub Caret 224?></li>
+</dlentry></dl></li><?Pub Caret -2?>
<li>Click <uicontrol>Create</uicontrol>.</li>
</ol> </p>
</csbody>
</cshelp>
</cshelp>
-<?Pub *0000002571?>
+<?Pub *0000002536?>
diff --git a/ui/pages/help/en_US/storage.dita b/ui/pages/help/en_US/storage.dita
index d9a32f9..e6f995d 100644
--- a/ui/pages/help/en_US/storage.dita
+++ b/ui/pages/help/en_US/storage.dita
@@ -10,13 +10,17 @@ https://w3.opensource.ibm.com/projects/dita-cshelp/-->
<cshelp id="kimhstor" xml:lang="en-us">
<title>Storage</title>
<shortdesc>The <wintitle>Storage</wintitle> page lists the available
-storage pools, including the out of box 'default' and 'ISO' storage pool.
-If you want to use your own ISO, please add it to 'ISO' storage pool path.</shortdesc>
+storage pools, including the out of box 'default' and 'ISO' storage
+pool. If you want to use your own ISO, please add it to 'ISO' storage
+pool path.</shortdesc>
<csbody>
<p>For each storage pool, the following information is displayed:<dl>
<dlentry>
<dt>Name</dt>
-<dd>Name of the storage pool and percentage used.</dd>
+<dd>Name of the storage pool.</dd>
+</dlentry><dlentry>
+<dt>% Used</dt>
+<dd>Percentage of the storage pool that is being used.</dd>
</dlentry><dlentry>
<dt>State</dt>
<dd>State of the storage pool, active (green) or inactive (red). </dd>
@@ -38,25 +42,14 @@ If you want to use your own ISO, please add it to 'ISO' storage pool path.</shor
pool so that it can be used.</li>
<li>Select <uicontrol>Deactivate</uicontrol> to deactivate an active
storage pool.</li>
+<li>Select <uicontrol>Add Volume</uicontrol> to add more volume to
+an active storage pool.</li>
<li>Select <uicontrol>Undefine</uicontrol> to remove an inactive storage
pool.</li>
</ul></p>
<p>To display storage volume details for a storage pool, click the
-arrow on the right side of the storage pool row. Details include
-the following:<dl><dlentry>
-<dt>Type</dt>
-<dd>The type of volume, for example, <uicontrol>file</uicontrol>.</dd>
-</dlentry><dlentry>
-<dt>Format</dt>
-<dd>The format, varying dependent on the type.</dd>
-</dlentry><dlentry>
-<dt>Capacity</dt>
-<dd>Size of the storage volume.</dd>
-</dlentry><dlentry>
-<dt>Allocation</dt>
-<dd>Amount of space that is already allocated in the storage pool.</dd>
-</dlentry></dl>To define a storage pool, click the <uicontrol>plus
-(+)</uicontrol> icon in the upper right of the display.</p>
+arrow on the right side of the storage pool row. To define a storage
+pool, click the <uicontrol>plus (+)</uicontrol> icon.</p>
</csbody>
<cshelp id="kimhdefstor" xml:lang="en-us">
<title>Define a storage pool</title>
@@ -90,10 +83,27 @@ the device in <uicontrol>Device path</uicontrol>.</dd>
<dt><uicontrol>SCSI Fibre Channel</uicontrol></dt>
<dd>Specifies a pool based on an SCSI Fibre Channel. Select which
SCSI adapter to use.</dd>
-</dlentry></dl><?Pub Caret 0?></li>
+</dlentry></dl></li>
+<li>Specify a storage path for the storage pool. The storage path
+is the location in the local file system that the pool is mapped to.
+The path must be unique. If the directory does not exist when the
+pool is created, it will be created for you.</li>
<li>Click <uicontrol>Create</uicontrol>.</li>
</ol> </p>
</csbody>
</cshelp>
+<cshelp id="kimhdefstor" xml:lang="en-us">
+<title>Add volume</title>
+<shortdesc>Adds volume to a storage pool.</shortdesc><?Pub Caret 0?>
+<csbody>
+<dl><dlentry>
+<dt>Fetch from remote URL</dt>
+<dd>Specifies a location to upload the volume from. For example: <filepath>https://my-server/fedora22.img</filepath>.</dd>
+</dlentry><dlentry>
+<dt>Upload a file</dt>
+<dd>Specifies a location on your local system.</dd>
+</dlentry></dl>
+</csbody>
+</cshelp>
</cshelp>
-<?Pub *0000003914?>
+<?Pub *0000004413?>
diff --git a/ui/pages/help/en_US/templates.dita b/ui/pages/help/en_US/templates.dita
index 57ee9b5..1c03016 100644
--- a/ui/pages/help/en_US/templates.dita
+++ b/ui/pages/help/en_US/templates.dita
@@ -12,8 +12,8 @@ https://w3.opensource.ibm.com/projects/dita-cshelp/-->
<shortdesc>The <wintitle>Templates</wintitle> page shows the defined
virtual machine templates that can be used to create KVM guests.</shortdesc>
<csbody>
-<p>For each template, the following information is displayed:<dl>
-<dlentry>
+<p>For each template, the following information is displayed:</p>
+<dl><dlentry>
<dt>OS</dt>
<dd>Name of the operating system or distribution.</dd>
</dlentry><dlentry>
@@ -25,74 +25,61 @@ virtual machine templates that can be used to create KVM guests.</shortdesc>
</dlentry><dlentry>
<dt>Memory</dt>
<dd>Amount of random access memory to be allocated, in MB.</dd>
-</dlentry></dl></p>
-<p>The following actions can be selected for each template:<ul>
+</dlentry></dl>
+<p>The following actions can be selected for each template:</p>
+<ul>
<li>Select <uicontrol>Edit</uicontrol> to edit the template.</li>
+<li>Select <uicontrol>Clone</uicontrol> to copy a template.</li>
<li>Select <uicontrol>Delete</uicontrol> to delete the template.</li>
-</ul>To add a template, click the <uicontrol>plus (+)</uicontrol> icon
-in the upper right of the display.</p>
+</ul>
+<p>To add a template, click the <uicontrol>plus (+)</uicontrol> icon.</p>
</csbody>
<cshelp id="kimhedittempl" xml:lang="en-us">
<title>Edit template</title>
<shortdesc>Edit an existing template.</shortdesc>
<csbody>
-<p>For each template, the following information is displayed: <dl>
-<dlentry>
-<dt>Name</dt>
-<dd>Name of the template.</dd>
+<p>For each template, the following information is displayed: </p>
+<dl><dlentry>
+<dt>General</dt>
+<dd>Displays the name, vendor distribution, version, memory, file
+path to ISO file, and graphics preferences.</dd>
</dlentry><dlentry>
-<dt>Vendor</dt>
-<dd>The name of the company that created the operating system or distribution
-that the template is configured to use.</dd>
+<dt>Storage</dt>
+<dd>Specify the storage pool information for the template.</dd>
</dlentry><dlentry>
-<dt>Version</dt>
-<dd>The version of the operating system or distribution that the template
-is configured to use.</dd>
-</dlentry><dlentry>
-<dt>CPU number</dt>
-<dd>Number of processors that are defined for the template.</dd>
-</dlentry><dlentry>
-<dt>Memory</dt>
-<dd>Amount of memory in MB to be allocated to the virtual machine.</dd>
-</dlentry><dlentry>
-<dt>Disk</dt>
-<dd>Disk size in GB.</dd>
-</dlentry><dlentry>
-<dt>CDROM</dt>
-<dd>File path to the location of the ISO file used to install the
-KVM guest.</dd>
-</dlentry><dlentry>
-<dt>Storage pool</dt>
-<dd>Specific storage pool or the default storage pool.</dd>
+<dt>Interface</dt>
+<dd>Displays the default network interfaces available to the KVM guest.
+You can select multiple networks.</dd>
</dlentry><dlentry>
-<dt>Network</dt>
-<dd>Default network interfaces available to the KVM guest. You can
-select multiple networks.</dd>
-</dlentry></dl> Fields that are not disabled can be edited. After
-you edit a field, click <uicontrol>Save</uicontrol>. </p>
+<dt>Processor</dt>
+<dd>In the <uicontrol>CPU Number</uicontrol> field, specify the number
+of processors that are defined for the template.</dd>
+<dd>Select to Manually set CPU topology for each guest.</dd>
+</dlentry></dl><?Pub Caret 322?>
</csbody>
</cshelp>
<cshelp id="kimhaddtempl">
<title>Add template</title>
-<shortdesc>Add a template from source media.
-You can add your own ISO image to 'ISO' storage pool for following discovery.</shortdesc>
+<shortdesc>Add a template from source media. You can add your own
+ISO image to 'ISO' storage pool for following discovery.</shortdesc>
<csbody>
-<p>Select the location of the source media from the following options:<dl>
-<dlentry>
+<p>Select the location of the source media from the following options:</p>
+<dl><dlentry>
<dt>Local ISO image</dt>
<dd>Select to scan storage pools for installation ISO images available
on the system.</dd>
</dlentry><dlentry>
<dt>Remote ISO image</dt>
<dd>Select to specify a remote location for an installation ISO image.</dd>
-</dlentry></dl></p>
+</dlentry></dl>
</csbody>
</cshelp>
<cshelp id="kimhaddloct">
<title>Add template - local ISO image</title>
<shortdesc>Add a template from a local ISO image.</shortdesc>
<csbody>
-<p>The ISO images available on the system are displayed.<dl><dlentry>
+<p>The ISO images available on the system are displayed.</p>
+<dl><dlentry>
<dt>OS</dt>
<dd>Name of the operating system or distribution.</dd>
</dlentry><dlentry>
@@ -101,13 +88,14 @@ on the system.</dd>
</dlentry><dlentry>
<dt>Size</dt>
<dd>Size of the ISO image.</dd>
-</dlentry></dl></p>
+</dlentry></dl>
<p>To create a template from an ISO image, choose from the following
-options:<ul>
+options:</p>
+<ul>
<li>Select an ISO image from which to create a template, then click <uicontrol>Create
Templates from Selected ISO</uicontrol>.</li>
<li>Select <uicontrol>All</uicontrol> to create a template from each
- listed ISO image, then click <uicontrol>Create Templates from Selected
+listed ISO image, then click <uicontrol>Create Templates from Selected
ISO</uicontrol>.</li>
<li>If the ISO image that you want to use does not appear in the scan
results, you can select from the following options:<ul>
@@ -115,9 +103,9 @@ results, you can select from the following options:<ul>
specify a path to the ISO image.</li>
<li>Click <uicontrol>Search more ISOs</uicontrol> to search for more
ISO images.</li>
-</ul></li><?Pub Caret 0?>
-</ul></p>
+</ul></li>
+</ul>
</csbody>
</cshelp>
</cshelp>
-<?Pub *0000004433?>
+<?Pub *0000004089?>
--
1.9.5.msysgit.1
9 years, 5 months
[PATCH] Kimchi Problems with psutils 3.0.1
by stephan.conrad@gmail.com
From: Stephan Conrad <stephan.conrad(a)gmail.com>
Hi,
psutils 3.0.1 has removed some depricated functions and vaiables. I made a Patch that kimchi can run with this version of psutil.
Regards Stephan
Stephan Conrad (1):
Patched kimchi for psutils 3.0.1
src/kimchi/model/host.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.4.4
9 years, 6 months
[PATCH] Make Kimchi show arch linux version and add support for pacman
by stephan.conrad@gmail.com
From: Stephan Conrad <stephan.conrad(a)gmail.com>
I made a patch witch add the support for software updates via pacman and to show that kimchi is running under Arch Linux
Stephan Conrad (1):
Make Kimchi show arch linux version and add support for pacman
src/kimchi/model/host.py | 2 +-
src/kimchi/swupdate.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 75 insertions(+), 3 deletions(-)
--
2.4.3
9 years, 6 months
[PATCH] Make Kimchi show arch linux version and add support for pacman
by stephan.conrad@gmail.com
From: Stephan Conrad <stephan.conrad(a)gmail.com>
I made a patch witch add the support for software updates via pacman and to show that kimchi is running under Arch Linux
Stephan Conrad (1):
Make Kimchi show arch linux version and add support for pacman
src/kimchi/model/host.py | 2 +-
src/kimchi/swupdate.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 75 insertions(+), 3 deletions(-)
--
2.4.3
9 years, 6 months
[PATCH v2] List IPs of VM Ifaces
by Christy Perez
v2:
- Check VM's state for shutoff, and return empty list of IPs if so.
- RestTests: Start VM before checking for an IP in the list returned.
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
docs/API.md | 1 +
src/kimchi/mockmodel.py | 9 +++++++++
src/kimchi/model/vmifaces.py | 35 +++++++++++++++++++++++++++++++++++
tests/test_rest.py | 16 ++++++++++++++++
4 files changed, 61 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index e022c9e..10e80ac 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -299,6 +299,7 @@ A interface represents available network interface on VM.
* bridge *(optional)*: the name of resource bridge, only be available when the
interface type is bridge.
* mac: Media Access Control Address of the VM interface.
+ * ips: A list of IP addresses associated with this MAC.
* model *(optional)*: model of emulated network interface card. It will be one of these models:
ne2k_pci, i82551, i82557b, i82559er, rtl8139, e1000, pcnet and virtio.
* network *(optional)*: the name of resource network, only be available when the
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index aaf1af2..3f74b80 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -24,6 +24,7 @@ import random
import time
import kimchi.model.cpuinfo
+import kimchi.model.vmifaces
from lxml import objectify
from lxml.builder import E
@@ -76,6 +77,7 @@ class MockModel(Model):
kimchi.model.cpuinfo.get_topo_capabilities = \
MockModel.get_topo_capabilities
+ kimchi.model.vmifaces.getDHCPLeases = MockModel.getDHCPLeases
libvirt.virConnect.defineXML = MockModel.domainDefineXML
libvirt.virDomain.XMLDesc = MockModel.domainXMLDesc
libvirt.virDomain.undefine = MockModel.undefineDomain
@@ -235,6 +237,13 @@ class MockModel(Model):
pool = vol.storagePoolLookupByVolume()
pool.createXML(new_xml)
+ @staticmethod
+ def getDHCPLeases(net, mac):
+ return [{'iface': 'virbr1', 'ipaddr': '192.168.0.167',
+ 'hostname': 'kimchi', 'expirytime': 1433285036L,
+ 'prefix': 24, 'clientid': '01:%s' % mac,
+ 'mac': mac, 'iaid': None, 'type': 0}]
+
def _probe_image(self, path):
return ('unknown', 'unknown')
diff --git a/src/kimchi/model/vmifaces.py b/src/kimchi/model/vmifaces.py
index 93a769b..5df60fc 100644
--- a/src/kimchi/model/vmifaces.py
+++ b/src/kimchi/model/vmifaces.py
@@ -29,6 +29,14 @@ from kimchi.model.vms import DOM_STATE_MAP, VMModel
from kimchi.xmlutils.interface import get_iface_xml
+def getDHCPLeases(net, mac):
+ try:
+ leases = net.DHCPLeases(mac)
+ return leases
+ except libvirt.libvirtError:
+ return []
+
+
class VMIfacesModel(object):
def __init__(self, **kargs):
self.conn = kargs['conn']
@@ -132,9 +140,36 @@ class VMIfaceModel(object):
info['network'] = iface.source.get('network')
if info['type'] == 'bridge':
info['bridge'] = iface.source.get('bridge')
+ info['ips'] = self._get_ips(vm, info['mac'], info['network'])
return info
+ def _get_ips(self, vm, mac, network):
+ ips = []
+
+ # Return empty list if shutoff, even if leases still valid or ARP
+ # cache has entries for this MAC.
+ conn = self.conn.get()
+ dom = VMModel.get_vm(vm, self.conn)
+ if DOM_STATE_MAP[dom.info()[0]] == "shutoff":
+ return ips
+
+ # An iface may have multiple IPs
+ # An IP could have been assigned without libvirt.
+ # First check the ARP cache.
+ with open('/proc/net/arp') as f:
+ ips = [line.split()[0] for line in f.xreadlines() if mac in line]
+ # Some ifaces may be inactive, so if the ARP cache didn't have them,
+ # and they happen to be assigned via DHCP, we can check there too.
+ net = conn.networkLookupByName(network)
+ leases = getDHCPLeases(net, mac)
+ for lease in leases:
+ ip = lease.get('ipaddr')
+ if ip not in ips:
+ ips.append(ip)
+
+ return ips
+
def delete(self, vm, mac):
dom = VMModel.get_vm(vm, self.conn)
iface = self._get_vmiface(vm, mac)
diff --git a/tests/test_rest.py b/tests/test_rest.py
index c2d142f..f0e27e7 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -713,6 +713,7 @@ class RestTests(unittest.TestCase):
self.assertEquals(17, len(res['mac']))
self.assertEquals(get_template_default('old', 'nic_model'),
res['model'])
+ self.assertTrue('ips' in res)
# try to attach an interface without specifying 'model'
req = json.dumps({'type': 'network'})
@@ -743,6 +744,21 @@ class RestTests(unittest.TestCase):
newMacAddr).read())
self.assertEquals(newMacAddr, iface['mac'])
+ # Start the VM
+ resp = self.request('/vms/test-vm/start', '{}', 'POST')
+ vm = json.loads(self.request('/vms/test-vm').read())
+ self.assertEquals('running', vm['state'])
+
+ # Check for an IP address
+ iface = json.loads(self.request('/vms/test-vm/ifaces/%s' %
+ newMacAddr).read())
+ self.assertTrue(len(iface['ips']) > 0)
+
+ # Force poweroff the VM
+ resp = self.request('/vms/test-vm/poweroff', '{}', 'POST')
+ vm = json.loads(self.request('/vms/test-vm').read())
+ self.assertEquals('shutoff', vm['state'])
+
# detach network interface from vm
resp = self.request('/vms/test-vm/ifaces/%s' % iface['mac'],
'{}', 'DELETE')
--
2.1.0
9 years, 6 months
[PATCH 0/2] Issue #670: openSUSE: problem while building Kimchi
by Ramon Medeiros
v3:
Test if string is empty instead of testing directory
v2:
Do not use systemd macros. Copy systemd commands from fedora spec
Ramon Medeiros (2):
Issue #670: openSUSE: problem while building Kimchi
Issue #670: openSUSE: problem while building Kimchi
Makefile.am | 4 ++--
contrib/kimchi.spec.suse.in | 38 ++++++++++++++++++++++++++++++++++----
2 files changed, 36 insertions(+), 6 deletions(-)
--
2.1.0
9 years, 6 months