1030 Commits

Author SHA1 Message Date
Jayapal
e3ae08b3ee CLOUDSTACK-9709: Updated the vm ip fetch task to use the correct the thread 2017-03-07 09:50:18 +05:30
Rajani Karuturi
4f32febfed Merge pull request #815 from priyankparihar/CS-43756
CLOUDSTACK-8841: Storage XenMotion from XS 6.2 to XS 6.5 fails.Removed Host version check in API. Because
Case 1:(Lower to Higher Version)
Migration from lower version to higher version is valid.
Case 2:(Higher to Lower Version)
In this case system(Host) will not allow.
So no need to check version in API. Additionally,  CLOUDSTACK User Interface(UI) does  not allow  migration between different version of hyper-visors. But sometimes user wants to do migration from  Lower to Higher Version. Now he can do it via API.

ACS Link ==>
https://issues.apache.org/jira/browse/CLOUDSTACK-8841

* pr/815:
  CLOUDSTACK-8841: Storage XenMotion from XS 6.2 to XS 6.5 fails.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 06:11:15 +05:30
Rajani Karuturi
d84347ba8c Merge pull request #1838 from anshul1886/CLOUDSTACK-9682
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If

the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.

* pr/1838:
  CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If the destination pool is in maintenance mode do not allow a volume to be migrated to the storage pool. Fixed it for volume migration and vm migration with volume.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-17 17:48:32 +05:30
nvazquez
3a6d98289c CLOUDSTACK-9539: Support changing Service offering for instance with VM Snapshots 2017-02-16 10:49:09 -03:00
Anshul Gangwar
8ef94819da CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.
2017-02-13 15:29:52 +05:30
Rajani Karuturi
e02003d653 Merge pull request #844 from ustcweizhou/assignvm-master
[4.10] CLOUDSTACK-7985: assignVM in Advanced zone with Security GroupsThis commit contains the following changes:
(1) implementation of assignVM in Advanced zone with Security Groups
(2) keep the default nic on shared network when assignVM
(3) allow migrate vm from/to project;
(4) UI change for selecting account/project/network

* pr/844:
  CLOUDSTACK-7985: assignVM in Advanced zone with Security Groups
  CLOUDSTACK-7985: keep the default nic on shared network when assignVM
  CLOUDSTACK-7985: (1) allow migrate vm from/to project; (2) UI change for selecting account/project/network

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-09 11:54:40 +05:30
Rajani Karuturi
e303baa1bf Merge pull request #1905 from nvazquez/expungeVmRefactor
CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots## Description
It was noticed that expunging instances with many vm snapshots took a look of time, as hypervisor received as many tasks as vm snapshots instance had, apart from the delete vm task. We propose a way to optimize this process for instances with vm snapshots by sending only one delete task to hypervisor, which will delete vm and its snapshots

## Use cases

1. deleteVMsnapohsot-> no changes to current behavior
2. destroyVM with expunge=false ->  no actions to VMsnaphsot is performed at the moment. When VM cleanup thread is executed it will perform the same sequence as (3). If instance is recovered before expunged by the cleanup thread it will remain intact with VMSnapshot chain present
3. destroyVM with expunge=true:
   * Vmsnaphsot is marked with removed timestamp and state = Expunging in DB
   * VM is deleted in HW

* pr/1905:
  CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 12:28:09 +05:30
Rajani Karuturi
202b92f243 Merge pull request #1767 from nvazquez/userVmAndTemplatesDetails
CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UIJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9457

### Goal
This PR proposes list/add/update/delete user vm and vm template details via API and UI.

