60 Commits

Author SHA1 Message Date
Prachi Damle
fe2a86871f Changes to add AffinityGroupprocessor, deployVM changes 2013-04-11 13:22:42 -07:00
Nitin Mehta
3e4430d811 CLOUDSTACK-658 - Scaleup vm support for Xenserver
Added the framweork so that it can be extended for vmware and kvm as well.
Added unitests and marvin tests.
2013-03-28 16:43:37 +05:30
Sanjay Tripathi
105618896b CLOUDSTACK-1645 : Resources limit is not validated with update compute offering [ Instances are updated to higher CPU/Memory resources though there are no resources available @ account/domain] 2013-03-14 13:44:34 -07:00
Nitin Mehta
b12aebefee Revert "CLOUDSTACK-658 - Adding Scalevm command and XS related changes"
This reverts commit e0019eccd997d9b2b3ff9395bcd99f821f5121db.
2013-03-04 23:32:52 +05:30
Nitin Mehta
e0019eccd9 CLOUDSTACK-658 - Adding Scalevm command and XS related changes 2013-03-04 14:47:55 +05:30
Edison Su
a22403edcd squash changes into one giant patch 2013-02-21 11:22:48 -08:00
Kelven Yang
7bd8bec68a Sync javelin with master up to 894cb8f7d9fc8b5561754a9fa541fef8f235148a 2013-01-31 17:20:19 -08:00
Sheng Yang
5cb9df91a1 Merge branch 'ipv6'
Conflicts:
	api/src/com/cloud/network/NetworkProfile.java
2013-01-31 15:07:33 -08:00
Kelven Yang
1b2b369ecb Merge latest master into javelin 2013-01-31 11:34:49 -08:00
Harikrishna Patnala
b21595c10d CLOUDSTACK-297: Reset SSH key to access VM
This feature provides resetting a SSH key for an existing VM which means,
setting the old ssh key that is assigned to the VM previously with the new ssh
key.

Signed-off-by: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-30 17:33:44 -08:00
Marcus Sorensen
15906c03ca Summary: add/remove/update default nics feature
Description: Adds API calls updateDefaultNicForVirtualMachine,
addNicToVirtualMachine, and removeNicFromVirtualMachine. These are
intended to allow a user to modify a VM's configuration post
deployment, to adjust the networks to which the VM belongs.

BUG-ID: CLOUDSTACK-645
Submitted-by: Brian Angus <blangus@betterservers.com>
Submitted-by: Ryan Dietrich <ryan@betterservers.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1359494800 -0700
2013-01-30 17:43:21 -07:00
Sheng Yang
2cbca372bf IPv6: Add support for IPv6 on DeployVMCmd 2013-01-28 18:54:34 -08:00
Alex Huang
fe6f0457d5 fixed unit tests from merge 2013-01-18 15:58:55 -08:00
Min Chen
c167ad45e3 Move view based VO and Dao classes to cloud-server module to hide the
details from API client, also extract query related methods into
QueryService interface.
2012-12-14 10:47:58 -08:00
Rohit Yadav
e398b1e47a api: Refactor command and response classes to org.apache.cloudstack.api.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 19:23:24 -08:00
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Min Chen
b0ce8fd4ff api: Optimize and improve api, db call perfomance
This is part 1 of list API refactoring. Commands covered:
listVmsCmd, listRoutersCmd Response covered:
UserVmResponse, DomainRouterResponse. DB views created:
user_vm_view, domain_router_view.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-05 20:06:20 -08:00
Rohit Yadav
8773fc2a55 api_refactor: refactor volume apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-04 11:20:48 -08:00
Rohit Yadav
46353e0916 api_refactor: refactor vmgroup apis
- Fix refactored apis, fix mappings in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:35:30 -08:00
Rohit Yadav
3e0b2164be api_refactor: refactor template apis
- Fix refactored apis, fix mapping in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:05:44 -08:00
Rohit Yadav
5e0501d116 api_refactor: refactor project apis
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace
- Fix trailing whitespaces for all *.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 22:10:32 -08:00
Rohit Yadav
6fc3bc3760 api_refactor: refactor vpn and vm apis
- Refactor VPN and VM APIs to admin and user pkgs
- Names space, org.apache.cloudstack
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 21:27:02 -08:00
Rohit Yadav
4c86b1545d CLOUDSTACK-424: Update userdata should propagate to VR
The code that would propage userdata to router, when updateVirtualMachine api
is called, was missing. As per the docs [0], userdata should be a base64 encoded
string upto 2KB which is put on domr's html directory adn using HTTP GET the
userdata information can be obtained from the domr.

The updateVirtualMachine api [0] would accept a base64 encoded string
and decoded and put into the domr's /var/www/html/userdata/<uservm ip>/user-data
file. The operation does not require the VM to be in stopped state, though it is
advised to stop and call this api in case the user vm has a script which gets
the userdata information from domr while starting.

