It works. This method is needed to run multiple guests. If you need to run
1-2 VMs with another type of qemu is more efficient to set the EMULATOR in
the VM's template. It is very expensive to use the full host to run 1-2 VMs.

2015-01-21 19:13 GMT+10:00 Ruben S. Montero <[email protected]>:

> Hi,
>
> I still think that the emulator is more a property of the host/driver
> rather than the VM. Currently we address this by creating two different
> drivers, each one with a different emulator attribute (i.e. two different
> VMM_MAD entries in oned.conf using two different vmm_exec_kvm.conf files).
> Then each host is added using the driver with the right emulator for the
> host (e.g. onehost create host1 -v kvm_qemu ... or onehost create host2 -v
> kvm_sparc ...)
>
> Also, if added to the VM template, this would need to be added to the
> AUTOMATIC_REQUIREMENTS for the scheduler so the host selected for the VM
> supports the emulator set in the VM template.
>
> Did you try the one driver per emulator approach? Does it work for you?
>
> Cheers
>
> Ruben
>
> On Wed Jan 21 2015 at 1:08:33 AM Vladislav Gorbunov <[email protected]>
> wrote:
>
>> Set emulator in vm template will allow to select different type of
>> qemu system emulator for each VM. You can select "user mode", arm or
>> alpha qemu emulator and much more what need without create different
>> OpenNebula installations for each qemu type. Also it allow to use different
>> version of qemu at one host.
>> And comment in /etc/one/vmm_exec/vmm_exec_kvm.conf say that emulator can
>> be overridden in each VM template:
>> # Default configuration attributes for the KVM driver
>> # (all domains will use these values as defaults).  These values can
>> # be overridden in each VM template. Valid atributes are:
>> #  - emulator
>> #  - os [kernel,initrd,boot,root,kernel_cmd,arch,machine]
>> ..
>>
>> I make the patch for default drivers EMULATOR attribute override in VM
>> template. http://dev.opennebula.org/issues/3510
>>
>> 2015-01-21 3:00 GMT+10:00 Ruben S. Montero <[email protected]>:
>>
>>> Hi,
>>>
>>> Yes the VM template is parsed in Virtual Machine.cc insert function.
>>> Those variables not recognized by oned are moved to the user template,
>>> that's the reason you are not getting the value.
>>>
>>> However,  note that the emulator refers to the configuration of the
>>> hypervisor so I think that the driver configuration file is the right place
>>> to set this. Note that in general you do not know where the VM is going to
>>> be deployed beforehand and maybe the EMULATOR value in the VM is not
>>> compatible with the host.
>>>
>>> Cheers
>>>
>>> Ruben
>>>
>>> On Tue, Jan 20, 2015, 5:25 AM Vladislav Gorbunov <[email protected]>
>>> wrote:
>>>
>>>> Hi!
>>>>
>>>> I want  to override EMULATOR attribute in VM template for KVM guest.
>>>> But if I define
>>>> in vm template
>>>> EMULATOR="/usr/bin/qemu-system-x86_64"
>>>> and try to get EMULATOR from template in /src/vmm/LibVirtDriverKVM.cc:
>>>> vm->get_template_attribute("EMULATOR", emulator_path);
>>>> It always return empty string.
>>>> get_default("EMULATOR",emulator_path);
>>>> return value defined in /etc/one/vmm_exec/vmm_exec_kvm.conf.
>>>> Is any filter in code that remove values from user templates?
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org
>>>>
>>>
>>
_______________________________________________
Dev mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/dev-opennebula.org

Reply via email to