- leaf cpu-pinning-policy {
- description
- "CPU pinning policy describes association
- between virtual CPUs in guest and the
- physical CPUs in the host.
- DEDICATED : Virtual CPUs are pinned to
- physical CPUs
- SHARED : Multiple VMs may share the
- same physical CPUs.
- ANY : Any policy is acceptable for the VM";
- type enumeration {
- enum DEDICATED;
- enum SHARED;
- enum ANY;
+ choice cpu-policy {
+ case cpu-pinning {
+ leaf cpu-pinning-policy {
+ description
+ "CPU pinning policy describes association
+ between virtual CPUs in guest and the
+ physical CPUs in the host.
+ DEDICATED : Virtual CPUs are pinned to
+ physical CPUs
+ SHARED : Multiple VMs may share the
+ same physical CPUs.
+ ANY : Any policy is acceptable for the VM";
+ type enumeration {
+ enum DEDICATED;
+ enum SHARED;
+ enum ANY;
+ }
+ default "ANY";
+ }
+ leaf cpu-thread-pinning-policy {
+ description
+ "CPU thread pinning policy describes how to
+ place the guest CPUs when the host supports
+ hyper threads:
+ AVOID : Avoids placing a guest on a host
+ with threads.
+ SEPARATE: Places vCPUs on separate cores,
+ and avoids placing two vCPUs on
+ two threads of same core.
+ ISOLATE : Places each vCPU on a different core,
+ and places no vCPUs from a different
+ guest on the same core.
+ PREFER : Attempts to place vCPUs on threads
+ of the same core.";
+ type enumeration {
+ enum AVOID;
+ enum SEPARATE;
+ enum ISOLATE;
+ enum PREFER;
+ }
+ }