one icon indicating copy to clipboard operation
one copied to clipboard

Generate hypervisor AUTOMATIC_REQUIREMENTS

Open dann1 opened this issue 2 years ago • 0 comments

Description Generate scheduling requirements that include HYPERVISOR=hypervisor based on whether the template has the HYPERVISOR=hypervisor attribute. For example, a VM Template like this

TEMPLATE CONTENTS
CONTEXT=[
  NETWORK="YES",
  SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU="1"
DISK=[
  IMAGE_ID="201" ]
GRAPHICS=[
  LISTEN="0.0.0.0",
  TYPE="VNC" ]
HOT_RESIZE=[
  CPU_HOT_ADD_ENABLED="NO",
  MEMORY_HOT_ADD_ENABLED="NO" ]
HYPERVISOR="KVM"
INPUTS_ORDER=""
LOGO="images/logos/ubuntu.png"
LXD_SECURITY_PRIVILEGED="true"
MEMORY="2048"
MEMORY_UNIT_COST="MB"
NIC=[
  NETWORK="service",
  NETWORK_UNAME="oneadmin",
  SECURITY_GROUPS="0" ]
OS=[
  ARCH="x86_64",
  FIRMWARE="",
  FIRMWARE_SECURE="YES" ]
VCPU="2"

would generate a requirement like this

AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED) & (HYPERVISOR=KVM)"

Use case Avoid placement issues for both KVM and container VMs when running zones with combined hypervisor nodes without manually specifying requirement for every already existing running VM or in new VM Templates. See https://forum.opennebula.io/t/scheduler-sends-kvm-guest-to-a-lxc-host/10796/3

Additional Context VM Templates have the attribute HYPERVISOR. Functionality wise, this attribute, at the moment, is only used to change how the VM Template is displayed on Sunstone, showing/hiding hypervisor specific attributes.

Progress Status

  • [ ] Code committed
  • [ ] Testing - QA
  • [ ] Documentation (Release notes - resolved issues, compatibility, known issues)

dann1 avatar Sep 02 '22 15:09 dann1