788 Commits

Author SHA1 Message Date
Alex Huang
e99a1ef1d9 Moved the rest of VirtualMachineManager to be vm agnostic 2013-07-23 18:24:59 -07:00
Alex Huang
9bc5870f01 Removed the remove method. Not sure why we added to VirtualMachineManager 2013-07-23 18:24:58 -07:00
Saksham Srivastava
89b94bb754 CLOUDSTACK-3382. Alert should be raised if a vm is migrated from dedicated to non-dedicated resource and vice versa.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated to different accounts/domains
2013-07-23 13:38:14 +05:30
Alex Huang
5297a071d2 Changed virtual machine stop to use uuid 2013-07-22 20:06:04 -07:00
Alex Huang
319d91e1c2 Removed the getByTypeAndId() method and replace it with getById method 2013-07-22 20:06:04 -07:00
Alex Huang
6ac361e6a2 Removed VM generic from VirtualMachineGuru. Part of the cleanup to make vmsync a simple vm manager that doesn't understand the different types of vms 2013-07-22 16:32:59 -07:00
Alex Huang
1325014a03 Changed VirtualMachineProfile to be non-generic. From here on VirtualMachineManager will only manage vm instance. It doesn't understand the difference between different types of VMs. This makes the vmsync code to be generic across all vms. 2013-07-22 11:48:11 -07:00
Alex Huang
7928963d16 Changed start to use uuid instead of generic vm start 2013-07-22 11:46:33 -07:00
ahuang
541f9d7f9c Changed allocate method to be virtual machine type agnostic 2013-07-17 15:58:46 -07:00
Sheng Yang
43ebb1c822 CLOUDSTACK-1670: Fix the order of user vm's multiple nics
They should follow the order of networkIds parameter of deployVMCmd(). And eth0
would be always on default network.
2013-07-16 16:07:36 -07:00
Prachi Damle
ee664a1cac CLOUDSTACK-2159 Anti-Affinity - When "HostAntiAffinityProcessor" plugin is not included in the deployment , deployVirtualMachine() command does not error out when passing the affiitygroupnames parameter.
Changes:
- Added a check during vm deployment to see if a processor for the affinity group type is available
2013-07-16 15:48:07 -07:00
ahuang
11e1e585b1 UserContext switched to CallContext. Added generic storage mechanism for other code to carry information throughout a call. Made the calling User and Account a must have. Added an interface to carry entities in error. Fixed up the code. Part of the vmsync branch 2013-07-16 11:24:21 -07:00
ahuang
17984a3f8c Removed the plug and unplug method from VMGuru. Why should VMGuru understand how to plug and unplug nics? Part of componentizing the vmsync work 2013-07-15 11:00:58 -07:00
Saksham Srivastava
bdc7e4ce33 CLOUDSTACK-3094: Adding a shared network to already deployed VM is failing.
Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
2013-07-12 14:30:10 +08:00
Likitha Shetty
47de56d665 CLOUDSTACK-3447. CLOUDSTACK-3448.
Correct the access check on networks in APIs addNicToVM and removeNicFromVM
2013-07-11 13:50:11 +05:30
Likitha Shetty
873e4e0e58 CLOUDSTACK-3423. Publish 'VM.UPGRADE' usage event every time the service offering of a VM is upgraded. 2013-07-11 10:06:10 +05:30
Marcus Sorensen
6f9d5db0e3 Summary: update user data on all networks a VM is connected to
Detail: Get list of all nics and update user data on them, rather than just
the default nic for the VM. This makes the results consistent with the password
and SSH key metadata.

BUG-ID: CLOUDSTACK-3408
Bugfix-for: 4.1.1, 4.2.0
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1373345338 -0600
2013-07-08 22:48:58 -06:00
Sanjay Tripathi
31df729008 CLOUDSTACK-3184: updateVirtualMachine api gives java NPE.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-07-03 19:39:02 +05:30
Nitin Mehta
90a15bfff6 CLOUDSTACK-2107
If the scaling up fails on the host the vm is running on try to migrate it to other hosts in the cluster and try scaling.
CLOUDSTACK-3349
For deciding the host in the cluster try the new deployment manager now
Signed off by : nitin mehta<nitin.mehta@citrix.com>
2013-07-03 18:40:22 +05:30
Mike Tutkowski
99227f7b3e SolidFire plug-in and related changes
SolidFire plug-in

