I have a yes or no question.
I am trying to find out list of instances from our current AWS infrastructure based on their virtualization type.
ex: query to find list of instances which are pvm.
I tried using the query command and filter command. But no gains yet. Can we even query to get the virtualization type?
Thanks in advance.
ec2 describe instance list many arguments about the instance, including the virtualisation type
virtualization-type - The virtualization type of the instance (paravirtual | hvm ).
so you can use the following commands
aws ec2 describe-instances \
--query 'Reservations[*].Instances[?VirtualizationType==`hvm`]'
this will return all instances (in the specific region) where virtualisation type is hvm. You can adjust for pvm:
aws ec2 describe-instances \
--query 'Reservations[*].Instances[?VirtualizationType==`paravirtual`]'