17 Commits

Author SHA1 Message Date
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
Alex Huang
b92fc074aa added forced paramter to stop apis 2011-02-08 15:38:26 -08:00
Murali Reddy
86398a8546 bug 8290: Instance Limit set at account level however was able to create more vms than limit
adding additional exception handling
2011-02-02 02:40:26 -08:00
alena
0e4196448a bug 7811: Start domR/Dhcp if it's not running when do userVmReboot
status 7811: resolved fixed

Other fixes:
* vmExpunge: cleanup LB/PF rules after vm was marked as Expunging in the DB to avoid the situation when user recovers a vm in the middle of expunge job.
2011-01-24 17:04:23 -08:00
abhishek
7c2fffe67a bug 7989: fixing this regression
status 7989: resolved fixed
2011-01-13 17:07:03 -08:00
kishan
ce3c794bd3 bug 6916: check for removed account for ListVMs. Moved realated code to userVm Manager
status 6916: resolved fixed
2011-01-04 13:07:49 +05:30
anthony
68727778ba bug 7620: this is caused by delayed volume creation,
doesn't make sence to create a template on empty volume, just don't allow it

status 7620: resolved fixed
2010-12-28 14:00:51 -08:00
anthony
dcb40b5b15 Revert "add new api SetVMOSTypeCmd"
This reverts commit 543b2615db627b108867cbdba59a4d0f04b01895.

Conflicts:

	api/src/com/cloud/api/commands/SetVMOSTypeCmd.java
2010-12-09 23:38:52 -08:00
anthony
543b2615db add new api SetVMOSTypeCmd
user can update to PV kernel or HVM kernel as they want,
2010-12-06 15:57:18 -08:00
Alex Huang
16cccf4f59 ip address modifications. removed old deploy 2010-12-04 17:32:32 -08:00
Alex Huang
1e44925564 api refactoring 2010-11-21 12:00:21 -08:00