I have ONe 6.4.0, and I have just added a LXC host (into a new cluster) for evaluation purposes. Now it seems that scheduler tries to send existing KVM-based VMs on that LXC host (which, obviously, does not work). The guest in question has “HYPERVISOR: kvm” attribute, so I would think that the scheduler would not try to use a LXC host for that VM.
How can I set up the scheduler to honor the HYPERVISOR attribute?
Note: probably related to this older post, I hope the situation has changed since then: KVM instances trying to use LXD host
You need to specify which hypervisors are compatible with the VM Template on the SCHED_REQUIREMENTS section. On your KVM VMs you can add
HYPERVISOR = kvm and the VM will only be scheduled to hosts with the HYPERVISOR attribute set to
kvm, you can do the same to prevent LXC VMs from being deployed on KVM hosts.
dclavijo: thanks for the reply. But I have 1000+ running VMs now. Does this mean I have to update (or worse, reinstantiate) them all?
As I said, the VMs do have an HYPERVISOR=kvm attribute, and so do the host nodes (except the one that has HYPERVISOR=lxc). I think this should be honored by the scheduler even without an explicit rule added to each template.
We have opened this issue to address this situation. If you want to provide feedback for this implementation, please post it there. In the meantime, the solution would be to update every template with the proper sched requirement, since the VMs are already placed you don’t need to re-deploy them, just update the running VM Template.