CLOUDSTACK-4181 [upgrade][2.2.14 to 4.2][vmware]After upgrade the system vms fail to start

number of cores per socket for ESXi4.1 is 1.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-4165 3.0.6 to ASF 4.2 Upgrade: Data Migration step of the Upgrade Fails on "persistLegacyZones"

Track the Datacenter of previous cluster correctly while going through each cluster in the zone to see if 2 clusters are from different DC/vCenter.

Cherry picked from 4.2 commit a3450afff558d1d04a7dd4697f4d152f3a0aba33

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
CLOUDSTACK-4182. Id field is not set in the xml response for DeployVirtualMachine/CreateVolume/CreateNetwork API's.
Reverting the range of commits that broke the build

This reverts commits 30c33415..f6a2c817bc

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
CLOUDSTACK-4136: [upgraded ENV]Deleting Snapshot which was created before upgrade is throwing NPE.
Snapshot object is being accessed even when it is null. In case snapshot is not present in backup store the code should return after cleaning db entry.
Also noticed discrepancy in the upgraded db setup but couldn't fully verify it, so added logging in the upgrade logic for template/snapshots etc.