Last active
March 6, 2018 05:48
-
-
Save ThinGuy/143f373d09ad1caeaf41acb55c97c7b9 to your computer and use it in GitHub Desktop.
Hypervisor / Pod Host XPATH auto-tagging for MaaS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maas ${MAAS_PROFILE} tags create name=pod-host \ | |
definition='//node[@id="memory" and @class="memory"]/size >= "17179860388" and | |
//node[@id="cpu" and @class="processor"]/configuration/setting/id="cores" >= 2 and | |
.//node[@id="cpu"]/capabilities/capability[@id="vmx"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="aes"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="ept"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="vpid"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="tpr_shadow"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="flexpriority"] and | |
.//node[@id="cpu"]/capabilities/capability[@id="vnmi"]' \ | |
comment='MaaS auto xpath auto-tag for that checks for: | |
# - Certain amount (>=16GB) of RAM ( value in Bytes) | |
# - Certain number (>=2) of cores | |
# - CPU support for key Intel Virtualization Features: | |
# - - vmx: Intel hardware virtualization | |
# - - aes: Hardware encryption | |
# - - ept: Intel extended page table support enabled to make emulation of guest page tables faster. | |
# - - vpid: Intel virtual processor ID. Make expensive TLB flushes unnecessary when context switching between guests. | |
# - - tpr_shadow and flexpriority: Intel features that reduces calls into the hypervisor when accessing the Task Priority Register, which helps SMP guests. | |
# - - vnmi: Intel Virtual NMI helps with selected interrupt events in guests. | |
# If all are met then it gets tagged with pod-host' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment