-
Notifications
You must be signed in to change notification settings - Fork 5
/
kvm-amd
12 lines (10 loc) · 918 Bytes
/
kvm-amd
1
2
3
4
5
6
7
8
9
10
11
12
#Note: This assumes that your MAAS profile is called "admin". Adjust the variable to suit your environment
#Note: You must be logged into the MAAS cli for this command to work
#Note: Login into the MAAS CLI with "maas login <profile> <url> <apikey>"
#e.g. maas login ${MAAS_PROFILE:-admin} http://${MAAS_IP:-localhost}:5240/MAAS $(sudo maas apikey --username=${MAAS_PROFILE:-admin})
# This will tag legacy KVM vms running on AMD-based Hosts
maas ${MAAS_PROFILE:-admin} tags create \
name=kvm-amd \
definition='//node[@class="system"]/vendor = "QEMU" and //node[@class="processor"]/vendor[starts-with(.,"Advanced Micro Devices")] and not //node[@id="firmware"]/capabilities/capability/@id = "uefi"' \
kernel_opts='nomodeset console=tty0 console=ttyS0,115200n8 amd_iommu=on kvm-amd.nested=1 kvm-amd.enable_apicv=n kvm.ignore_msrs=1' \
comment='Tag for automatically identifying AMD-based KVM vms (Legacy BIOS)'