5 Essential Tips for Maximizing Your Experience at Nutanix .NEXT for Bloggers
Use the Powershell Cmdlets (download from Prism/Central) and then fire up Powershell: ## Get the VM Unique Identifer for the VM you want to power on $myvmname=Read-Host "Enter the name of the VM to power on" $myvm= Get-NTNXVM | where {$_.vmname -eq $myvmname} $myvmID = ($myvm.vmid.split(":"))[2] ## Power on the VM Set-NTNXVMPowerOn -vmid $myvmID Enjoy :-)
Hi James, Just do the following: [list=1] [*]Open VSCode (as Admin) [*]Then Run [b]. "C:\Program Files (x86)\Nutanix Inc\NutanixCmdlets\powershell\import_modules\ImportModules.PS1"[/b] [*]Then [b]Add-PSSnapin nutanixcmdletspssnapin[/b] [/list] Then all the cmdlets are available This assumes you have already downloaded and installed the Nutanix Cmdlets from Prism. Enjoy!
Hi, So you want a script that enumerates the Last Logon on all VM's on your Nutanix Cluster; or the last logon time of each VM by enumerating the only user in the Remote Desktop Group and grabbing their last logon details. Is that correct. Kind Regards
[user=95418]CitrixGuy1987[/user] Good morning. Could I please ask you to confirm whether you are happy with my solution and please mark as Best Answer if so. Many thanks Andy [user=95361]andymlloyd[/user]
[user=94677]PrivIaaS[/user] Hi, I spent a considerable time trying to work this out!! (..as you say not much info out there!!) Still not quite sure this is the best way to achieve this, but it does work! I basically clone the existing VLAN 0 config and then populate the necessary to complete the task. ################################################################### ## Managed Nutanix Network Creation by [user=95361]andymlloyd[/user] ## Use the Out of Box VLAN 0 CVM Network as a reference point for our new network $managednetwork=Get-NTNXNetwork | where {$_.vlanid -eq 0} ## DHCP Options ## $thenetworkdhcpoptionsobject=$managednetwork.ipConfig.dhcpOptions ## Create a DTO for DHCP Options using Reference $thenetworkdhcpoptionsobject.domainName = "andytest.local" $thenetworkdhcpoptionsobject.domainNameServers = "10.100.124.200" $thenetworkdhcpoptionsobject.domainSearch = "andytest.local" ## IP Pool Options ## $mypool=@() $itemforpool=New-Object psobject $itemforpool | Add-Member
Looking forward to getting this under my belt. Great info.
[user=92012]nfrederickx[/user] Hi, You can get a very simple output of VM Name, VM Snapshot Name and Date/Time taken using the Powershell Cmdlets. Script below should sort you out: ## Simple Nutanix All Last Snapshot info Script ## ## Andy Lloyd ## $nutsnaps=Get-NTNXSnapshot $allnutvms=Get-NTNXVM | select uuid,vmName foreach ($snap in $nutsnaps) { $vmname= ($allnutvms | where {$_.Uuid -eq $snap.vmUuid}).vmName $snaptime=$snap.createdtime/1000 $snapdt=(Get-Date '1/1/1970').AddMilliseconds($snaptime) $actualsnapdt=$snapdt.ToLocalTime() ##Write-host $actualsnapdt #Write-host $snap.snapshotname Write-host "VM: " -nonewline; write-host $vmname -foregroundcolor yellow -nonewline; Write-Host " Last Snapshot Name: " -nonewline; ` write-host $snap.snapshotname -foregroundcolor Yellow -nonewline; Write-Host " Taken: " -nonewline; Write-host $actualsnapdt -foregroundcolor Yellow } If this helps you out please mark as Best Answer and Like :-) Many thanks Andy
Would this help at all: [url=https://next.nutanix.com/karbon-kubernetes-service-30/kubernetes-dashboard-on-nutanix-karbon-31210]https://next.nutanix.com/karbon-kubernetes-service-30/kubernetes-dashboard-on-nutanix-karbon-31210[/url]
Hi [user=94552]Hong[/user] glad you managed to get this sorted. Always good to see someone come back with the resolution.
Hi @TimothyGaray .Is this perhaps related to my observations about the connection to the cluster using the latest cmdlets I raised here?https://next.nutanix.com/scripts-32/latest-powershell-cmdlets-for-5-11-33194
Hi [user=26706]jonnysco[/user] . It kind of depends on what server OS you are using. If it's 2012 onwards they introduced dynamic quorum weighting based on the number of nodes left in the cluster. Prior to that it was almost a necessity to have a quorum outside the cluster. That said if your cluster has access to an always on file share the you could use that as the witness. You could also use Azure for this. There is some good information on Microsoft website here : https://docs.microsoft.com/en-us/windows-server/failover-clustering/manage-cluster-quorum
[quote=JoseNutanix]Hi, What's the reason of looking to upgrade the image? Regards, Jose[/quote] Hi Jose, I believe this is to ensure that we keep all current systems running at the latest patch levels to comply with audit, security etc. I believe the latest CentOS for x86-x64 Architecture is 1908, so would expect Nutanix to have this or at least the previous version available?
[user=77248]JoseNutanix[/user] Hi Jose, Many thanks for the information; I will look to get the report of hardening for the audit/security teams to peruse. Hoping that this will appease them :-) I totally get where you are coming from and appreciate that this is a fully hardened image. Do you have any information as to the road-map of updates to this image that I could share with the internal teams? Hopefully catch-up with you sometime and have sent you a connection request on LinkedIn. Many thanks for your support and advise.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.