<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/03/2014 04:24 AM, Rodrigo
Trujillo wrote:<br>
</div>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Reference:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/kimchi-project/kimchi/wiki/Todo-1.2">https://github.com/kimchi-project/kimchi/wiki/Todo-1.2</a><br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/kimchi-project/kimchi/wiki/customize-VM">https://github.com/kimchi-project/kimchi/wiki/customize-VM</a><br>
<br>
<br>
Royce has created the structure to add/list/lookup cdrom devices
in the guests.<br>
There is a patch in the list (still under revision) with the code:
<br>
" Kimchi-devel] [PATCH 0/5] cdrom: support add and query cdrom "<br>
<br>
This RFC aims to continue the second part of this work and modify
the API to <br>
allow user to change (UPDATE/POST) attached cd ISOs and delete
(DELETE) cdrom devices.<br>
If necessary I can continue the Royces work.<br>
<br>
</blockquote>
<br>
Yeap! You will need to get Royce's patches, make the adjustments
needed and resend the patch set.<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> <br>
Aline has suggested to use the API as "<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>vms<span class="moz-txt-tag">/</span></i><name>/storages"
:<br>
"""<br>
. . . Maybe we can use <i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>vms<span class="moz-txt-tag">/</span></i><name>/storages
<br>
That way we can use the same API to add/remove different kind of
storages to the vm: cdrom, scsi disk, ide disk, etc ...<br>
"""<br>
This is the first decision here<br>
(1) Use api as follow ? <br>
(I propose to use API params to differentiate the storages,
like '?type=cdrom')<br>
<br>
**URI:** <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>vms<span
class="moz-txt-tag">/</span></i>*:name*/storages <br>
* **GET**: Retrieve all storages attached to the VM<br>
* **POST**: Attatch new storage to specified virtual machine. <br>
* name : The name of the storage in the VM.<br>
</blockquote>
<br>
The name would be the 'dev'? like hdc, sda, etc?<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> * type: The type of the storage: cdrom, disk<br>
</blockquote>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> * path *(optional)*: Path of ISO or DISK.<br>
</blockquote>
<br>
Why path is optional? I think when adding a new storage to VM the
user must specify to where it should point<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> <br>
### Sub-resource: storage<br>
**URI:** <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>vms<span
class="moz-txt-tag">/</span></i>*:name*<i
class="moz-txt-slash"><span class="moz-txt-tag">/</span>storage<span
class="moz-txt-tag">/</span></i>*:name* <br>
* **GET**: Retrieve the storage information <br>
* path: Path of the storage<br>
* type: Type of the storage<br>
</blockquote>
<br>
What about 'dev'?<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> * **PUT**: Update storage information<br>
* name *(optional)*: The name of the storage in the VM.<br>
* path *(optional)*: Path of ISO or DISK.</blockquote>
<br>
We just use the notation "optional" for POST requests<br>
<br>
In this case (PUT) we just list the parameters can be updated<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> <br>
* **DELETE**: Remove the storage<br>
<br>
Examples:<br>
UPDATE {'path': ''} /vms/vm-1/storage/cdrom-1--> to eject the
iso<br>
</blockquote>
<br>
No! The path to the disk should never be empty<br>
To eject a disk/cdrom, use DELETE request<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> UPDATE {'path': '/root/ubuntu.iso'}
/vms/vm-1/storage/cdrom-1-->to change or insert a media<br>
POST {'path':'abcd', 'bus': 'ide', 'name': 'cdrom-2'}
/vms/vm-1/storage --> to attach a new cdrom<br>
</blockquote>
<br>
'bus'?? I didn't see any reference to it above<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> DELETE {} /vms/vm-1/cdroms/cdrom-1-->to detach a
cdrom <br>
<br>
(2) Should be possible to add and remove storages with the guest
running ? (Like hot plug)<br>
Does libvirt provide this ?<br>
</blockquote>
<br>
It would be good to have. Need to check libvirt and so.<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> <br>
(3) The new attached isos should be shown in the guests like
changing a CD ?<br>
<br>
</blockquote>
<br>
I didn't understand that question.<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> (4) The specification mention tuning of the devices.
Should tuning be always done in the background, or<br>
allow users to specify tuning parameters ?<br>
<br>
</blockquote>
<br>
What tuning parameters are you talking about?<br>
<br>
<blockquote cite="mid:52EF3623.3070104@linux.vnet.ibm.com"
type="cite"> Regards, <br>
<br>
Rodrigo Trujillo<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>