[Kimchi-devel] [RFC]Create VM from image

Sheldon shaohef at linux.vnet.ibm.com
Wed Jul 2 12:51:35 UTC 2014


On 07/02/2014 11:23 AM, Aline Manera wrote:
>
> On 07/01/2014 04:53 AM, Royce Lv wrote:
>> Currently kimchi just support create a vm from an ISO defined 
>> template. This requires duplicate installation.
>> This release we want to support create a vm from an installed image.
>>
>> This involves the following change:
>>
>> 1. Create a template from an image:
>>
>> POST /templates/template-1
>> {'base': 'abs_base_img_path'}
>>
>> Implementation:
>> (1)probe image os distro and version to get suggested config.
>> (2)Avoid image to be deleted.
>> (3)Avoid using ISO and base image at the same time.
>>
>> 2. Create a vm from image based template:
>> This part has already been covered by Aline's prototype patch.
>>
>> POST /vms/vm-1
>> {'storagepool': 'default', 'network': 'default', 'disks':[{'index':0, 
>> 'base': 'abs_path'}]}
>> or
>> {'storagepool': 'default', 'network': 'default', 'disks':[{'index':0, 
>> 'base': 'abs_path', 'volume': 'scsi_volume'}]}
>>
>> The create vm implementation need to be re-considered for the 
>> following points:
>> (1) when creating vm on scsi/iscsi pool, if volume size smaller than 
>> original image, need to be rejected.
>
> From that, I assume you will copy the img content to the scsi/iscsi 
> volume. Is that correct?
> If so, can't we use backing store 
> (http://libvirt.org/formatstorage.html#StorageVolBacking) for the 
> existing img and make the vm volume the RW img?
We should let user to check backing store on not.
If user want high performance, then he will give up backing store.

the volume can be any valid volume. raw/qcow file, logical disk or 
scsi/iscsi.

>
> During my prototype development, I used backing store and it worked 
> well with directory storage volumes
> But I haven't tested it with scsi/iscsi volumes
>
>> (2) when creating vm on directory based pool, volume generating logic 
>> is different with allocation new volume.
>> (2) xml generating need to be refactored.
>>
>> Anything else need to be considered, welcome your comments.
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>
>
>


-- 
Thanks and best regards!

Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center




More information about the Kimchi-devel mailing list