Reset Prism stuck/incomplete task

1. SSH to Cluster of CVM IP
2. Enter the following to list running/failed tasks

ecli task.list include_completed=false

3. Enter the following to cancel required task

ergon_update_task --task_uuid='ENTER_TASK_UUID_HERE' --task_status=succeeded

4. Enter “Y” – Remember you do so at you own risk

5. Enter the following to confirm task have been completed/failed

ecli task.list include_completed=false
Advertisements

Rename AHV Hosts

1. Log on to the AHV host with SSH
2. sudo nano /etc/sysconfig/network
3. Edit the following line

HOSTNAME=new_hostname_here.mycompany.com

Tip: use FQDN as per DNS entries to fix the NCC “FQDN lookup error”
4. Restart the Acropolis host

Change CVM name in AHV

You may need to modify the names of the CVMs displayed in Prism to match the block/serial/hostname or however you reference the node

Note:
The CVM name should always start with NTNX- and end with -CVM

1. SSH into the CVM and shut it down

cvm_shutdown -h now

2. Enter the following from the AHV host

virsh list --all
virsh domrename NTNX-Old_Name_Here-CVM NTNX-New_Name_Here-CVM

3. Start the CVM

virsh start NEW_NAME

4. Configure autostart in KVM so the CVM boots up with the host

virsh autostart NTNX-New_name_here-CVM

Change Nutanix CVM Memory – AHV

Log onto the AHV hosting the CVM and issue the following command

[root@NTNX-1 ~]# virsh list –all
Id Name State
—————————————————-
8 NTNX-1-CVM running

Wait until the CVM is shutdown

[root@NTNX-1 ~]# virsh shutdown NTNX-1-CVM
[root@NTNX-1 ~]# virsh setmem NTNX-1-CVM 20G –config
[root@NTNX-1 ~]# virsh setmaxmem NTNX-1-CVM 20G –config
[root@NTNX-1 ~]# virsh start NTNX-1-CVM
Domain NTNX-1-CVM started

Proceed to other hosts & CVM’s

Create Nutanix Phoenix boot ISO

Step 1. Grab Hyper ISO

To generate an ISO image from a particular version of AHV, do the following:

  1. Log into the latest Foundation VM
  2. Download the latest AHV bundle
  3. Kill the Foundation service running on the Foundation VM.
    $ sudo pkill -9 foundation
  4. Create an AHV ISO file
    $ cd /home/nutanix/foundation/bin
    $ ./generate_iso kvm ahv_tar_archive

    Replace ahv_tar_archive with the full path to the AHV tar archive, host_bundle_el6.nutanix.version#.tar.gz. The command generates an AHV ISO file named kvm.version#.iso in the current directory

Step2, Create the Pheonix Boot ISO

To generate a Phoenix ISO image, do the following:

  1. Log into the latest Foundation VM
  2. Download the latest AOS bundle
  3. Kill the Foundation service running on the Foundation VM.
    $ sudo pkill -9 foundation
  4. Navigate to the /home/nutanix/foundation/nos directory and unpack the compressed AOS tar archive.
    $ gunzip nutanix_installer_package-version#.tar.gz
  5. Generate the Phoenix ISO file.
    $ cd /home/nutanix/foundation/bin
    $ ./generate_iso phoenix --aos-package AOS_PACKAGE --kvm KVM --skip-space-check

    Replace AOS_PACKAGE with the full path to the AOS tar archive, nutanix_installer_package-version#.tar.

    Replace KVM with the full path to the AHV ISO image or bundle.

    Replace ESX with the full path to the ESXi ISO image.

    Replace HYPERV with the full path to the Hyper-V ISO image.

  6. Check in /home/nutanix/foundation/tmp/ for the Phoenix ISO

Mount SAMBA share on ubuntu

sudo apt-get install samba cifs-utils
sudo nano /home/<USERNAME>/.smbcredentials

username=guest
password=guest

sudo nano /etc/fstab

//<SERVER_IP>/<SHARE1>/ /mnt/nas/<SHARE1>/ cifs credentials=/home/<USERNAME)/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

//<SERVER_IP>/<SHARE2>/ /mnt/nas/<SHARE2>/ cifs credentials=/home/<USERNAME)/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

