769 Commits

Author SHA1 Message Date
venkataswamybabu budumuru
fe506d9b68 CLOUDSTACK-2642: [XenServer] Add support for XenServer 6.2.0
Currently XcpServerDiscoverer.java is only allowing till XenServer 6.1.0. Added
code to support XenServer 6.2.0. Also, added support to allow the RC build
of XenSever 6.2.0.

Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-12 15:11:50 +05:30
Wei Zhou
ecbce6a67f fix disk IO requests display error 2013-06-10 23:11:48 +02:00
Jayapal
673b293d75 CLOUDSTACK-2761 Fixed PF/StaticNAT in vmware vpc
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-10 11:04:01 +05:30
Sateesh Chodapuneedi
58b57ca5db CLOUDSTACK-2805 [VMware] addVmwareDc fails with NPE when non-existent DC name is passed to the API
Made vcenter as required parameter to addVmwareDc API.
Removed stale parameter url from addVmwareDc API.
Improved Exception handling, logging remote exception details.
2013-06-06 15:33:10 +05:30
Sateesh Chodapuneedi
3ec7f8b99e CLOUDSTACK-2867 Cannot add multiple vmware zones in vCenter
Checking guid in database, if association of DC to zone exists already.
2013-06-06 14:33:05 +05:30
Koushik Das
9f18f1cb1c CLOUDSTACK-2812: Static NAT rules are created with same name and Destination IP Pool for each Public IP with which only one instance is reachable with both Static NATed IP's
For static NAT rule an IP pool gets created in VNMC. In order to make the pool name unique the rule id is appended. Since static NAT rules are not stored in CS db. like PF/FW rules, the id was always set to 0.
As a result the pool was always getting overridden everytime a static NAT rule is created. Fixed it by appending the public IP address id along with a character indicating that the pool is used for static NAT rule to the pool name.
2013-06-05 15:41:36 +05:30
Prasanna Santhanam
f321acd06d Provide mock implementations of VPC network commands
Provide mock implementations for all network commands in the
MockNetworkManagerImpl of the simualtor

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:47:31 +05:30
Prasanna Santhanam
da6f39b782 PlugNic and UnplugNic both call the method getVmName
Renaming the method in the command objects to be uniform with
PlugNicCommand/UnplugNicCommand.getVmName

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:37:42 +05:30
Prasanna Santhanam
5bfe2f99d7 Enable the bean for network manager
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:37:41 +05:30
Prasanna Santhanam
b2dccf618f Removing unused simulator component library
And the components-simulator.xml configuration. Both are unused as we
use Spring injection now.

Remove unused rebootVM method

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:37:29 +05:30
Prasanna Santhanam
956a5967dd Pulling out Network operations into a separate manager
Network operations like VM, host and storage are pulled into a separate
managaer for simulator.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:23:07 +05:30
Murali Reddy
6a92f3b8ac CLOUDSTACK-2741: [GSLB] GSLB service doesn't come up if the LB rule
mapped to it is serviced by VR