### VM UI Screenshots
Setting tab is added on Instances page. Actions allowed are: Add/Edit/Remove
![](https://issues.apache.org/jira/secure/attachment/12844858/VMDetails1.JPG "Screenshot 1 - VM Details")

Settings tab is only shown if instance is Stopped:
![](https://issues.apache.org/jira/secure/attachment/12844859/VMDetailsRunning.JPG "Screenshot 2 - VM Details Hidden Running VM")
![](https://issues.apache.org/jira/secure/attachment/12844860/VMDetailsStopped.JPG "Screenshot 3 - VM Details Stopped VM")

### Templates UI Screenshots
Setting tab is added on Templates page. Actions allowed are: Add/Edit/Remove:
![](https://issues.apache.org/jira/secure/attachment/12844857/TemplateDetails1.JPG "Screenshot 4 - Template Details")

* pr/1767:
  CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UI

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 12:12:37 +05:30
nvazquez
6ce6cf67f0 CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots 2017-02-06 23:39:01 -03:00
Wei Zhou
a2428508e2 CLOUDSTACK-8746: vm snapshot implementation for KVM
(1) add support to create/delete/revert vm snapshots on running vms with QCOW2 format
(2) add new API to create volume snapshot from vm snapshot
(3) delete metadata of vm snapshots before stopping/migrating and recover vm snapshots after starting/migrating
(4) enable deleting of VM snapshot on stopped vm or vm snapshot is not listed in qcow2 image.
(5) enable smoke tests for vmsnaphsots on KVM
2017-01-24 21:47:30 +01:00
Koushik Das
bc86baeaa0 Signed-off-by: Koushik Das <koushik@apache.org> 2017-01-10 14:46:52 +05:30
nvazquez
e8049af153 CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UI 2016-12-27 23:33:50 -03:00
Wei Zhou
ab0d04d10e CLOUDSTACK-7985: assignVM in Advanced zone with Security Groups 2016-12-27 12:02:50 +01:00
Wei Zhou
3f16740d82 CLOUDSTACK-7985: keep the default nic on shared network when assignVM 2016-12-27 11:58:25 +01:00
Wei Zhou
a1d2fba1d2 CLOUDSTACK-7985: (1) allow migrate vm from/to project; (2) UI change for selecting account/project/network 2016-12-27 11:58:25 +01:00
Rohit Yadav
17653a86fa
Merge branch '4.9' 2016-12-10 01:29:16 +05:30
Sudhansu
542a2112ba CLOUDSTACK-9626: Instance fails to start after unsuccesful compute
offering  upgrade.
2016-12-09 17:06:13 +05:30
Koushik Das
97ffe0711e CLOUDSTACK-9650: Allow starting VMs regardless of cpu/memory cluster.disablethreshold setting
Introduced a global configuration flag 'cluster.threshold.enabled'. By default the flag is true.
If the value is false, then a VM can be started in a cluster even if the cluster thresholds are
crossed. However, for a new VM deployment the cluster threshold will always be honoured.
2016-12-02 23:08:32 +05:30
Rohit Yadav
d8c038e5b2
Merge branch '4.9' 2016-11-25 13:10:56 +05:30
Rohit Yadav
50f80cc2a0
Merge branch '4.8' into 4.9 2016-11-25 13:03:04 +05:30
nvazquez
bb275a5ad1 CLOUDSTACK-9422: Granular VMware vms creation as full clones on HV 2016-09-13 09:59:04 -07:00
Nathan Johnson
53fd4a7997 CLOUDSTACK-9451
Honor the forced parameter to stop virtual machine api call.
2016-09-09 13:00:17 -05:00
nvazquez
148e974482 CLOUDSTACK-9436: Release network resources on expunge command 2016-07-21 12:25:22 -03:00
Will Stevens
46a6530e70 Revert "Merge pull request #1594 from nvazquez/vmnetworkmapissue"
This reverts commit 9be93c6e9022f35a2cd3dab6a099d69a77dd72ff, reversing
changes made to 8d45d711bff631efb45954631c123dcb2beffb3c.
2016-07-21 11:04:10 -04:00
nvazquez
c754a0cf30 CLOUDSTACK-9407: Refactor 2016-06-21 13:49:55 -03:00
nvazquez
d3f3fb0590 CLOUDSTACK-9407: Release network resources on expunge command 2016-06-16 12:35:42 -03:00
Daan Hoogland
78cd64a6c2 CLOUDSTACK-9203 refactorred DeployVM code to be used by UpdateVM as well
Conflicts:
	api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
	api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
2016-05-23 22:40:31 +02:00
Loic Lambiel
5877293434 CLOUDSTACK-9203 security group update on running instance
cherry-picked from a exoscale internal fix:

      Implement security group move on updateVM API call
      Prevent security group update while instance is running

Conflicts:
	api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
	server/src/com/cloud/vm/UserVmManager.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
2016-05-23 22:33:42 +02:00
Priyank Parihar
69647b38ce CLOUDSTACK-8841: Storage XenMotion from XS 6.2 to XS 6.5 fails. 2016-05-17 12:13:34 +05:30
Nick Livens
71c9c90e0c CLOUDSTACK-9365 : updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata 2016-05-11 07:59:38 +02:00
Rohit Yadav
126a039eb8 Merge branch '4.7' into 4.8 2016-05-03 08:20:27 +05:30
Rohit Yadav
8e4644e413 vmware: improve support for disks
- Improve disk chain usage while attaching, migrating disks
- Gets root disk controller based diskDeviceBusName from volume's chain info
- Refactor and move VirtualMachineDiskInfo to cloud-utils
- Allows mixing of scsi controller types
- Fixes a NPE case with map passed as null, for example in case of detach volume
  command
- Use a osdefault translator that allow use of recent os types added (enums of
  which) are not available in the sdk

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-18 22:44:18 +05:30
Remi Bergsma
bca6076f15 Merge pull request #864 from bvbharatk/CLOUDSTACK-8860
CLOUDSTACK-8860: improve error messages in VM deployment code path.improved the error messages in vm deployment code path. added some more data to the error messages and also fixed some errors using internal ids to use uuids.

* pr/864:
  CLOUDSTACK-8860: improve error messages in VM deployment code path.

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 15:05:09 +01:00
Remi Bergsma
cdfcea3da2 Merge release branch 4.6 to master
* 4.6:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
2015-12-12 22:29:19 +01:00
Wei Zhou
ccf770636c CLOUDSTACK-9051: reprogram network as a part of vm nic ip update 2015-11-30 09:20:26 +01:00
Wei Zhou
c01c73e44d CLOUDSTACK-9051: add unit tests for UpdateVmNicIp 2015-11-30 09:20:26 +01:00
Wei Zhou
b79d338f29 CLOUDSTACK-9051: update nic IP address of stopped vm 2015-11-30 09:20:25 +01:00
Rohit Yadav
a15187a57a CLOUDSTACK-4787: Allow users to select disk controller for VM/template
- Adds new controller types in the UI, for selecting root disk controller while
  registering templates
- Fixes bug to not override disk controller type if provided in the details (either
  vm details or from template details)

(cherry picked from commit c7d67628b3ff86802a1ac3b58e0bc05d54afd543)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:52:02 +05:30
Sateesh Chodapuneedi
6a9956e0f5 CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
commit #7
    So far only 1 controller (scsi or ide) is supported in Cloudstack for ide or
    scsi, this is existing limitation. Added support for 2nd IDE controller. Support adding IDE
    virtual disk to VM. Also added check if VM is running as IDE virtual disk cannot be attached
    to VM if VM is runnning.If user detaches a virtual disk on lower unit number of controller,
    then subsequent attach operation should find free unit number on the controller and attach
    the virtual disk there.

    commit #6
    Let the controllers of existing VMs continue without flip, current busInfo retrieved from
    chain_info field of volume record from database would be preferred over
    controller settings from all configuration settings.

    commit #5
    Editing global configuration param vmware.root.disk.controller osdefault value results
    in loss of previous root disk controller type. Hence root disk's controller type for legacy
    VMs is unknow post that modificaiton by user. If VM is stop/start then we could get this
    infromation from bus info of existing volume. But if user resets VM and then try to start VM.
    The existing bus info would be lost. Hence existing disk info is not available to depend on.
    Using lsilogic or generic scsi controller for ROOT disk of legacy VMs if reset.

    commit #4
    Avoid adding additional (>1) scsi controllers to system vms. While attaching volume to legacy VM
    don't use osdefault optoin which applicable only for VM created with the option enabled, use
    legacy data disk controller type (lsilogic)

    commit #3
    If root disk's controller type is scsi and data disk controller type condenses
    to any of scsi sub-types then data disk controller type would fall back to root disk controller itself. This
    ensures data volumes would be accessible in all cases as controller of root volume would be reliable
    and it means VM has the supported controller. It also avoids mix of scsi controller sub-types in a user instance.
    Also translating disk controller type scsi to lsilogic.

    commit #2
    Support auto detection of recommended virtual disk controller type for specific guest OS.

    commit #1
    Support granual controller types. Add support for controller types in template registration as well.

    Fix white spaces.
    Removed stale HEAD merge lines
    Removed tail of merge lines
    Fixed VmwareResource, removing storage commands that moved to VmwareStorageProcessor.
    removed stale code of controller that is present in processor
    Fixed check style errors.
    Fixed injection.
    Tested with Linux and windows templates. Unable to run iso based tests due to few bugs in register iso area.

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

(cherry picked from commit a4cc987a6f66f20c434942956fffe5951df09e43)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:39:41 +05:30
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
Rajani Karuturi
242b87dbfb CLOUDSTACK-8816: some of the events do not have resource uuids
uuid is missing in the first event of VM create as the entity is just
created and never put in the Context.
Added the entity uuid to context on successful creation.
2015-10-26 09:15:32 +05:30
Boris Schrijver
80cb3adad0 Added isEmpty() check to prevent nullPointerException. 2015-09-23 15:07:16 +02:00
Bharat Kumar
1718bb38aa CLOUDSTACK-8860: improve error messages in VM deployment code path.
Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
2015-09-22 10:17:00 +05:30
Rajani Karuturi
37c3451aae CLOUDSTACK-8816 Fixed entityUuid missing in some cases is events
context parameters is Map<object,Object>. This has been used
interchangeably with String and class object resulting the param value
not being available in some cases if its put with object and get with
class.forName()

made the put and get consistent by using Object as key everywhere.
2015-09-09 14:23:27 +05:30
Koushik Das
53cba7c741 Merge pull request #741 from koushik-das/simulator_fixes
Made following fixes in simulator
- Support for ScaleVmCommand/NetworkRulesVmSecondaryIpCommand in resource layer
- Added support for scaling up a running VM in simulator
- Fixed some method names not following convention

In order to test PR #725 using simulator some of these changes are needed.

Based on the way HV check is present in the scale VM API, had to explicitly put simulator related check to allow support. The ideal way would be to remove all these HV specific check from code and made them some configuration (by putting them in hypervisor_capabilities table in DB). But that will be a bigger effort outside the scope of this PR.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-08-31 12:15:54 +05:30
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Rohit Yadav
5f04aa5687 Merge pull request #673 from anshul1886/CLOUDSTACK-8721
CLOUDSTACK-8721: Fixed Setting details of VM through API results in removal of all other details except the one passed in API

* pr/673:
  CLOUDSTACK-8721: Fixed Setting details of VM through API results in removal of all other details except the one passed in API

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-26 16:08:46 +05:30
Koushik Das
86684cd4bc Made following fixes in simulator
- Support for ScaleVmCommand/NetworkRulesVmSecondaryIpCommand in resource layer
- Added support for scaling up a running VM in simulator
- Fixed some method names not following convention
2015-08-25 14:52:48 +05:30
Boris Schrijver
4b88eabef1 Fix for the NicVO.java regression.
Renamed set*() methods to correct naming.
2015-08-21 14:03:00 +02:00