79 Commits

Author SHA1 Message Date
Likitha Shetty
f5ed824ea2 CLOUDSTACK-8598. CS reports volume migration as successful but the volume is not migrated in vCenter.. For the following disk operations - migration, snapshot creation, resize, detach and template creation, CS should do an exact disk match between volume path and vCenter disk name. If the exact matching fails to find a disk, CS should fall back to the old method of partial matching on a trimmed disk.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #543
2015-07-16 10:44:58 +02:00
Rafael da Fonseca
00cdd66351 Fix 3 findbugs warnings OVF and VMX descriptor files should be written in UTF-8
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #404
2015-06-15 12:05:08 +03:00
Rohit Yadav
04dccda3f0 vmware-base: get vsessiontimeout from client class
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 4d9a94ce6956e61882b0fd7f15c1ec66d6419135)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:48:11 +05:30
Likitha Shetty
bdd28a45ed CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume. 2015-03-12 11:57:02 +05:30
Likitha Shetty
974b0180dd 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.
2014-12-24 15:07:08 +05:30
Likitha Shetty
ac491c9607 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.
2014-12-24 13:04:12 +05:30
Likitha Shetty
b1bca2a2c0 CLOUDSTACK-8119. [VMware] Cannot attach more than 8 volumes to a VM. 2014-12-24 11:36:27 +05:30
Likitha Shetty
4d7ede535d 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'.
2014-12-24 11:29:03 +05:30
Likitha Shetty
f420dd55fb CLOUDSTACK-8119. [VMware] Cannot attach more than 8 volumes to a VM.
While attaching a new disk to an instance, the unit number on the controller key should be the lowest unit number
that is not in use. And in case the controller type is SCSI it shouln't be the reserved SCSI unit number.
2014-12-24 10:48:03 +05:30
Likitha Shetty
ddcae8a930 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.
2014-12-24 10:19:22 +05:30
Likitha Shetty
cb211f18d1 CLOUDSTACK-8113. VM migration fails with "Message: No such disk device: " error.
Consolidate VM disks once VM/volumes are migrated.
2014-12-23 14:28:17 +05:30
Likitha Shetty
b41a78ce0f CLOUDSTACK-7248. [VMware] Extract volume fails with an NPE.
Synchronize attach disk to VM on the VM object value instead of using a DB lock.
2014-08-08 15:31:03 +05:30
Likitha Shetty
bb7fc59947 Revert "CLOUDSTACK-7077. Quickly attaching multiple data disks to a VM fails."
This reverts commit a9b3ab089d6cb0bc1494e10b2be90292f4c79289.
2014-08-08 15:31:03 +05:30
Sateesh Chodapuneedi
dfa607fb44 CLOUDSTACK-7250 [vCenter 5.5] SourceNAT,StaticNAT and Portfowrding is not working with Vmware DVS in vCenter 5.5
Change in vCenter 5.5 API from prior versions forced code change in CloudStack. Update property value of property "VirtualE1000.deviceInfo.summary" is accommodated now.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2014-08-05 10:00:00 +05:30
Kelven Yang
bfb28da9fc Trim postfix appended to the disk name by vCenter after snapshot operation when we are locating disk chain by name 2014-07-11 14:42:46 -07:00
Likitha Shetty
a9b3ab089d CLOUDSTACK-7077. Quickly attaching multiple data disks to a VM fails.
[VMware] Synchronize the tasks of disk preparation and reconfiguration of a VM with the disk.
This is to avoid attaching a disk with a wrong device number on the controller key.
2014-07-08 13:24:13 +05:30
Likitha Shetty
4be369c94c CLOUDSTACK-7072. Volume attachment fails with 'A specified parameter was not correct' error.
[VMware] While attaching a new disk to an instance, the unit number on the controller key should be the lowest unit number on the key that is not in use.
Instead of a number that is 1 digit higher the highest unit number that is currently in use.
2014-07-07 17:40:06 +05:30
Kelven Yang
9f0d1cee64 Make sure to let VM question answer monitor exit gracefully 2014-02-28 15:35:58 -08:00
Kelven Yang
6987f23380 Pragrammatically Answer HA question posted in vCenter since it will block CloudStack from continuously operating on the VM 2014-02-28 15:35:58 -08:00
Kelven Yang
e051490cea Make sure to let VM question answer monitor exit gracefully 2014-02-28 15:35:58 -08:00
Kelven Yang
4a414d3990 Pragrammatically Answer HA question posted in vCenter since it will block CloudStack from continuously operating on the VM 2014-02-28 15:35:58 -08:00
Likitha Shetty
0926bf57f4 CLOUDSTACK-6146. [VMware] [ESXi 5.5] Live storage migration of an already migrated volume fails
In vCenter 5.5, once a volume is migrated the VMDKs are renamed to match the name of the VM.
If a volume has been renamed upon migration update its volumePath to that of the new disk filename.

Conflicts:

	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
	vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