For remote LB services that are not running on NetScaler, there needs to
be a LB monitor bound to GSLB service. Otherwise service is shown down.
This fix binds a LB monitor with GSLB services.
2013-06-05 12:10:36 +05:30
Alena Prokharchyk
90df4e4df0 CLOUDSTACK-2840: get the latest information from the DB about the number of rules in non-revoked state for the ip address when figuring out if the internal lb vm needs to be destroyed. Instead of relying on the information passed down by the NetworkManager as the network manager might pass only rules in transition state omitting the Active rules 2013-06-04 14:41:23 -07:00
Edison Su
5435495e18 fix build 2013-06-04 13:54:43 -07:00
Marcus Sorensen
ddfdc9af63 KVM - Don't fail to start due to old VM definition. On rare occasion we see
inactive VM definitions block a new VM starting. Definitions aren't supposed to
be persistent, but sometimes a crash or failed migration can leave behind a
definition.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1370299734 -0600
2013-06-03 16:48:54 -06:00
Prasanna Santhanam
767ed065c5 CLOUDSTACK-2815: Include dedication in simulator context
SimulatoComponentContext need sto include the dedicated resource manager
to see the commands/apis exposed by it.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-03 21:51:18 +05:30
Bharat Kumar
48913679e8 CLOUDSTACK-2648 [Multiple_IP_Ranges] Reboot or start/stop router vm deletes the ip alises created on VR in case of multiple subnets
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-03 19:22:27 +05:30
Sateesh Chodapuneedi
a0372ccd17 Setting object name in response object. 2013-06-03 17:18:16 +05:30
Prasanna Santhanam
2f51bcf2a8 CLOUDSTACK-2815: org.apache.cloudstack.dedicated.* to org.apache.cloudstack
Moving the package one level up so API discovery can discovery APIs from
org.apache.cloudstack.api.* This also keeps the plugin uniform with the
other plugins which have their APIs in org.apache.cloudstack.api
namespace.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-03 16:21:47 +05:30
Wei Zhou
f714d26039 Revert "CLOUDSTACK-1301: Add VM Disk I/O Throttling"
This reverts commit 6dad8adf8fc22417f0242126b8f52ee081f74f49.
2013-06-03 07:48:03 +02:00
Wei Zhou
6dad8adf8f CLOUDSTACK-1301: Add VM Disk I/O Throttling 2013-06-01 08:03:02 +02:00
Wei Zhou
b9b0168da4 CLOUDSTACK-1192: Add Disk I/O Statistics 2013-06-01 08:00:48 +02:00
Sateesh Chodapuneedi
7998413f48 CLOUDSTACK-2029 zone wide primary storage support for cloudstack over vmware deployments
Added hypervisor type to CreateStoragePoolCmd & Storage pool responses.
DatastoreLifeCycle would consider hypervisor type while attaching datastore to zone.
ZoneWideStoragePoolAllocator would filter zone wide primary storage pools by hypervisor type along with tags in disk profile.
hypervisor type is mandatory parameter if scope is specified as ZONE while creating primary storage pool.
As of now KVM, VMware are allowed to use ZoneWideStoragePoolAllocator.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-06-01 00:05:27 +05:30
Sateesh Chodapuneedi
51996094ff CLOUDSTACK-2701 - Enable storage migration for VMware resources
Whitespace cleanup

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

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Removing injections which are not required in Vmware Manager
2013-06-01 00:01:03 +05:30
Sateesh Chodapuneedi
f24e81fe0d CLOUDSTACK-659 Support for storage migration in Cloudstack deployment over VMware Added VmwareStorageMotionStrategy to deal with storage motion tasks. Added target host parameter to MigrateWithStorageCommand.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware

Added VmwareStorageMotionStrategy to application context.

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

Support for volume live migration across datastores

Unit tests for vmware storage motion. These test the VmwareStorageMotionStrategy.

CLOUDSTACK-659

Fixing migrate volume.

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

Support for volume live migration across datastores

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

Support for volume live migration across datastores

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

Support for volume live migration across datastores

Added vm type to prepareNetworkFromNicInfo in MigrateWithStorageCommand implementation.

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Fixing attach volume and delete volume cases for volumes that are moved off original path in datastore when created.
If volume is not found in root directory or datastore, do search in sub folders.

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Sending command MigrateWithStorageCommand to source host instead of target host for the case of migration of VM within cluster.

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Searching for virtual disk during device tear down.

Adding dependency of 'cloud-engine-storage' to vmware hypervisor plugin.

Add hypervisor capability storage_motion_supported for VMware 5.0 and 5.1

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware
Added VmwareStorageMotionStrategy to deal with storage motion tasks.
Added target host parameter to MigrateWithStorageCommand.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware

Added VmwareStorageMotionStrategy to application context.

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

Support for volume live migration across datastores

Unit tests for vmware storage motion. These test the VmwareStorageMotionStrategy.

CLOUDSTACK-659

Fixing migrate volume.

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

Support for volume live migration across datastores

Added vm type to prepareNetworkFromNicInfo in MigrateWithStorageCommand implementation.

Adding dependency of 'cloud-engine-storage' to vmware hypervisor plugin.

Add hypervisor capability storage_motion_supported for VMware 5.0 and 5.1

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware
Added VmwareStorageMotionStrategy to deal with storage motion tasks.
Added target host parameter to MigrateWithStorageCommand.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware

Added VmwareStorageMotionStrategy to application context.

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

Support for volume live migration across datastores

Unit tests for vmware storage motion. These test the VmwareStorageMotionStrategy.

CLOUDSTACK-659

Fixing migrate volume.

Adding dependency of 'cloud-engine-storage' to vmware hypervisor plugin.

Add hypervisor capability storage_motion_supported for VMware 5.0 and 5.1

Adding dependency of 'cloud-engine-storage' to vmware hypervisor plugin.

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware
Added VmwareStorageMotionStrategy to deal with storage motion tasks.
Added target host parameter to MigrateWithStorageCommand.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware Added
Resource changes to perform VM live migration along with virtual disks across the clusters in a zone.

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

CLOUDSTACK-659
Support for storage migration in Cloudstack deployment over VMware

Added VmwareStorageMotionStrategy to application context.

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

Support for volume live migration across datastores

CLOUDSTACK-659

Fixing migrate volume.

Unit tests for vmware storage motion. These test the VmwareStorageMotionStrategy.

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Sending command MigrateWithStorageCommand to source host instead of target host for the case of migration of VM within cluster.

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Moved 2 methods that are not specific to VMware but Volume are moved to VolumeManager from VmwareManager.
Moved datastore volume path constructing code to separate method.
Added check for source and target host, if they are from different DCs/vCenter instances.

Updated error message & removed stale comment

CLOUDSTACK-2701 - Enable storage migration for VMware resources

Injecting component VolumeManager into VmwareResource.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 21:19:28 +05:30
Sateesh Chodapuneedi
f5f00ee0ea Adding dependency of 'cloud-engine-storage' to vmware hypervisor plugin.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 21:19:27 +05:30
Sateesh Chodapuneedi
08afeb49d7 Temporarily disabling some of the tests that are failing. 2013-05-31 17:56:33 +05:30
Sateesh Chodapuneedi
55b3e69733 Added check for legacy zones. Improved log statements.
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 13:33:46 +05:30
Sateesh Chodapuneedi
4b67b1d36a CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter
Unit tests to test functionality of the feature.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 13:33:46 +05:30
Sateesh Chodapuneedi
1f790e615a CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter
Introduced 2 new API command classes AddVmwareDcCmd & RemoveVmwareDcCmd.
The new APIs are addVmwareDc & removeVmwareDc, these APIs will associate a Vmware datacenter to a cloudstack zone & dis-associate a Vmware datacenter from a cloudstack zone.
Constraint checks are added for infrastructure change operations in zone that encompass resources like clusters.
Constraint checks are added in discoverer and manager classes.
Added a service 'VmwareDatacenterService' to expose methods that will have API implementation for 2 APIs addVmwareDc & removeVmwareDc

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 13:33:45 +05:30
Sateesh Chodapuneedi
6cd87d2e21 CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter
Support for DB changes for Vmware datacenter objects
Support for DB changes to store mapping with CloudStack zones.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-31 13:33:45 +05:30
Rajesh Battala
af4177b86c Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.
Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
2013-05-31 00:28:56 -07:00
Nitin Mehta
0a5e3fa607 CLOUDSTACK-2060
Global config to turn off dynamically scale vm functionality
2013-05-30 15:11:08 +05:30
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
Sateesh Chodapuneedi
4b9b475336 Add method getVolumeRelativeDirInSecStroage to fix compile error. 2013-05-30 11:23:12 +05:30
Anthony Xu
ddba994a97 unitNumber is per adapter/controller not per VM in wmware, after this patch, you can plug in up to 10 NICs to vmware VM 2013-05-29 15:57:25 -07:00
Anthony Xu
a91f04e759 migrate volume in Vmware leaves a copy of this volume untracked in secondary storage,
this patch removes the volume in secondary storag after volume migration
2013-05-29 14:11:57 -07:00
Nitin Mehta
8d1189c2ae CLOUDSTACK-2060
Global config to turn off dynamically scale vm functionality
2013-05-29 19:02:06 +05:30
Koushik Das
84d904abf2 CLOUDSTACK-2719: Additional public IP is getting acquired during Cisco VNMc provider Guest Network restart (cleanup=true)
An extra public ip is acquired while implementing the vnmc element as there is a limitation where in the source nat cannot be used as asa outside ip.
As a result of this when the network gets re-implemented an additional ip is acquired every time. The fix involves checking for existing public ips
in the network and reuse it in case it is not a source nat ip for assigning to asa outside interface.
2013-05-29 14:20:21 +05:30
Hiroaki KAWAI
cfd8056c14 remove a call path that cause NullPointerException
QemuImg.convert expects the arguments not null.
2013-05-28 20:54:01 +09:00
Wido den Hollander
322db71eed agent: Only probe running VMs for the current Hypervisor Type
Otherwise we try to probe for LXC VMs on a KVM hypervisor and vise versa.
2013-05-26 11:38:41 +02:00
Prasanna Santhanam
5b902c7005 CLOUDSTACK-2683: DevCloud systemVMs fail to launch
DevCloud is a XCP Kronos based xen. For this we use the XcpOssResource
whose memory limits were not set explicitly. Instead the base
CitrixResourceBase would set the limits. static_min was set to 128MB
failing the cpvm and ssvm start fails whose offerings have 100MB set to
the max limits.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-26 14:49:52 +05:30
Wido den Hollander
bef3a2edb7 CLOUDSTACK-1191: rbd: Use cloning for deploying templates instead of a copy
RBD format 2 supports cloning (aka layering) where one base image can serve
as a parent image for multiple child images.

