Nutanix: stop and remove tasks

Sometimes it happens that Tasks in a Nutanix environment take like forever.
It is not recommended but there are occasions that a Task needs to STOP!
And it happens that this is not possible via the GUI (Prism Element or Prism Central).

So to get the current running tasks:
(from PE or PC)

ecli task.list include_completed=false

And to stop the Task:
(there are 2 dashes before task…)

ergon_update_task --task_uuid='TASK_UUID' --task_status=aborted

And verify with the above command again (ecli task.list include_completed=false)

BTW –task-status can have following values:

  • running
  • succeeded
  • aborted
  • suspended
  • failed

RockyLinux File extend drive FYI

Just a quick reminder, for myself 😉

Needed to resize a partition on RockyLinux 9.5
And wanted to document that.

So this was a /home partition, on a LVM system.

Steps I took:

  • Backup /home –> tar -czvf /root/home.tgz -C /home .
  • Test Backup –> tar -tvf /root/home.tgz
  • unmount /home –> umount /dev/mapper/rl_<NAME_OF_MACHINE>-home
  • Remove logical volume –> lvremove /dev/mapper/rl_<NAME_OF_MACHINE>-home
  • Recreate new /home (250GB) –> lvcreate -L 250GB -n home rl_<NAME_OF_MACHINE>
  • Format –> mkfs.xfs /dev/rl_<NAME_OF_MACHINE>/home
  • Mount –> mount /dev/mapper/rl_<NAME_OF_MACHINE>-home
  • Extend /root –> lvextend -r -l +100%FREE /dev/mapper/rl_<NAME_OF_MACHINE>-root
  • Restore backup –> tar -xzvf /root/home.tgz -C /home

Cluster has dual stack enabled. Cannot register to a PC (Nutanix)

So, you have a brand new Nutanix cluster deployed.
Now you want to register your Prism Element cluster to a Prism Central instance!

So, let’s start.

‘Register or create new’

‘Connect’

‘Next’

Fill in the appropriate fields, and hit ‘Connect’

WAIT, What is that?

Cluster has dual stack enabled. Cannot register to a PC.

Uh, so this has to do with some networking issue, I guess?

Nutanix, help.
OK, search the KB’s and we find: KB-17342

I’m on AOS 7, so that is AOS 6.5 and Newer.
Easy they give me two commands and I’m done.

manage_ipv6 unconfigure; manage_ipv6 disable

Let’s try this.
Hmm not successful.

What’s in the log?

Well, the first part is about the ‘manage_ipv6 unconfigure’. This is complaining about a gateway that cannot be removed.
The second part is about the ‘manage_ipv6 disable’. This is complaining about an ipv6 address still being present.

In KB-17342 there are all kind of commands, but none of these where a success in my environment.

This log line is interesting:
Failed to unconfigure IPv6 address on 192.168.100.171. Error: Failed to remove the default IPv6 gateway fe80::9ada:c4ff:fe86:31d4

Let’s see if this is true 😉

/sbin/route -A inet6

No nothing to see here.

sudo ip -6 route show

THERE YOU ARE!

Hmm, what if I add and delete the gateway in 1 step?

sudo /sbin/route add -A inet6 default gw fe80::9ada:c4ff:fe86:31d4 eth0 && manage_ipv6 unconfigure && manage_ipv6 disable

And success

And in Prism also visible:

Nutanix CE 2.1 marks disks wrong (SSD/NMVe as HDD)

So you installed Nutanix CommunityEdition (CE) version 2.1.
Everything went well, created the cluster and then you login to Prism and see (some) of your disks marked wrong, i.e. a SSD or NVMe is shown as HDD.

This sometimes happens as the current CE is almost on par with the full blown flagship product. If you then install it on non-enterprise grade hardware (i.e. homelab!) it defaults to non-expected values.

In Prism

And on the CLI

But there is an easy way to correct this 🙂

  • SSH into the (or an) CVM
  • get the DISKID with ncli disk ls
  • change disk type with ncli disk update id=DISKID tier-name=TIERNAME

For TIERNAME you can use:

  • DAS-SATA (HDD)
  • SSD-SATA (SSD)
  • SSD-PCIe (NVMe)

After this the disks will be shown correctly.

In Prism

And on the CLI

Nutanix CommunityEdition (CE) 2.0 – Terminal to small…uh

"Terminal screen is not large enough to run the installation script. Please resize the terminal and rerun the script."

Ok, so I was installing the Nutanix Community Edition 2.0 (download here: https://next.nutanix.com/discussion-forum-14/download-community-edition-38417 ) on a HP Z620. These boxes do not have a videocard onboard, so you have to be present at the machine instead of using AMT for this!

Booting up from a freshly made USB stick, running some time through the installer and then, yes this odd little fellow came along:
"Terminal screen is not large enough to run the installation script. Please resize the terminal and rerun the script."

Well, what does my best friend Google has to say about that. Well actually very little.
Some folks say well put the box in LEGACY mode in the Bios. But this version needs UEFI so that is a no-go.

But then a solution came to mind. What if we go into Phoenix, enable SSH and do the installation from there?

So here we go:

  • Get the IP address of the box. This is probably a DHCP address. Otherwise ifconfig will get it for you 😉
  • Start SSH: systemctl start sshd.service
  • SSH into the box from a workstation. User root, PW nutanix/4u
  • restart the installation with ./ce_installer && screen -r

And there she goes, off to another new CE installation.

Have fun

Password hash in CentOS 7/8

If you want to create a password hash that you want to put into your cloud-init configuration, it is possible to use a plain-text password. But you can use a hash so nobody can see the password.

Some Linux distributions have the mkpasswd utility, but on CentOS this is not available.

You can use a python one-liner to generate a SHA512 password hash:

python -c 'import crypt,getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))'

Execute the one-liner and type in your password.

More info here: https://cloudinit.readthedocs.io/en/latest/reference/examples.html

Linux – Password has been used already. Choose another

Just a quick reminder, note-to-self

Linux – Password has been used already. Choose another

root@linux:~ # passwd
Changing password for root.
New Password:
Reenter New Password:
Password has been used already. Choose another.
Password changed

Linux is keeping the old password stored on /etc/security/opasswd.

Delete the line containing the user that you’re trying to change the password.
It is encrypted so delete them all or just the last one 😉

Microsoft Security ATP Defender rename

This is just a small post about the last rename of the Microsoft Security suites.
I found this infogram on the Net and it is a good overview so I like to keep this for reference.
I don’t know who the author is so I cannot give credits at this time.

Microsoft Defender suite

All the original info is on the tech community website:

Microsoft Techcommunity