Red Hat RHV collect logs in xml... #Author: Kai #Opensource #variable RHVM=rhvm.example.com USERNAME=admin DOMAIN=internal PASSWORD=redhat LOGLOCATION=log TARGET="datacenters clusters hosts pools templates vms networks storagedomains macpools disks" mkdir $LOGLOCATION cd $LOGLOCATION for j in $TARGET; do curl --cacert '/etc/pki/ovirt-engine/ca.pem' --request GET --header 'Version: 4' --header 'Accept: application/xml' --user $USERNAME'@'$DOMAIN':'$PASSWORD https://$RHVM/ovirt-engine/api/$j > $j.xml for i in $(grep -Eo '/ovirt[^\"]+' $j.xml) ; do echo $i echo ' ' >> $(basename $i).xml curl --cacert '/etc/pki/ovirt-engine/ca.pem' --request GET --header 'Version: 4' --header 'Accept: application/xml' --user $USERNAME'@'$DOMAIN':'$PASSWORD https://$RHVM/$i >> $(basename $i).xml done done cd .. tar -czvf $LOGLOCATION.tgz $LOGLOCATION/* rm -rf $LOGLO...
Posts
TimeSync using ansible and rhel-system-roles.timesync
- Get link
- X
- Other Apps
Install rhel-system-roles.timesync yum install rhel-system-roles -y After install /usr/share/ansible/roles/rhel-system-roles.timesync [root@servera ~]# cat inventory [all] server[a:e] [root@servera ~]# ansible -i inventory all -m ping servere | SUCCESS => { "changed": false, "ping": "pong" } serverb | SUCCESS => { "changed": false, "ping": "pong" } servera | SUCCESS => { "changed": false, "ping": "pong" } serverd | SUCCESS => { "changed": false, "ping": "pong" } serverc | SUCCESS => { "changed": false, "ping": "pong" } [root@servera ~]# cat timesync.yml --- - hosts: all vars: timesync_ntp_servers: - hostname: {IP of NTP 1} ...
Remove HPE iLO license
- Get link
- X
- Other Apps
It spend me sometime to reserch how to remove iLO advance license and use HPE OneView Advanced. Here is the solution. 1. download HP Lights-Out configuration Utility https://support.hpe.com/hpsc/swd/public/detail?sp4ts.oid=null&swItemId=MTX_8abe539b67bf46978e8f84acb8&swEnvOid=4184#tab1 2. run the command with xml "C:\Program Files (x86)\Hewlett Packard Enterprise\HP Lights-Out Configuration Utility\HPQLOCFG.exe" -s 10.10.100.43 -f C:\Users\chengwi\Desktop\ilo.xml HP Lights-Out Configuration Utility - HPQLOCFG v5.2.0.0 dated 12/18/2017 (c) 2013, 2017 Hewlett Packard Enterprise Development LP Detecting iLO.... Negotiated cipher:168-bit TripleDes with 160-bit Sha1 and 1024-bit RsaKeyX .... Script succeeded for IP:10.10.100.43:443 ilo.xml
- Get link
- X
- Other Apps
Install AzureStack Development Kit in Hyper-V First follow the log and it is almost cover everything. https://www.hyper-v-server.de/azure-stack/installing-the-azure-stack-development-kit-in-a-hyper-v-nested-vm/ It require D: drive while prepare the lab. At some point it will failed due to cannot access D drive. Wait until it Finish Verify about 13 VMs in Hyper-V After install complete follow the post install steps. 1. following step to registration https://docs.microsoft.com/en-us/azure/azure-stack/asdk/asdk-register Test-Azurestack Azurestack\cloudadmin Download Image Create plan Create offer Change the plan to public Get subscription to your account Finally, Create or upload VMs.
Devstack - workaround for stuck on "booting from Hard Disk..."
- Get link
- X
- Other Apps
Devstack is very good for install openstack in one machine, with a few steps. https://docs.openstack.org/devstack/latest/ Issue is VM cannot start... it stuck on "booting from Hard Disk..." From google, i am not alone but no solution. some suggest to change kvm to qemu in /etc/nova/nova.conf as workaround.. Here is alternative workaround without change the configure. bluesky@devstack1:~$ openstack image list +--------------------------------------+--------------------------+--------+ | ID | Name | Status | +--------------------------------------+--------------------------+--------+ | 705ae968-fc61-4992-a3e9-51e86a535c8e | cirros-0.3.5-x86_64-disk | active | | 56e1ed7b-97d5-4c60-8793-76fb91e3b75d | small | activ...
GoDaddyPy autoupdate example
- Get link
- X
- Other Apps
Reference: To get godaddypy https://pypi.python.org/pypi/GoDaddyPy To get API key and secert https://developer.godaddy.com/getstarted root@radius02:~/godaddy# crontab -l 5 * * * * /usr/local/bin/GoDaddy.sh root@radius02:~/godaddy# cat /usr/local/bin/GoDaddy.sh #!/bin/sh myip=`dig a 3rd free domain name @8.8.8.8 +short` lastip=`dig a godaddy domain name @8.8.8.8 +short` if [ "$myip" != "$lastip" ]; then python2 /usr/local/bin/godaddy_ddns.py fi root@radius02:~/godaddy# cat /usr/local/bin/godaddy_ddns.py #!/usr/bin/env python import pif import datetime from godaddypy import Client, Account import requests import urllib3 # Suppress InsecureRequestWarning: Unverified HTTPS urllib3.disable_warnings() domain=' godaddy domain name ' public_ip = pif.get_public_ip() my_acct = Account(api_key=' Key ', api_secret=' secret ') client = Client(my_acct) client.get_domains() #client.get_a_records(domain) client.get_re...