For example, this script can be used to fetch the data:
server_ip=$(grep dhcp-server-identifier /var/lib/dhclient-eth0.leases | tail -1 | awk '{print $NF}' | tr '\;' ' ')
wget http://${server_ip}/latest/user-data

This feature can be useful, for example to use into puppet facts [1], or to do
automation and horizontal scaling etc. based on userdata.

[0] http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/domain_admin/updateVirtualMachine.html
[1] http://geek.jasonhancock.com/2011/11/09/cloudstack-userdata-into-puppet-facts/

BUG-ID : CLOUDSTACK-424
Reviewed-by: Rohit Yadav <bhaisaab@apache.org>
Reported-by: Nick Wales

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-15 18:43:51 +05:30
Alena Prokharchyk
8f2d9a09e5 CLOUDSTACK-332: intermediate checkin fixing count parameter in listCommands
Fixes the count in commands:

listVolumes
listVirtualMachines
listSnapshots
listRouters
listFirewallRules
listPortForwardingRules
listLoadBalancerRules
listIpForwardingRules
listAccounts
listUsers
listDomains
listDomainChildren
listPublicIpAddresses
listAlerts
listAsyncJobs
listRemoteAccessVpns
listVpnUsers
listTags
listPrivateGateways
listNetworkACLs
listStaticRoutes

Conflicts:

	api/src/com/cloud/api/commands/ListVMsCmd.java
	api/src/com/cloud/api/commands/ListVolumesCmd.java
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	server/src/com/cloud/network/firewall/FirewallManagerImpl.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/tags/TaggedResourceManagerImpl.java
2012-10-12 13:58:59 -07:00
Alena Prokharchyk
d9fd7e02a5 Plug nic support
Conflicts:

	server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
	server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
2012-06-15 14:07:46 -07:00
David Nalley
c15948a3ef committing Chip Childers patches fixing licensing headers
Applying to the following directories:
* api
* deamonize
* agnet
* agent-simulator
* cloud-cli
2012-06-12 12:32:58 -04:00
Alena Prokharchyk
2d1a6b0b35 bug 14615: deployVm can work 2 diff ways now: 1) Default way - create and start the vm. 2) Create the vm without starting it. Note that vm's volumes stay in Allocated state -not created on the backend till the point where vm starts
status 14615: resolved fixed
2012-04-06 11:30:48 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
prachi
5148145d18 Bug 14028 - Add hostid parameter to StartVmCmd to enable admins to start VM on a particular host
Changes:
- Added hostid to StartVMCmd. Only root admin can use it.
2012-03-05 17:50:23 -08:00
Alena Prokharchyk
3a87cf8331 Code style fixes for API package 2012-02-03 14:25:26 -08:00
Alena Prokharchyk
ceb0a918a1 createTemplate/createSnapshot for project - allow to execute for Projects in Active state only 2011-12-19 16:20:40 -08:00
Abhinandan Prateek
abb37acbdd bug 8962: added usage related and resource count related code, changed the API name as suggested. Incorporated relevant review comments 2011-10-31 16:35:42 +05:30
root
a572205e3c Revert "bug 11311: vm summary command initial impl"
This reverts commit 0abc7e2ea8b9e222f1927aea72d46240bfe8c534.
2011-10-30 15:13:58 +05:30
Abhinandan Prateek
f456462443 bug 11311: vm summary command initial impl 2011-10-28 14:07:19 +05:30
frank
1460f3950e Bug 9949 - revert VM to template
1. able to restore VM from its original template
2. Only allow to restore when VM is running or stopped
3. after restoring, VM state will not change, e.g. running is still running

