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!

 

Saturday 20 March 2021

ChainMap in Python

 

ChainMap is used to group multiple dicts together to create a single view. It is present in Collections module.

The underlying dictionaries or mappings are stored in a list. This list can accessed using the maps attribute.

Required Key is searched through all the mappings or dictionaries in the ChainMap until it is found. Raises KeyError if the key is not found in any of the mappings.

 

Creating ChainMap

ChainMap can be created using built-in ChainMap( ) function:

from collections import ChainMap

d1 = {"a":1, "b":2,"c":3}

d2 = {"b":5,"d":6}

chainMap = ChainMap(d1, d2)

print(chainMap)

 


Write, update and delete operations only operate on first mapping. Consider the below code:

from collections import ChainMap

d1 = {"a":1, "b":2,"c":3}

d2 = {"b":5,"d":6}

chainMap = ChainMap(d1, d2)

chainMap["b"] = 4

print(chainMap.maps)

 

 

Trying to update the value of the existing key in the dict other than first dict in the ChainMap results in creating new key-value in the first dict as shown below:

from collections import ChainMap

d1 = {"a":1, "b":2,"c":3}

d2 = {"b":5,"d":6}

chainMap = ChainMap(d1, d2)

chainMap["d"] = 4

print(chainMap.maps)

 

Because ChainMap doesn’t allow update, write and delete operations on dicts ohter than first dict.