Configuring virtual machine subscriptions Red Hat Satellite 6.15 Using virt-who to manage host-based subscriptions Red Hat Satellite Documentation Team satellite-doc-list@redhat.com

Commands:
[virt-who-config-1] type=libvirt hypervisor_id=hostname owner=Default_Organization env=Library server=hypervisor1.example.com username=virt_who_user encrypted_password=USDcr_password rhsm_hostname=satellite.example.com rhsm_username=virt_who_reporter_1 rhsm_encrypted_password=USDuser_password rhsm_prefix=/rhsm
cat /etc/virt-who.d/virt-who-config-1.conf This configuration file is managed via the virt-who configure plugin manual edits will be deleted. [virt-who-config-1] type=libvirt hypervisor_id=hostname owner=ORG env=Library server=qemu:///system <==== username=virt-who-user encrypted_password=xxxxxxxxxxx rhsm_hostname=satellite.example.com rhsm_username=virt_who_reporter_1 rhsm_encrypted_password=yyyyyyyyyyy rhsm_prefix=/rhsm
type=libvirt hypervisor_id=hostname owner=gss env=Library server=qemu+ssh://root@libvirt.example.com/system username=root encrypted_password=33di3ksskd rhsm_hostname=satellite.example.com rhsm_username=virt_who_reporter_2 rhsm_encrypted_password=23233dj3j3k rhsm_prefix=/rhsm
type=esx hypervisor_id=hostname owner=gss env=Library server=vcenter.example.com username=username_vcenter@example.com encrypted_password=33di3ksskd rhsm_hostname=satellite.example.com rhsm_username=virt_who_reporter_2 rhsm_encrypted_password=23233dj3j3k rhsm_prefix=/rhsm
hammer activation-key create --name " VM_Activation_Key " --unlimited-hosts --description " For VMs to inherit a VDC Subscription " --lifecycle-environment " Environment_Name " --content-view " CV_Name " --organization " My_Organization "
hammer activation-key update --name " VM_Activation_Key " --organization " My_Organization " --auto-attach true
hammer subscription list --organization-id organization_id
hammer host subscription attach --host host_name --subscription-id subscription_id
hammer virt-who-config create --name rhel.example.com --organization "Example Company" --interval 720 \ 1 --filtering-mode none \ 2 --hypervisor-id hostname \ 3 --hypervisor-type libvirt \ 4 --hypervisor-server rhel.example.com \ 5 --hypervisor-username virt-who \ 6 --proxy ' http://proxy.example.com :3128' \ 7 --satellite-url satellite.example.com
scp deploy_virt_who_config_1 .sh root@ hypervisor.example.com :
chmod +x deploy_virt_who_config_1 .sh sh deploy_virt_who_config_1 .sh
rm deploy_virt_who_config_1
rpm -ivh http:// satellite.example.com /pub/katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org= organization_label --auto-attach
firewall-cmd --add-port="443/tcp" firewall-cmd --add-port="443/tcp" --permanent
scp deploy_virt_who_config_1 .sh root@ rhel.example.com :
chmod +x deploy_virt_who_config_1 .sh sh deploy_virt_who_config_1 .sh
rm deploy_virt_who_config_1
yum install http:// satellite.example.com /pub/katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org= organization_label --activationkey= activation_key_name
hammer virt-who-config update --name current_name --new-name new_name --interval 1440
rm /etc/virt-who.d/ conf_name .conf
hammer virt-who-config list
{ "guestId": "422f24ed-71f1-8ddf-de53-86da7900df12", "state": 5, "attributes": { "active": 0, "virtWhoType": "esx", "hypervisorType": "vmware" } },
virt-who --debug --one-shot --config /tmp/ conf_name .conf
systemctl stop virt-who virt-who -op >/tmp/virt-who.json systemctl start virt-who cat /tmp/virt-who.json | json_reformat | grep name | sort | uniq -c | sort -nr | head -n10 3 "name": "localhost" 1 "name": "rhel1.example.com" 1 "name": "rhel2.example.com" 1 "name": "rhel3.example.com" 1 "name": "rhel4.example.com" 1 "name": "rhvh1.example.com" 1 "name": "rhvh2.example.com" 1 "name": "rhvh3.example.com" 1 "name": "rhvh4.example.com" 1 "name": "rhvh5.example.com"
systemctl stop virt-who virt-who -op >/tmp/virt-who.json systemctl start virt-who cat /tmp/virt-who.json | json_reformat | grep "guestId" | sort | uniq -c | sort -nr | head -n10
systemctl stop virt-who virt-who -op >/tmp/virt-who.json systemctl start virt-who cat /tmp/virt-who.json | json_reformat | grep name | sort | uniq -c | wc -l
systemctl stop virt-who virt-who -op >/tmp/virt-who.json systemctl start virt-who cat /tmp/virt-who.json | json_reformat | grep "guestId" | sort | uniq -c | wc -l
no_proxy = satellite.example.com