status 9949: resolved fixed
2011-10-25 13:52:39 -07:00
Edison Su
92eaf49f29 Add storage migration 2011-10-24 15:59:47 -07:00
prachi
9bd5e5871b Bug 11481 - get manual live migration working with all VMs
Changes:
- Added a new API  'migrateSystemVm'  backed by MigrateSystemVMCmd.java to migrate system VMs (SSVM, consoleproxy, domain routers(router, LB, DHCP))
- This is Admin only action
- The existing API 'migratevirtualmachine' is only for user VMs
2011-09-29 17:47:46 -07:00
Kelven Yang
d10c8e2a1d bug 10765: fix step 2 - programming VNC server to let it chose the right keyboard mapping to load into 2011-08-04 18:30:50 -07:00
alena
d380ce0897 bug 4706: added one more parameter - "ipaddress" to deployVm api. This parameter will apply to default network of vm
status 4706: resolved fixed
2011-06-23 11:31:39 -07:00
alena
4fcb406f2b bug 4706: allow to specify which ip address from the network to take when do vm deployment. The model is supported for multiple network case as well.
status 4706: resolved fixed
2011-06-21 16:41:43 -07:00
Abhinandan Prateek
8e4ec4ce09 bug 8962: moving vm from one account to other 2011-06-09 15:02:47 +05:30
prachi
9aba817256 Bug 9652: Need to provide a way to specify deployment plan during VM start
Changes:
- Added a new parameter to pass in deployment plan during vm start
- If a hostId is passed in to the DeployVMCmd (only allowed for a root admin to test a host), a plan is passed in to start the vm in that host's datacenter, pod and cluster and on that host
- If a plan is passed in during start, but if the VM's root volume is READY, then plan of the root volume takes precedence. In that case the plan passed in is not used.
2011-05-04 15:02:52 -07:00
alena
1a6d78eae4 Code cleanup. No need to declare runtime exceptions (CloudRuntimeException, InvalidParameterException, PermissionDenied exceptions) 2011-04-21 16:26:53 -07:00
prachi
53f8ebf6f0 Bug 9043 - VM manual migration - when destination host is out of memory for migration, VMs being migrated remained in 'migrating' state
Changes:
- When migration fails we try to do cleanup on the destination host agent. The AgentUnavailableException in this cleanup was not caught.
-Due to that other cleanup like reverting capacity allocated and vm state were skipped.
-Fix is to catch the AgentUnavailableException so that rest of the cleanup can happen.
- Also corrected the exceptions in various cases of migration failure.
- In case the VM is still starting, HA should schedule a retry. Introduced a special migration exception for handling this.
2011-04-04 17:30:08 -07:00
prachi
923f562aa8 Bug 6873: disable/enable mode for clusters (and pods and zones and hosts)
- Added a new flag 'allocation_state' to zone,pod,cluster and host
- The possible values for this flag are 'Enabled' or 'Disabled'
- When a new zone,pod,cluster or host is added, allocation_state is 'Disabled' by default.
- For existing zone,pod,cluster or host, the state is 'Enabled'.
- All Add/Update/List  commands for each of zone,pod,cluster or host can now take a new parameter 'allocationstate'
- If 'allocation_state' is 'Disabled', Allocators skip that zone or pod or cluster or pod.
- For a root admin, ListZones lists all zones including the 'Disabled' zones. But for any other user, the 'Disabled' zones are not included in the response.
- For any usecase that creates/deploys/adds/registers a resource and takes in zone as parameter, now we check if the Zone is 'Disabled'. If yes then the operation cannot be performed by a user other than root-admin. Add volume, snapshot, templates are examples of this usecase.
- To enable the root admin to test a particular pod/cluster/host, deployVM command takes in 'host_id' parameter that can be passed in only by root admin.
If this parameter is passed in by the admin, allocators do not search for hosts and use that host only. StoragePools are searched in the cluster of that host.
If VM cannot be deployed to that host, allocators and deployVM fails without retrying
2011-03-23 22:15:35 -07:00
prachi
ed9a11c6b6 API changes for Bug 3316 - Manual live migration of Virtual Machines
This is a Root admin only functionality
---------------------
Service API changes:
---------------------
- ManagementServer  will expose new API:
   Pair<List<HostVO>, List<Long>> listHostsForMigrationOfVM(UserVm vm, Long
startIndex, Long pageSize)
The API returns list of all hosts in the VM's cluster minus the current host and also a list of hostIds that seem to have enough CPU and RAM capacity to host this VM.
- ListHostsCmd will call this service API if virtualmachineid is present in the request.
- MigrateVmCmd is the new command added that takes in virtualmachineid and destination hostid
- UserVmService  will expose a new API:  UserVm migrateVirtualMachine(UserVm vm, Host destinationHost)

------------------------------------
API throws error in following cases:
------------------------------------
- User is not a root Admin. (‘Permission denied’)
- A VM uses local storage, we cannot migrate it, so ‘listHosts’ will throw error.
- We fail to migrate the VM on the chosen host.
- API will support migration for XenServer only currently. So error is thrown
if hypervisor is not XenServer (e.g KVM, vSphere etc)
- Destination host is not in same cluster as source host.
- VM is not in running state
2011-03-11 17:49:53 -08:00
Frank
6c819c1491 Merge branch 'bareMetal'
Conflicts:
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/commands/DeployVMCmd.java
	api/src/com/cloud/offering/ServiceOffering.java
	api/src/com/cloud/vm/UserVmService.java
	client/tomcatconf/components.xml.in
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/deploy/FirstFitPlanner.java
	server/src/com/cloud/service/ServiceOfferingVO.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
2011-03-08 14:18:11 -08:00
alena
715a929e91 Separate createVm methods for 1) vm in Basic zone 2) Vm with SecurityGroup in Advanced zone 3) Vm without SecurityGroup in AdvancedZone 2011-03-03 16:13:00 -08:00
Frank
35b7c26689 Bug 8208 - bare metal provisioning
able to start, stop, reboot, destroy VM
2011-03-01 11:40:40 -08:00
nit
3bd3dacf9e bug 8493: Check for resource limit for create template from volume/snapshot. 2011-02-09 15:49:32 +05:30