[Nutanix] WinSCP connect CVM use SFTP protocol

自 AOS 5.5 開始預設 SFTP Port 2222 是關閉。

step01. @CVM$ allssh modify_firewall -f -o open -i eth0 -p 2222 -a // 開啟防火牆

step02. use WinSCP > SFTP > IP ,Port 2222 // 帳/密 admin / prism-password

(補充)
* Linux / Mac *
$ sftp -P 2222 admin@cluster-vip:/container-name 連線
$ put test.vmdk

[Nutanix] AHV decrease CVM memory

有時在用Nutanix CE版本資源總是很缺乏,一個節點用大家常用 16GB (16384 MB) 時,CVM就佔用 12GB 將近就75%記憶體資源都它在用..Orz

因此,當你這環境還想在每一台都建一台VM,那就只有新增AHV memory 或降低 CVM memory.我是沒什麼資源只能選後者。

Resolution:

step01. @cvm$ cluster stop

step02. @cvm$ sudo shutdown -P now
Or
@ahv# virsh shutdown cvm-name

step03. @ahv# virsh list –all | grep -i cvm

step04. @ahv# virsh dumpxml {cvm-name} | egrep -i “cpu|memory" // 10G ,10485760 KiB

step05. @ahv# virsh setmaxmem {cvm-name} –config –size 10GiB
@avh# virsh setmem {cvm-name} –config –size 10GiB

step06. @ahv# virsh dumpxml {cvm-name} | egrep -i “cpu|memory" // 再確認一次是否更改 10G OK.

step07. @ahv# virsh start {cvm-name}

step08. @cvm$ cluster status

step09. @cvm$ cluster start

Reference:
1. AHV 5.0 – Changing CVM Memory Configuration (AHV)

[Nutanix] How to unregister cluster from Prism Central

step01. Enable the “remove-from-multicluster" option
ntnx@cvm$ ncli -h true

step02. Unregister the cluster from Prism Central
ncli> multicluster remove-from-multicluster external-ip-address-or-svm-ips=192.168.6.100 username=admin password=P@ssw0rd123 force=true

step03. check
ncli> multicluster get-cluster-state
ncli> cluster info

step04. Log on to the Prism Central VM through an SSH session (as the “nutanix" user) and do the following
[pcvm]$ python /home/nutanix/bin/unregistration_cleanup.py <要unregister-cluster-的uuid>

**if has calm , need run as below , no please skip this command ,next
[pcvm]$ python /home/nutanix/bin/calm_unregistered_pe_details.py

[pcvm]$ ncli cluster info

step04. Go back to the Controller VM
ntnx@cvm$ sudo chmod 750 /home/nutanix/bin/unregistration_cleanup.py
ntnx@cvm$ python /home/nutanix/bin/unregistration_cleanup.py <輸入上面步驟取得Prism Central cluster UUID>

Enjoy ^O^