2014-02-26 13:45:43 +05:30
Nitin Mehta
c969aa2595 CLOUDSTACK-6134:
If volume already exists for the vm - register the vm in the inventory and start it.
2014-02-18 18:24:33 -08:00
Hugo Trippaers
b20add810e Get rid of compiler warnings in vmware-base 2014-01-22 09:37:34 +01:00
Sateesh Chodapuneedi
db99146187 CLOUDSTACK-5661 [VMware] DetachIsoCmd succeeds even though cdrom is locked by VM as cdrom is mounted
DetachISO is succeeding even though detach opeartion is failing as cdrom is locked by VM as it was mounted inside VM.
Detect if cdrom is locked or not. If locked fail detach operation and warn user to unmount before detaching the iso/cdrom device.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

Conflicts:

	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
	plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
	vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
2013-12-28 02:36:53 +05:30
Likitha Shetty
fa2f18d2a2 CLOUDSTACK-4875. Vmware vCenter 5.5 - System VM deployment fails During VM deployment.
When base template is being cloned to create VM ROOT disk, get the disk path i.e. base file name
of the VM's ROOT disk from vCenter
2013-12-17 18:31:15 +05:30
Alex Huang
be5e5cc641 All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
e4b22d0fca Replace all tabs, particularly the ones in the comments 2013-11-21 03:39:58 -08:00
Alex Huang
8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Kelven Yang
fc9adec72e CLOUDSTACK-669: Add host level side-by-side VM state report for graceful sync model migration 2013-11-12 18:32:51 -08:00
Sateesh Chodapuneedi
a70bbdb139 CLOUDSTACK-4993 [VMware] When issuing detach ISO to Vcenter, MS should prevent Vcenter from posting Virtual Machine question dialog waiting for user response
During ISO detach operation, answer question from vCenter by programmatically answering for VM question in detaching process.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-11-11 09:11:54 +05:30
Mike Tutkowski
449b5daa70 VMware changes related to managed storage 2013-10-31 08:30:50 -06:00
Kelven Yang
16b022b1b1 CLOUDSTACK-4802: Change VM start flow to better support VM snapshot on certian version of vSphere, (vSphere 5.0 Update 2). If we detect that VM has pending VM snapshot, we will fully honor VM disk info from vCenter, since in some version of vSphere (vSphere 5.0 U2) does not allow disk-editting when VM has pending snapshot. 2013-10-04 16:13:56 -07:00
Kelven Yang
a3babdd61c CLOUDSTACK-4790: Skip reserved VMware scsi device number for SCSI disks 2013-10-02 17:53:56 -07:00
Kelven Yang
1598571dfc CLOUDSTACK-4659: Fix the regression caused by worker VM consolidation for GC purpose 2013-09-17 14:07:14 -07:00
Kelven Yang
5820b071b8 CLOUDSTACK-4659: Add the missing feature back for GC VMware worker VMs 2013-09-17 14:06:52 -07:00
Kelven Yang
ae231444bc CLOUDSTACK-4585: make run-time datastore folder migration, VM snapshot, bug in root disk controller type carried from previous version work under upgrade situation 2013-09-04 14:49:46 -07:00
Kelven Yang
281b94d587 CLOUDSTACK-4458: Volume attach/detach command needs to sent to hypervisor resource even when target VM is in Stopped state 2013-09-04 14:49:46 -07:00
Kelven Yang
ea13e089b8 CLOUDSTACK-4519: reimplementdestroy-volume to take consideration of on-disk snapshot 2013-09-04 14:49:46 -07:00
Kelven Yang
bae2666549 CLOUDSTACK-3237: add disk chain sync logic to handle out-of-band chain changes that could happen in storage live migration and VM snapshot operations 2013-09-04 14:49:46 -07:00
Kelven Yang
e3a5b3fad9 CLOUDSTACK-3237: acknowledge the behind-back VMDK disk consolidation happend in vCenter after storage live migration 2013-09-04 14:49:46 -07:00
Kelven Yang
9a2148ffc3 CLOUDSTACK-3886: check in for review request https://reviews.apache.org/r/13008/ 2013-09-04 14:49:45 -07:00
Kelven Yang
40869a5a2b CLOUDSTACK-3869: Move VMware datastore folder structure policy management to central place 2013-09-04 14:49:45 -07:00
Sateesh Chodapuneedi
cc18ca79fc CLOUDSTACK-3851 [VMWare] VM start fails with NPE while trying to retrieve cores per socket
If VMware host version is ESXi 4.1 and vCenter version is 5.0 or later, number of cores per socket of a VM running on ESXi 4.1 host would be undefined as it's not supported for versions prior to 5.0.
Hence expecting undefined/null value for that and handling it.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-08-20 13:29:49 +05:30
Alex Huang
5495f10bce Revert "Reverting the range of commits that broke the build"
This reverts commit b59e3aaefced03d40d5b4b63c421c69743bcd387.
2013-08-08 15:02:40 -07:00
Prasanna Santhanam
b59e3aaefc Reverting the range of commits that broke the build
This reverts commits 30c33415..f6a2c817bc

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-08-08 14:46:56 +05:30
Sateesh Chodapuneedi
e1e4642d67 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>
2013-08-08 08:54:00 +05:30
Alex Huang
5287f4c9ec Got everything running through testing 2013-08-07 16:41:06 -07:00
Hugo Trippaers
392bbcc737 CLOUDSTACK-728 Rewrite support for lswitch connected nics on both standard and distributed switches.
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)
2013-07-12 12:18:07 +02:00