Send success answer of type CopyCmdAnswer with full snapshot backup path in secondary store (image store role)
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
- Move vnetBridge clean up function from LibvirtComputingResource to BridgeVifDriver
-- since only BridgeVifDriver have to handle this event
- LibvirtComputingResource now properly call VifDriver.unplug() when it receives UnPlugCommand
- Remove not working and no longer used method getVnet(String) from VirtualMachineName
- Remove not working and no longer used method getVnet() from StopCommand
- Remove unused constructer StopCommand(VirtualMachine, String, boolean) from StopCommand
- Remove unused member vnet from StopCommand
- Remove unused member _modifyVlanPath from OvsVifDriver
Tested with 2 KVM hosts and confirmed it correctly manipulate vnetBridge with start, stop, migrate, plug, and unplug event
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
Fix the name of the interface id in extra config, so the nic is found up using the nic uuid instead of the vm id.
getVlanInfo should return null when the nic is plugged on a Lswitch network.
On a distributed portgroup all vms should be connected to a single
portgroup and set a specific vlan on the port. On a standard switch each nic should have its own portgroup with a dedicated vlan (not related to CS vlans)
For legacy zones insist on the old model of asking for credentials for each cluster being added.
For non-legacy zones check if username & password are provided. If either or both not provided, try to retrieve & use the credentials from database, which are provided earlier while adding VMware DC to zone.
This lets user to not specify credentials while adding VMware cluster to zone, if the credentials are same as that of provided while adding VMware DC to zone.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Description:
a) Fixing NPE when wrong path is provided for primary datastore.
b) No error dialog shows up in GUI when wrong path is provided,
after NPE fix - propagating exception upward.
c) If the KVM agent is down, an invalid datastore gets logged in
storage_pool table and doesn't get removed, so it shows up
in the GUI in the list of datastores - fixing this as well.
listVmwareDcs API is added. Takes 1 parameter (mandatory) which is zoneId.
Returns list of VMware DCs associated with specified zone.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Following Hotadd memory checks are included now.
1) Check if guest operating system supports memory hotadd
2) Check if virtual machine is using hardware version 7 or later before enabling memory hotadd
Following Hotadd CPU checks are included now.
1) Check if guest operating system supports cpu hotadd
2) Check if virtual machine is using hardware version 8 or later.
3) Check if virtual machine has only 1 core per socket. If hardware version is 7, then only 1 core per socket is supported. Hot adding multi-core vcpus is not allowed if hardware version is 7.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
The problem was because in cloudstack when a vm is stopped it gets destroyed on the host. For a
windows vm the timeoffset (which can be set by changing the timezone from within the vm) is stored
in the platform:timeoffset attribute of vm record. The information is lost when the vm is destroted.
Made change to read and persist the platform:timeoffset vm attribute when an instance is stopped.
The value is persisted in the user_vm_details table. When the vm is started again the attribute is
set for the vm instance that gets created.
Retrieve maximum hotadd memory limit & hotadd memory increment size from running VM's configuration to validate dynamic scale memory limit while scaling up a VM.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
Now ESXi server license would be fetched to see if HOTPLUG feature is license or not.
Throw Exception if the feature is not licensed.
Also added FeatureKeyConstants enum type to maintain list of various features to be checked whether licensed or not.
Check if the associated VMware DC matches the one specified in API params. This check would yield success as the association exists between same entities (zone and VMware DC)
This scenario would result in if the API addVmwareDc is called more than once with same parameters. For such scenario, return success response with VmwareDatacenter object read from database. Also returns success if addVmwareDC is called agsin with same zone and VMwareDC where the zone already has resources added to it (clusters etc.)
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>