[Kimchi-devel] [PATCH] [Kimchi 0/3] Issue #372: Add support to netboot installation.

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Tue Feb 23 18:00:36 UTC 2016


Ok.
I'll wait Rammon's patches and then resubmit the the patches

Paulo.

On 02/23/2016 02:18 PM, Aline Manera wrote:
> 
> Hi Paulo,
> 
> Ramon is working on a patch to change the way the Templates are created.
> It will replace 'cdrom' and 'disks[base]' parameters to 'source_media'
> I have talked to him to do something like:
> 
> source_media: {type: disk/netboot, path: <source-media-path>}
> 
> To create a Template based on disk (cdrom or base img) the type=disk and
> a path must be specified.
> To create a netboot Template, only the type is required.
> 
> That way we don't need to mix things in the 'cdrom' parameter as you did
> with this patch.
> The API will be as I described above (Ramon let us know if I am missing
> something) so if you want, you can change this patch accordingly or work
> on top of Ramon's patch.
> 
> Regards,
> Aline Manera
> 
> On 02/16/2016 07:40 PM, pvital at linux.vnet.ibm.com wrote:
>> From: Paulo Vital <pvital at linux.vnet.ibm.com>
>>
>> This patchset adds support in backend to create templates and guests
>> to netboot
>> without setting a cdrom path or URL as image to install. Once created
>> a guest
>> to boot via network, the guest will request DHCP/TFTP/(NFS/HTTP/FTP)
>> network
>> installation servers to download the configured images and start the
>> install.
>>
>> To test, use the curl commands:
>>
>> curl -k -u test -H "Content-Type: application/json" -H \
>> "Accept: application/json"
>> 'https://localhost:8001/plugins/kimchi/templates' \
>> -X POST -d '{"name": "test-netboot"}'
>> Enter host password for user 'test':
>> {
>>    "cpu_info":{
>>      "maxvcpus":1,
>>      "vcpus":1
>>    },
>>    "graphics":{
>>      "type":"vnc",
>>      "listen":"127.0.0.1"
>>    },
>>    "cdrom":"netboot",
>>    "networks":[
>>      "default"
>>    ],
>>    "icon":"plugins/kimchi/images/icon-vm.png",
>>    "os_distro":"unknown",
>>    "name":"test-netboot",
>>    "disks":[
>>      {
>>        "index":0,
>>        "format":"qcow2",
>>        "pool":{
>>          "type":"dir",
>>          "name":"/plugins/kimchi/storagepools/default"
>>        },
>>        "size":10
>>      }
>>    ],
>>    "invalid":{},
>>    "os_version":"unknown",
>>    "memory":1024,
>>    "folder":[]
>> }
>>
>> curl -k -u test -H "Content-Type: application/json" -H \
>> "Accept: application/json" 'https://localhost:8001/plugins/kimchi/vms'
>> -X POST \
>> -d
>> '{"name":"1netboot-test","template":"/plugins/kimchi/templates/test-netboot"}'
>>
>> Enter host password for user 'test':
>> {
>>    "status":"running",
>>    "message":"OK",
>>    "id":"1",
>>    "target_uri":"/plugins/kimchi/vms/1netboot-test"
>> }
>>
>>
>> Paulo Vital (3):
>>    Add support to create templates without ISO image.
>>    Add support to create guests without ISO image.
>>    Update test cases to support netboot.
>>
>>   model/templates.py       | 35 ++++++++++++++++++++++-------------
>>   tests/test_template.py   | 18 ++++++++++++++----
>>   tests/test_vmtemplate.py | 16 ++++++++++++++++
>>   vmtemplate.py            | 29 ++++++++++++++++++-----------
>>   xmlutils/bootorder.py    | 44
>> ++++++++++++++++++++++++++++++++++++++++++++
>>   5 files changed, 114 insertions(+), 28 deletions(-)
>>   create mode 100644 xmlutils/bootorder.py
>>
>> -- 
>> 2.5.0
> 




More information about the Kimchi-devel mailing list