Skip to main content

Posts

Starting with PowerCLI and Powershell Core

Last week I was busy working with scripts and especially because we had this weird issues of ESXi servers turn-off right when no one is expecting them to do :) (who expects a server to fail anyway!). Whatever the reason we needed to find affected VMs very fast and inform other teams to start checking their services.
and for that, you guessed it right! A powerCLI script is the easiest way. But the first thing you notice when you start a job in the U.S is how popular Mac devices are over Windows clients and thus my colleagues are not familiar with PowerShell at all.
They are all about APIs and Python, which is very powerful I suppose. Nowadays all server software's are equipped with an API interface and mostly RESTful APIs so they can interact with each other and automation tools can make all those magical things but in my opinion, as powerful as RESTful APIs are they are great for interaction between services and servers and applications. They are not created for human interaction…
Recent posts

ESXi host reports VMFS heap warnings when hosting virtual machines more than 4 terabytes (TB) of virtual disks (.vmdk files) open.

The first week at my new job, I faced the following problem in my VI environment:The VMs used to go in Gray and invalid state, while they were all the time registering on different hosts every 2 seconds, also I used to face the following error on my Events :
·    vSphere HA unsuccessfully failed over this virtual machine. vSphere HA will retry if the maximum number of attempts has not been exceeded. Reason: Cannot allocate memory.
After searching a lot and digging into the VMKernel logs, I found out the problem in Kb Article 1004424 which I gonna share it with you:
ESXi host reports VMFS heap warnings when hosting virtual machines more than 4 terabytes (TB) of virtual disks (.vmdk files) open. vSphere HA unsuccessfully failed over this virtual machine. vSphere HA will retry if the maximum number of attempts has not been exceeded. Reason: Cannot allocate memory.Failed to initialize migration at sourceThe VM failed to resume on the destination during early power on.Reason: 0 (Cannot alloca…

How to run VMware Workstation in server mode :)

در ایران شرکتهای کوچک زیادی وجود دارند که برای رفع نیاز سخت افزاری خود به مجازی سازی رو می آورند. در برخی اوقات استفاده از VMware ESXi بسیار مناسب ولی بدلیل نیاز به سخت افزار خاص و پرسنل مجرب به صرفه نیست، پس شرکتهای کوچک به نصب و استفاده از VMware Workstation پناه می برند که ابتدا بجا ولی بدلیل تنظیم غیر مناسب در نهایت ناکارآمد و گاهی مخرب است. در ویدیو زیر توضیح می دهم که چطور VMware Workstation را برای استفاده بجای یک سرور کارآمد تنظیم کنیم.


ESXi host disconnected from vCenter

ESXi host disconnected from vCenter:ESXi hosts were showing Not Responding and Disconnected in vCenter ServerWe couldn’t connect ESXi vCenter ServerVMs on the ESXi/ESX host were showing as grayed out in vCenter Server.When attempting to add an ESXi/ESX host to vCenter Server, we faced error:Unable to access the specified host, either it doesn't exist, the server software is not responding, or there is a network problemWhen a host gets disconnected from vCenter while VMs are up and running, one of the following is the most probable point to investigate:1: Making sure that network connectivity between ESXi host and vCenter is ok, and this can be done by pinging the ESXi management IP address from vCenter. And also vice versa, pinging vCenter from ESXi host, but in this case ESXi host should be accessible, either through DCUI or SSH.2: Making sure vCenter can resolve ESXi host DNS name.3: making sure the necessary ports for communication between vCenter and E…