SolidFire plug-in related
2013-06-28 16:59:21 -06:00
Wei Zhou
3bb4ec9f65 CLOUDSTACK-1192: Disk I/O Statistics support KVM only util 20130625 2013-06-26 11:10:11 +02:00
Harikrishna Patnala
1eb744fa16 CLOUDSTACK-2181: Scale down is allowed when one resource(say cpu) is being scale up and other resource (say ram) is
being scale down ;but not allowed when both resources are being scaledown
Signed off by : Nitin Mehta<nitin.mehta@citrix.com>
2013-06-24 12:09:55 +05:30
Sheng Yang
db97bb8e89 Fix NPE when using baremetal template
Template size is NULL for baremetal, which caused NPE when unboxing
2013-06-21 17:16:33 -07:00
Edison Su
97f8c524b8 merge object_store 2013-06-20 00:18:00 -07:00
Harikrishna Patnala
7b6b8d7a07 CLOUDSTACK-2987 Ensure XStools to be there in template inorder to enable dynamic scaling of vm
CLOUDSTACK-3042 - handle Scaling up of vm memory/CPU based on the presence of XS tools in the template
This also takes care of updation of VM after XS tools are installed in the vm and set memory values accordingly to support dynamic scaling after stop start of VM

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-20 11:08:38 +05:30
Edison Su
9aec9c605c merge to master 2013-06-19 18:16:47 -07:00
Prachi Damle
fb31a39efe CLOUDSTACK-2900: Ubuntu 13.04 - Migrate Virtual Router fail - Unable to find the VM by id=
Changes:
- Have to search the vm_instance table to find the instance
2013-06-17 16:59:32 -07:00
Hugo Trippaers
b0ea02e65a Allow DSA public keys.
DSA can't be used for encryption with the bouncycastle library, so make
sure this situation is properly handled.
2013-06-17 10:04:59 -07:00
Edison Su
f41c800d88 merge to master 2013-06-14 19:06:33 -07:00
Min Chen
18aeef3ef1 Merge branch 'master' (up to commit
c30d9be3cea30339cfff40c1002906634291b373) into object_store.
2013-06-12 11:20:32 -07:00
Wei Zhou
51a3a5a9b5 CLOUDSTACK-2945: ignore collect disk statistics if vm is not running on KVM or XenServer 2013-06-12 11:57:17 +02:00
Wei Zhou
d2e6bf5fa4 CLOUDSTACK-2865: fix error in prepareStop 2013-06-05 16:43:31 +02:00
Wei Zhou
15265479f6 CLOUDSTACK-2856: collectVmDiskStatistics before reboot/stop/migrate 2013-06-05 14:28:43 +02:00
Wei Zhou
b9b0168da4 CLOUDSTACK-1192: Add Disk I/O Statistics 2013-06-01 08:00:48 +02:00
Saksham Srivastava
17267794ad CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host. <Patch1>
This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.

1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
   Implemented 12 new APIs to dedicate/list/release resources:
   - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
   - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
   - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
   - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain)
5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
6. A VM can be deployed with the above affinity group parameter as an input.
7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
   This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or
   domain.
10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
11. To modify the dedication, the resource has to be released first.
12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
14. Added the right permissions in commands.properties
15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
16. Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
2013-05-30 01:07:01 -07:00
Saksham Srivastava
62413eec10 CLOUDSTACK-2130: Fix resource_name for old NIC ID
Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
2013-05-30 15:24:33 +08:00
Min Chen
e51adc3b7d CLOUDSTACK-2673: Failed to deploy guest vm using ISO with S3 being the
storage provider.
2013-05-29 15:47:39 -07:00
Nitin Mehta
8d1189c2ae CLOUDSTACK-2060
Global config to turn off dynamically scale vm functionality
2013-05-29 19:02:06 +05:30
Min Chen
6e55776795 CLOUDSTACK-2331: Failed to display exception object information in case of CloudRuntimeException. 2013-05-28 16:01:33 -07:00
Harikrishna Patnala
a34e577d1b CLOUDSTACK-1453: support restore for VM created from ISO
This is to support restore a vm to a new/currently_attached ISO.
In the restorevm API we have an optional parameter templateId to restore the vm to the new template/ISO ID.
2013-05-24 16:41:03 +05:30
Nitin Mehta
23baacba62 CLOUDSTACK-2669 - Adding resource limit and count logic for scale vm 2013-05-24 16:06:26 +05:30
Min Chen
98af424053 Merge branch 'master' into object_store. 2013-05-23 18:00:15 -07:00
Sheng Yang
92ad6abab0 PVLAN: Fix NPE when VM are in allocated state
If vlan is not assigned for VM, nic.getBroadcastUri() would be null. Then just
ignore it.
2013-05-21 14:51:35 -07:00
Sheng Yang
eb7c321426 PVLAN: CLOUDSTACK-2401: VM Migration support 2013-05-20 16:43:24 -07:00
Devdeep Singh
f5c8e386e5 CLOUDSTACK-2379: Fix for issue destroy vm causing NPE. Made the following changes.
1. Made a fix to make sure a null object is added to the exception.
2. Also fixed the marvin test cases for the feature. Account cleanup will remove the vms deployed for the account. There is no need to explicitly delete the vms for the account.
3. Fixed the assertion checks for the vm created for an account. If there are multiple vms for an account, the test script needs to compare the ids with the correct instance.
2013-05-20 18:26:50 +05:30
Prachi Damle
1851f7f7f6 CLOUDSTACK-2365: Anti-Affinity - As admin , we are allowed to deploy a Vm in an affinity group that belongs to different user.
CLOUDSTACK-2349: Anti-Affinity - As admin user , using updateVMAffinityGroup() , we are allowed to update the affinity group of a Vm (that belongs to a regular user) to be set to admin's affinity group.

Changes:
- Even for root-admin make sure that the affinity group and the VM belong to same account
2013-05-17 15:33:01 -07:00
Nitin Mehta
4eb310e926 iCLOUDSTACK-2321
Fix the response of scaleVMCmd
Add Scale System vm command
2013-05-17 17:43:43 +05:30
Edison Su
f7c1b711ad merge to master 2013-05-16 23:56:20 -07:00
Prachi Damle
a2eb7bab1e CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
- Changes merged from planner_reserve branch
- Exposing deploymentplanner as an optional parameter while creating a service offering
- changes to DeploymentPlanningManagerImpl to make sure host reserve-release happens between conflicting planner usages.
2013-05-16 15:02:17 -07:00
Vijayendra Bhamidipati
15be97772e PVLAN : Implementing PVLAN deployment capability for VMware deployments in cloudstack. 2013-05-16 14:50:16 -07:00