sudo mkdir /mnt/nas/<SAHRE1>
sudo mkdir /mnt/nas/<SHARE2>
sudo mount -a

docker-compose.yaml examples

##########
# System #
##########
version: "3.6"
services:
############
# Test/Dev #
############
##############
# ZoneMinder #
##############
  zoneminder:
    image: linuxserver/zoneminder
    container_name: zoneminder
    hostname: zoneminder
    restart: always
    depends_on:
      - mariadb
    shm_size: 4096M
    ports:
      - "8083:80"
    volumes:
      - ${USERDIR}/docker/zoneminder/config:/config
      - ${USERDIR}/docker/zoneminder/database:/data/database
      - /mnt/nas/media/CCTV/events:/data/zoneminder/events
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Europe/London
      - PHP_TZ=Europe/London
      - PUID=${PUID}
      - PGID=${PGID}
##################
#  HomeAssistant #
##################
  homeassistant:
    image: homeassistant/home-assistant
    container_name: homeassistant
    hostname: hass
    restart: always
    depends_on:
      - mosquitto
      - influxdb
      - grafana
      - appdaemon
#      - nodered
#      - tasmoadmin
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0
      - /dev/ttyUSB1:/dev/ttyUSB1
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - ${USERDIR}/docker/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8123:8123"
    privileged: true
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
############
# MQTT #
############
  mosquitto:
    image: eclipse-mosquitto
    container_name: mosquitto
    restart: always
    ports:
      - "1883:1883/tcp"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/ssl:/etc/ssl:ro
      - /etc/ca-certificates:/usr/share/ca-certificates:ro
      - ${USERDIR}/docker/mosquitto-config:/mosquitto/config
      - ${USERDIR}/docker/mosquitto-data:/mosquitto/data

##############
# TasmoAdmin #
##############
#  tasmoamdin:
#    image_name:
#    container_name: tasmoadmin
#    restart: always

###########
# NodeRED #
###########
#  nodered:
#    image_name:
#    container_name: nodered
#    restart: always

############
# InfluxDB #
############
  influxdb:
    image: influxdb:latest
    container_name: influxdb
    restart: always
    volumes:
      - ${USERDIR}/docker/influxdb:/var/lib/influxdb

###########
# Grafana #
###########
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    restart: always
    depends_on:
      - influxdb
    volumes:
      - ${USERDIR}/docker/grafana:/var/lib/grafana
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3001:3000/tcp

#############
# AppDaemon #
#############
  appdaemon:
    image: acockburn/appdaemon:latest
    container_name: appdaemon
    restart: always
    ports:
      - 5050:5050
    volumes:
      - ${USERDIR}/docker/appdaemon:/conf

###############
# LetsEncrypt #
###############
#  letsencrypt:
#    image_name:
#    container_name: letsencrypt
#    restart: always

#########
# NGINX #
#########
#  nginx:
#    image: nginx:latest
#    container_name: nginx
#    restart: always
#    volumes:
#      - ${USERDIR}/docker/nginx/nginx.conf:/etc/nginx/nginx.conf
#    ports:
#      - 80:80
#      - 443:443

##########
# Active #
##########
###########
# mariadb #
###########
  mariadb:
    image: linuxserver/mariadb:latest
    container_name: mariadb
    hostname: mariadb
    restart: always
    network_mode: host
    volumes:
        - ${USERDIR}/docker/mariadb:/config
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
#############
# Portainer #
#############
  portainer:
    image: portainer/portainer:latest
    container_name: portainer
    hostname: portainer
    restart: always
    command: -H unix:///var/run/docker.sock
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${USERDIR}/docker/portainer/data:/data
      - ${USERDIR}/docker/shared:/shared
    environment:
      - TZ=${TZ}
