# coding: latin-1
If script is stored in utf-8, a u character has to appear before any utf-8 strings, as in following example:
# coding: utf-8
For cygwin users, python should be manually pointed at windows python available.
ln -s /cygdrive/c/Python27/python.exe /usr/bin/python
If encoding is not set up:
$ python fmyscript.py
File "fmyscript.py", line 20
SyntaxError: Non-ASCII character '\xc3' in file ficha_conecta.py on line 20, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
To learn more about encoding: https://www.python.org/dev/peps/pep-0263/
Despite having DRS enabled on our vmware cluster, we are unable to migrate virtual machines.
Every migration ends with the following error:
The operation is not allowed in the current state .
Thist issue occurs not only when using powercli, but also when manually trying to migrate:
$vm | move-VM -Datastore $datastore -Destination $vmhost
If you check the host configuration (summary tab), vmotion state is set as “No”, though Host license is Enterprise plus.
Step 1: Restart licencse service in vcenter
vcenter:~ # /etc/init.d/vmware-cis-license restart
Stopping VMware CIS License Service...
Stopped VMware CIS License Service.
Starting VMware CIS License Service...
Waiting for VMware CIS License Service..................
Step 2: Disconnect and reconnect host.
When a disconnection and reconnection is performed, licence information is read, and vmotion host configuration will be re-enabled.