525 Commits

Author SHA1 Message Date
Likitha Shetty
27b7e49b39 CLOUDSTACK-8412. VM migration with storage fails.
Update MigrateWithStorageCommand to avoid JSON deserialization error.

(cherry picked from commit 04365601dac6d4dfa396e5c86ab7e698906dfb44)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Santhosh Edukulla
86943da26e Fixed few coverity issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
(cherry picked from commit 0a9742f91462867cc9d5f9321a13a73483fcf149)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:43:48 +02:00
Likitha Shetty
db379bf0e8 CLOUDSTACK-8405: Restore VM results in deletion of data disk.
Dont evict template when a delete command has been sent to VMware resource for deletion of volume.

(cherry picked from commit f45e6b94edf3af1feaf4613daf292e5bb8ba7758)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:29:37 +02:00
Likitha Shetty
55f2e45d14 CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume.
(cherry picked from commit bdd28a45ed1cc8046c63d0e840e54975e5b74ab5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:42:02 +02:00
Likitha Shetty
89dbd1ea1b CLOUDSTACK-8318. Storage vMotion support for VMFS.
MigrateVMWithVolumes-
1. If ESXi host version is below 5.1, ensure destination datastore(s) is mounted on the source host, then migrate the storage and then finally migrate the VM.
If destination storage(s) is not mounted on the source host,
- In case of NFS storage mount the storage(s).
- In case of VMFS storage fail the request for migration.
2. If EXi host version is 5.1 or above, simultaneously migrate the VM and its storage to the destination host and storage(s) respectively for both NFS and VMFS storage.

(cherry picked from commit adc836cc5eadb0b05aefa6fcdcf8c03841282609)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:39:14 +02:00
Likitha Shetty
9565ad2f9c CLOUDSTACK-8134. Worker VMs don't have MS id set in vCenter annotation 'cloud.vm.workertag'.
Correctly register node info for a newly created VMware context.

(cherry picked from commit 13bdc1cef4ee0fae2f263777317c170302c49689)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:34:43 +02:00
Rohit Yadav
752d784d92 vmware: support vmfs as local storage pool type
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:10:43 +05:30
Rohit Yadav
eea716b791 vmware: plugin improvements
- use sticky chmod 1777 on the mountpoint
- remove dead code
- port improved code for moving disk into corresponding folder from master
- for dummy worker case, check case for powered off vm state

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:10 +05:30
Rohit Yadav
43db75c319 CLOUDSTACK-7593: allow nic type to be fetched from vm's details
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Frank Zhang
dcb6d7c778 Don't do chmod -R when mounting secondary storage for vmware
It causes extreme long vm start time when managment server has slow connection to secondary storage

(cherry picked from commit 49c01e2ae4eb164438f78f9686813497d7fd162f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Likitha Shetty
865940d088 CLOUDSTACK-8136. [VMware] Create VM snapshot fails if a previous attempt to take the snapshot failed.
While looking for an ongoing VM snapshot task, check the task status to identify if the task is still running.

(cherry picked from commit 25a4f0dc530951e87fe357313dc983cb75aa8972)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Sateesh Chodapuneedi
d928f5b9dd CLOUDSTACK-5933 Problem with VMware snapshot when datastore has a space in its name
Handling spaces in datastore name while extracting vmdk base name

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
(cherry picked from commit aa84b05491007567b81b33443fd9f99f6992e52c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Likitha Shetty
c29254b547 CLOUDSTACK-8121. Data disk properties are not updated upon Creation/Deletion of VM snapshots.
Update the path and size of data volumes after snapshot creation/deletion by correctly trimming only the snapshot postfix of a disk.

(cherry picked from commit ac491c96075d65e35157380fe7d28fdd917c0e90)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Likitha Shetty
271dae9750 CLOUDSTACK-8109. Extract Template is failing.
Fix the OVA path that is returned once an OVA is packaged using a META file.

(cherry picked from commit 507d9d337d2e80f7f6e5d665708c0687c387c5fc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:44:09 +05:30
Rajani Karuturi
5da733072e CLOUDSTACK-5236 : ability to identify where the user is from (ex. LDAP)
Added a source column to the user table.

Source now has only two values UNKNOWN,LDAP with UNKNOWN being the
default and is an enum is com.cloud.User.

When the source is UNKNOWN, the old method of authenticating against all
the available authenticators is used. If a source is available, only
that particular authenticator will be used.

added overloaded methods in AccountService to createUserAccount and
createUser with source specified.
2015-03-16 12:35:37 +05:30
Rohit Yadav
c198dfdb7a Update pom and version usage to 4.5.1-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 12:13:18 +05:30
Santhosh Edukulla
78bfaa79cf Fixed few coverity issues like invalid boxing unboxing issues, resource leaks, null dereferences
(cherry picked from commit ef6ec7b27675ea44d45c68b30eb2f508655703be)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 16:50:20 +05:30
Santhosh Edukulla
c25263ba81 Fixed Coverity Issues 2015-02-05 15:59:29 +05:30
Likitha Shetty
bf7013f0ea CLOUDSTACK-8111. NFS secondary storage repetitively mounted on CS server with ESXi hypervisors.
Fix cleanup of NFS mounts on management server during server starup by correcting how mount points are listed for a management server.

(cherry picked from commit 647532376fc090f75e6fa0ad66ee36241084dec9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 14:51:53 +05:30
Likitha Shetty
272f282a05 CLOUDSTACK-8119. Propagate error message to UI for attach/detach volume failure operations.
For AttachVolume/DetachVolume API command, improve user error message in case of RuntimeException by throwing the exception instead of 'Unexpected Exception'.

(cherry picked from commit 4d7ede535df568c6aab4a228ac794ec11d433e1e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/storage/VolumeApiServiceImpl.java
2015-02-02 13:57:38 +05:30
Likitha Shetty
bcbfe3bdee CLOUDSTACK-8129. Cold migration of VM across VMware DCs leaves the VM behind in the source host.
If VM has been cold migrated across different VMware DCs, then unregister the VM from source host.

(cherry picked from commit 15b348632df2049347f58c87830be2c02eee3b61)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:47 +05:30
Likitha Shetty
12cbebc544 CLOUDSTACK-8126. Cold Migration of VM is not working as expected. In case a VM is cold migrated across clusters then VM fails to start.
1. If a VM by the same name exists on a different cluster in the VMware DC, unregister the existing VM and continue with the VM start.
2. If VM start succeeds, delete VM files associated with the unregistered VM.
3. If VM start fails, re-register the unregistered VM.

(cherry picked from commit 974b0180dd67f19fea921092105161f849891ac5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:42 +05:30
Likitha Shetty
a1eca8bd16 CLOUDSTACK-8118. Root volume migration fails with 'No such disk device' in case of vCenter 5.5 setup.
If an exact match is being done while locating disk chain by name, don't trim snapshot postfix appended to the disk name.

(cherry picked from commit ddcae8a9306f5f7dd416b859e59fd10094c91551)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:36 +05:30
Likitha Shetty
ad92b85076 CLOUDSTACK-8113. VM migration fails with "Message: No such disk device: " error.
Consolidate VM disks once VM/volumes are migrated.

(cherry picked from commit cb211f18d14dcc9d988254a4b50b55ca0b080ed5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:29 +05:30
Likitha Shetty
45d32234a6 CLOUDSTACK-8112. CS allows creation of VM's with the same Display name when vm.instancename.flag is set to true.
Before registering a VM check if a different CS VM with same name exists in vCenter.

(cherry picked from commit 33179cce56b15f0632e38afa260cb829bb2a2273)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:22 +05:30
Likitha Shetty
b2fa91629e CLOUDSTACK-8110. VM name in vCenter should be VM's DisplayName if global config 'vm.instancename.flag' is set.
(cherry picked from commit 51ee90074d5b53be261dcc746e4bd8a1058dfb6a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:16 +05:30
Sateesh Chodapuneedi
ba00a1a081 CLOUDSTACK-7803 Storage live migration of instance may not happen if instance has ISO attached.
BUG-ID:CLOUDSTACK-7803
Summary:Ensure secondary storage is mounted on target host.
Reviewed-By:Rajesh

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
(cherry picked from commit bca015306e5c16915b5a76d846294c593e1df15c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:10 +05:30
Likitha Shetty
c8a437b782 BUG-ID: CLOUDSTACK-7102. Volume migration fails with 'VM i-2-3-VM does not exist in VMware datacenter' expection.
Look for a VM in vCenter based on both the vCenter name and CS internal name (required in case 'vm.instancename.flag' is enabled).
During Attach Volume and Volume Migration, for lookup and other operations use VM's name as obtained from vCenter instead of using the name set in the agent command.

(cherry picked from commit b8fdda0a34f5338db284ee616c5e04206c97b82e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:51:04 +05:30
Saksham Srivastava
dca38d3fa8 CLOUDSTACK-7950: AttachIsoCmd shoud give correct messge when trying to attach vmwaretools installer iso on non supported guestvm deployed by ISO
(cherry picked from commit 4ff3130becd50ab8d44864b651c1b1e235d67e6f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:31:33 +05:30
Saksham Srivastava
a1791cb4a8 CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to java.lang.NullPointerException
(cherry picked from commit 1df0453d27e8378065c15878067fc9d2dc961e30)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:28:17 +05:30
Mike Tutkowski
be38b97066 Fixing an issue related to figuring out the name of a datastore that is backed by managed storage 2014-12-08 14:40:49 -07:00
Harikrishna Patnala
eae733817b CLOUDSTACK-6465: vmware.reserve.mem is missing from cluster level settings
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-11-25 12:22:31 +05:30
Bharat Kumar
0e7f1ea9b8 CLOUDSTACK-7763 Reservations for VMware VMs remain after dynamic scaling 2014-11-10 15:07:13 +05:30
amoghvk
0c153966e6 CLOUDSTACK:6915 search including removed 2014-10-31 15:29:07 -07:00
Edison Su
1c1485e0f0 disable parallel for xenserver. Also for vmware, if full.clone is enabled and migratecommand will have the behavor of start/stop command
(cherry picked from commit d233f39c82908f81ba90f51d7bc445cc83ef5691)
2014-10-13 00:39:33 -04:00
Edison Su
52c6c90eda fix build
(cherry picked from commit 6a5e4306f2b1720d0ca92013e6424c2d4d8ea9df)
2014-10-13 00:38:40 -04:00
Edison Su
0fd9c43ea2 vmware resource code needs to honor the timeout value send
(cherry picked from commit 15a2ea7c7ecde3d0ac692bbab668de2c589eb4a8)
2014-10-13 00:38:10 -04:00
Nitin Mehta
c8c9f1dd3a Revert "CLOUDSTACK-7533: Wrong download URL is generated when using multiple SSVMs in a zone. The public ip of the url would sometime point to the wrong ssvm when the url was created on another one."
This reverts commit f3b5a6ebc70d5bfb2c77b6aa359d7eb79b4507e5.
Reverting since a better fix is available with CLOUDSTACK-6478

(cherry picked from commit 9e7fbae52fcbc2a99120d08158c6c99bdbd75b2c)
2014-10-13 00:29:00 -04:00
Likitha Shetty
4b581bfa5f BUG-ID: CLOUDSTACK-7662. Resize of detached volume fails.
Support offline volume resize on ESX by creating a worker VM to attach the unattached volume to and then resize it.

(cherry picked from commit 65ed25b7a63586e25a568d845527d547f0045889)
2014-10-13 00:14:22 -04:00
Likitha Shetty
9f653d7404 BUG-ID: CLOUDSTACK-7653. VM's are not getting deleted from hypervisor after deleting from UI when using zone wide primary storage.
While expunging a volume, CS chooses the endpoint to perform delete operation by selecting any host that has the storage containing the volume mounted on it.
Instead, if the volume to be deleted is attached to a VM, the endpoint chosen by CCP should be the host that contains the VM.

(cherry picked from commit f1e3e83bbf763860dd33a18c36618b4714bf0dbe)
2014-10-13 00:09:06 -04:00
Likitha Shetty
e338cdd1ed BUG-ID: CLOUDSTACK-7652. [VMware] 'SOAPFaultException: The object has already been deleted or has not been completely created' exceptions.
If CCP thread local context which is used to handle connections to a vCenter is being re-used, validate that the context corresponds to the right vCenter API session.

(cherry picked from commit 6b069703666c33636a545e7093eccf04efff88e7)
2014-10-13 00:08:48 -04:00
Mike Tutkowski
18e5aa116e Fixing an issue around VMware system templates 2014-09-18 19:38:59 -06:00
Nitin Mehta
f3b5a6ebc7 CLOUDSTACK-7533: Wrong download URL is generated when using multiple SSVMs in a zone. The public ip of the url would sometime point to the wrong ssvm when the url was created on another one.
Fix the bug by removing the command CreateEntityDownloadURLCommand from the host delegation. This results in same ssvm for creating the symlink on ssvm and same public ip being used for generating the url on MS.
2014-09-10 17:46:33 -07:00
Hugo Trippaers
dc3f0cbc63 Improve the handling of the findbug exclude files 2014-09-03 10:41:22 +02:00
Likitha Shetty
7dbff9b42c CLOUDSTACK-7371. [VMware] Enabling primary storage maintenance fails when storages are across cluster.
1. While destroying a ROOT volume do the lookup of the associated VM under the DC and not just cluster.
2. In case of VMware, during VM start if a volume is being recreated no need to detach the old volume because
we now expunge it immediately and don't wait for the storage cleanup task to run.
2014-08-20 10:51:18 +05:30
Likitha Shetty
8bb4022f37 CLOUDSTACK-4587. System VMs fail to start when the primary storage that has the System VMs is put into maintenance.
During VM start while configuring its disk devices, obtain the matching disk for a volume in storage
using both the volume's path and volume's datastore information.
2014-08-20 10:51:18 +05:30
Sateesh Chodapuneedi
a1d0925f90 CLOUDSTACK-7360 [vmware] Add host to existing cluster fails if the cluster is using Nexus 1000v as backend for atleast one traffic type.
While adding host to existing cluster which is using Nexus 1000v as a network backend, skip validation of Nexus VSM as it was already done while adding that cluster.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2014-08-18 07:18:13 +05:30
Sateesh Chodapuneedi
6a4a11ed71 CLOUDSTACK-7334. [VMware] AddHost command fails if there is a space in the VMware DC/Cluster name.
URL decode vCenter path during cluster discovery.
2014-08-13 16:24:14 +05:30
amoghvk
d1d722f9bd CLOUDSTACK-7295: VMs is Stopped state have no host ID, resulting in NPE 2014-08-11 14:56:58 -07:00
Min Chen
9866c648eb CLOUDSTACK-7260: Management server not responding after some time for
Vmware due to Oom (cannot create native thread).
2014-08-05 17:36:53 -07:00