This enables fast deployment of a large amount of virtual machines, but it also
saves spaces on the Ceph cluster and improves performance due to better caching.

Qemu-img doesn't support RBD format 2 (yet), so to enable these functions the
RADOS/RBD Java bindings are required.

This patch also enables deployment of System VMs on RBD storage pools. Since we
no longer require a patchdisk for passing the boot arguments we are able to deploy
these VMs on RBD.
2013-05-24 16:00:08 +02:00
Jayapal
d8f5f2ea10 CLOUDSTACK-2671 Updated vpc private gateway scipt args 2013-05-24 18:54:04 +05:30
Jayapal
704471e6de CLOUDSTACK-2386 Fixed srx firewall icmp rule
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-05-24 10:30:12 +05:30
Marcus Sorensen
fce59b8fc4 Summary: Code cleanup for KVM - look up domains by name rather than coversion
Detail: We do two strange things, #1, when a vm is created, we create the uuid
for the domain by converting the name into a uuid, then subsequently, any time
we look for a domain, we convert its name to a uuid and domainLookupByUUID. This
is an unnecessary obfuscation, so instead we just do a domainLookupByName. As
a bonus, we are now setting the domain's uuid to be the cloudstack uuid. It is
no longer used anywhere, but will be less confusing to admins. This shouldn't
affect upgrades, since we can always lookup existing VMs by name.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1369287049 -0600
2013-05-22 23:30:49 -06:00
Marcus Sorensen
795fd803da Summary: KVM - double migration can fail
Detail: Undefine VM after migration. Lingering domain definitions cause
migrations back to the original host to fail, since domain already exists.

BUG-ID: CLOUDSTACK-2640
Bugfix-for: 4.1.0,4.2.0
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1369285950 -0600
2013-05-22 23:12:30 -06:00
Likitha Shetty
5b80af0cda Add missing license headers 2013-05-22 18:17:11 +05:30
Devdeep Singh
85ff507094 CLOUDSTACK-2602. XenServer storage motion strategy returns true for canHandle even though hosts are of different hypervisor type. Fixed the canHandle routine to return true only if source and destination hosts are of type XenServer. 2013-05-22 17:47:11 +05:30
Murali Reddy
62d320454a CLOUDSTACK-2360: listnetscalerloadbalancerresponse is not including any
information about GSLB status

adds the infomration if NetScaler is provisioned as GSLB service
provider
2013-05-22 16:26:46 +05:30