<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Reference:<br>
<a 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 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>
<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>
* type: The type of the storage: cdrom, disk<br>
* path *(optional)*: Path of ISO or DISK.<br>
<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>
* **PUT**: Update storage information<br>
* name *(optional)*: The name of the storage in the VM.<br>
* path *(optional)*: Path of ISO or DISK.
<br>
* **DELETE**: Remove the storage<br>
<br>
Examples:<br>
UPDATE {'path': ''} /vms/vm-1/storage/cdrom-1--> to eject the iso<br>
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>
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>
<br>
(3) The new attached isos should be shown in the guests like
changing a CD ?<br>
<br>
(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>
Regards, <br>
<br>
Rodrigo Trujillo<br>
</body>
</html>