Tuesday 30 March 2021

Lambda Function in Python

 

Lambda Function

Lambda function is a function, which is defined without a name (anonymous). Hence, named as anonymous function. Lambda function is defined using the keyword lambda that’s why it also called as lambda function.

Lambda functions are syntactically restricted to a single expression. However, can have multiple arguments separated with commas. Semantically, lambda functions are just syntactic sugar for a normal function definition. Lambda functions can be used wherever function objects are required.

 

Using lambda function

syntax- lambda args: expression

pow = lambda x: x**2

print(pow(2))


Here, x is the argument to the lambda function and x**2 is the expression which gets assigned to the variable ”pow” after evaluation. 

Notice, the lambda function has no name and doesn’t contain any parentheses unlike normal function.

The above lambda function is similar to:

def pow(x):

    return x**2

 

 

 

Saturday 27 March 2021

Without vCenter, can we maintain or manage multiple ESXi servers, vMotion, and SvMotion?

Or, Can we use vMotion capabilities of VMware on standalone ESXi servers?

Or, What is vMotion and How it works?

Question originally posted by a TechiesSphere reader:

Without vCenter can we maintain two ESXI servers and vmotion svmotion?

 

Understanding vMotion

vMotion is a procedure or task initiated by admin manually or system automatically to move a VM from one to another ESXi Host in case of load balancing or redundancy balancing.

If you have two ESXi servers separately and no cluster, vMotion is having no role to play.

However, if you want to manage the ESXi servers separately like standalone servers, you can do that, but to be able to use vMotion, you must have to add these two ESXi servers in to a cluster and enable HA.

You may refer the below KB for more details and explanation on this topic.

How VMware Virtual Machine vMotion works?

 

Please write me back if you have any queries or feedback.

Cheers!