Commit 5936345
committed
VM ingestion feature allows CloudStack to discover, on-board, import existing VMs in an infra. The feature currently works only for VMware, with a hypervisor agnostic framework which may be extended for KVM and XenServer in future.
Two new APIs have been added, listUnmanagedInstances and importUnmanagedInstance.
listUnmanagedInstances
API will list all unmanaged virtual machine for a give cluster. Optionally, name for an existing unmanaged virtual machine can be given to retrieve VM details.
API request params -
clusterid(UUID of cluster)
name(instance name)
Response -
clusterid
hostid
name
osdisplayname
memory
powerstate
cpuCoresPerSocket
cpunumber
cpuspeed
disk
- id
- capacity
- controller
- controllerunit
- imagepath
- position
nic
- id
- macaddress
- networkname
- vlanid
- pcislot
- ipaddress
importUnmanagedInstance
API will import an exisitng unmanaged virtual machine into CloudStack for a given cluster and virtual machine name. Service offering for the VM, disk offerings for volumes and networks for NICs of the VM can be mapped. Some optional parameters like projectid, domainid, hostname, details, etc can also be given. Appropritate networks, service offering and disk offerings need to be present before import and cannot be created on the fly during the API call.
API request params -
clusterid(UUID of cluster)
name(instance name)
displayname
hostname
domainid
projectid
templateid
serviceofferingid
diskofferingid(UUID of disk offering for root disk)
nicnetworklist(Map for NIC ID and corresponding Network UUID)
nicipaddresslist(Map for NIC ID and corresponding IP address)
datadiskofferinglist(Map for disk ID and corresponding disk offering UUID)
details(Map for VM details)
Response -
Same response as that of deployVirtualMachine API
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>1 parent 8170ec5 commit 5936345
File tree
27 files changed
+2607
-286
lines changed- api/src/main/java
- com/cloud
- event
- vm
- org/apache/cloudstack
- api
- command/admin/ingestion
- response
- vm
- core/src/main/java/com/cloud/agent/api
- engine
- api/src/main/java/org/apache/cloudstack/engine/orchestration/service
- orchestration/src/main/java/org/apache/cloudstack/engine/orchestration
- plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource
- server/src
- main
- java
- com/cloud/vm
- org/apache/cloudstack/vm
- resources/META-INF/cloudstack/server-compute
- test/java
- com/cloud/vpc
- org/apache/cloudstack/vm
- tools/apidoc
- vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo
27 files changed
+2607
-286
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| 599 | + | |
597 | 600 | | |
598 | 601 | | |
599 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
516 | 520 | | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| 177 | + | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
| |||
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
225 | 234 | | |
226 | 235 | | |
227 | 236 | | |
| |||
253 | 262 | | |
254 | 263 | | |
255 | 264 | | |
| 265 | + | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
| |||
0 commit comments