##############
# watchtower #
##############
  watchtower:
    image: v2tec/watchtower
    container_name: watchtower
    hostname: watchtower
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --schedule "0 0 23 * * SUN" --cleanup
############
# Organizr #
############
  organizr:
    image: lsiocommunity/organizr
    container_name: organizr
    hostname: organizr
    restart: always
    volumes:
      - ${USERDIR}/docker/organizr:/config
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "80:80"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
##############
# phpmyadmin #
##############
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    hostname: phpmyadmin:latest
    restart: always
    links:
      - mariadb:db
    ports:
      - 82:82
    environment:
      - PMA_HOST=mariadb
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
########################
# Tranmission with VPN #
########################
  transmission-vpn:
    image: haugene/transmission-openvpn
    container_name: transmission-vpn
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    ports:
    - "9091:9091"
    dns:
      - 8.8.8.8
      - 8.8.4.4
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${USERDIR}/docker/transmission-vpn:/data
      - ${USERDIR}/docker/shared:/shared
      - /mnt/nas/temp/torrents/watch:/data/watch
      - /mnt/nas/temp/torrents/completed:/data/completed
      - /mnt/nas/temp/torrents/incomplete:/data/incomplete
    environment:
      - OPENVPN_PROVIDER=NORDVPN
      - OPENVPN_USERNAME=matthew@porterfamily.co.za
      - OPENVPN_PASSWORD=Mgr1963X!
      - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
      - NORDVPN_COUNTRY=uk
      - OPENVPN_CONFIG=uk737.nordvpn.com.udp
      - CREATE_TUN_DEVICE=true
      - LOCAL_NETWORK=172.16.1.0/24,172.16.2.0/24
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=false
      - TRANSMISSION_RPC_HOST_WHITELIST=127.0.0.1,172.16.1.*,172.16.2.*
      - TRANSMISSION_RPC_PASSWORD=Mgr1963X!
      - TRANSMISSION_RPC_USERNAME=admin
      - TRANSMISSION_UMASK=002
      - TRANSMISSION_RATIO_LIMIT=1.00
      - TRANSMISSION_RATIO_LIMIT_ENABLED=true
      - TRANSMISSION_WATCH_DIR=/data/watch
      - TRANSMISSION_WATCH_DIR_ENABLED=true
      - TRANSMISSION_INCOMPLETE_DIR=/data/incomplete
      - TRANSMISSION_INCOMPLETE_DIR_ENABLED=true
      - TRANSMISSION_DOWNLOAD_DIR=/data/completed
      - TRANSMISSION_SPEED_LIMIT_UP=25
      - TRANSMISSION_SPEED_LIMIT_UP_ENABLED=true
      - TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES=true
      - TRANSMISSION_START_ADDED_TORRENTS=true
###############
# couchpotato #
###############
  couchpotato:
    image: linuxserver/couchpotato:latest
    container_name: couchpotato
    hostname: couchpotato
    restart: always
    volumes:
      - ${USERDIR}/docker/couchpotato:/config
      - ${USERDIR}/Downloads/completed:/downloads
      - ${USERDIR}/media/movies:/movies
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8082:5050"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - UMASK_SET=002
      - TZ=${TZ}
#############
# sickchill #
#############
  sickchill:
    image: linuxserver/sickchill:latest
    container_name: sickchill
    hostname: sickchill
    restart: always
    volumes:
      - ${USERDIR}/docker/sickchill:/config
      - ${USERDIR}/docker/shared:/shared
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
    ports:
      - "8081:8081"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
############
# tautulli #
############
  tautulli:
    image: linuxserver/tautulli
    container_name: tautulli
    hostname: tautulli
    restart: always
    volumes:
      - ${USERDIR}/docker/tautulli/config:/config
      - ${USERDIR}/docker/tautulli/logs:/logs:ro
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "8181:8181"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
##########
# PlexMS #
##########
  plexms:
    image: plexinc/pms-docker:plexpass
    container_name: plexms
    hostname: plexms
    network_mode: host
    restart: always
    volumes:
      - ${USERDIR}/docker/plexms:/config
      - ${USERDIR}/Downloads/plex_tmp/transcode:/transcode
      - /mnt/nas/media:/mnt/nas/media
      - /mnt/nas/temp:/mnt/nas/temp
      - /mnt/nas/hidden:/mnt/nas/hidden
      - ${USERDIR}/docker/shared:/shared
    ports:
      - "32400:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
      - "1900:1900/udp"
      - "32410:32410/udp"
      - "32412:32412/udp"
      - "32413:32413/udp"
      - "32414:32414/udp"
    environment:
      - TZ=${TZ}
      - HOSTNAME="PorterPlex"
      - PLEX_CLAIM="claim-xxxxxxxxxxxxxxxxxxxxxxxx"
      - PLEX_UID=${PUID}
      - PLEX_GID=${PGID}