[Kimchi-devel] [RFC] Manage guest CDROM devices
Christy Perez
christy at linux.vnet.ibm.com
Tue Feb 4 13:26:16 UTC 2014
On Mon, 2014-02-03 at 04:24 -0200, Rodrigo Trujillo wrote:
> Reference:
> https://github.com/kimchi-project/kimchi/wiki/Todo-1.2
> https://github.com/kimchi-project/kimchi/wiki/customize-VM
>
>
> Royce has created the structure to add/list/lookup cdrom devices in the
> guests.
> There is a patch in the list (still under revision) with the code:
> " Kimchi-devel] [PATCH 0/5] cdrom: support add and query cdrom "
>
> This RFC aims to continue the second part of this work and modify the
> API to
> allow user to change (UPDATE/POST) attached cd ISOs and delete (DELETE)
> cdrom devices.
> If necessary I can continue the Royces work.
>
>
> Aline has suggested to use the API as "/vms/<name>/storages" :
How about 'media' instead? 'storages' is not a word and sounds very
strange. If we went to use storage, then, how about just 'storage?'
> """
> . . . Maybe we can use /vms/<name>/storages
> That way we can use the same API to add/remove different kind of
> storages to the vm: cdrom, scsi disk, ide disk, etc ...
> """
> This is the first decision here
> (1) Use api as follow ?
> (I propose to use API params to differentiate the storages, like
> '?type=cdrom')
>
> **URI:** /vms/*:name*/storages
> * **GET**: Retrieve all storages attached to the VM
> * **POST**: Attatch new storage to specified virtual machine.
> * name : The name of the storage in the VM.
> * type: The type of the storage: cdrom, disk
> * path *(optional)*: Path of ISO or DISK.
>
> ### Sub-resource: storage
> **URI:** /vms/*:name*/storage/*:name*
> * **GET**: Retrieve the storage information
> * path: Path of the storage
> * type: Type of the storage
> * **PUT**: Update storage information
> * name *(optional)*: The name of the storage in the VM.
> * path *(optional)*: Path of ISO or DISK.
> * **DELETE**: Remove the storage
>
> Examples:
> UPDATE {'path': ''} /vms/vm-1/storage/cdrom-1--> to eject the iso
> UPDATE {'path': '/root/ubuntu.iso'} /vms/vm-1/storage/cdrom-1-->to
> change or insert a media
> POST {'path':'abcd', 'bus': 'ide', 'name': 'cdrom-2'} /vms/vm-1/storage
> --> to attach a new cdrom
> DELETE {} /vms/vm-1/cdroms/cdrom-1-->to detach a cdrom
>
> (2) Should be possible to add and remove storages with the guest running
> ? (Like hot plug)
> Does libvirt provide this ?
I believe so, but I think you've already researched it.
> (3) The new attached isos should be shown in the guests like changing a CD ?
>
Yep.
> (4) The specification mention tuning of the devices. Should tuning be
> always done in the background, or
> allow users to specify tuning parameters ?
For new disks, etc., yes. For a CD ROM, I donno if I would worry about
it.
> Regards,
>
> Rodrigo Trujillo
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
More information about the Kimchi-devel
mailing list