A look at some new CloudStack features around VM deployment and configuration. These new features include: more sophisticated options for specifying pod and cluster while deploying a VM; running and retrieving diagnostics on the VR; sending additional configuration to VMs; and adding options to cleanup additional data disks when destroying a VM.
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Boris Stoyanov - some new features in Apache cloudStack
1. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
C S E U U s e r G r o u p
Some new goodies in
2. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
About Me
• Break Stuff @ ShapeBlue
• Background:
• More than 10 years in Software
Development and Testing
• Specialize in:
• Test Management
• Automated Testing
• Testing Frameworks
• Joined ShapeBlue and CloudStack 2016
• Committer since 2018
3. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
N e w F e a t u r e s
• Deployment heuristics
• Additional configuration data
• Cleaning up data disks after destroying a VM
• Run diagnostics on SystemVM
• Get diagnostics data on SystemVM
4. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
D e p l o y m e n t h e u r i s t i c s
What’s that and why do I need it?
• Easy way to override current allocation logic directly
5. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
D e p l o y m e n t h e u r i s t i c s - W h a t ’ s t h a t a n d w h y d o I n e e d i t ?
deployVirtualMachine() API
• Host
• Affinity group
• Project
• Account and domain
• Service offering
• Deployment planner
• Pod
• Cluster
6. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
D e p l o y m e n t h e u r i s t i c s – H o w t o u s e i ?
How to use it?
• UI
• API
deploy/start virtualmachine
…
podid=[id] clusterid=[id]
7. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
D e p l o y m e n t h e u r i s t i c s
Demo
8. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
A d d i t i o n a l c o n f i g u r a t i o n d a t a f o r V M s
Adding extra configuration to a VM
• KVM – domain xml
• XenServer – Using XAPI and vm-param-set key/value
argument
• Vmware – any additional configuration is parsed and
appended to the VMX file
9. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
A d d i t i o n a l c o n f i g u r a t i o n d a t a f o r V M s - h o w t o u s e i t ?
How to use it?
Available in deploy and update virtual machine
update virtualmachine … extraconfig=[url-encoded-settings]
deploy virtualmachine … extraconfig=[url-encoded-settings]
10. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
A d d i t i o n a l c o n f i g u r a t i o n d a t a f o r V M s – S p e c i f i c s
Adding extra configuration to a VM
• Supported for KVM, Vmware and XenServer
• enable.additional.vm.configuration
• allow.additional.vm.configuration.list.[hypervisor]
• It would require a VM restart to apply new settings
• Settings being passed needs to be URL encoded
11. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
A d d i t i o n a l c o n f i g u r a t i o n d a t a f o r V M s
Demo – Virtual machine running on KVM
<memoryBacking>
<hugepages />
</memoryBacking >
URL encrypted:
%3CmemoryBacking%3E%0D%0A++%3Chugepages%
2F%3E%0D%0A%3C%2FmemoryBacking%3E
12. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
C l e a n u p d a t a d i s k s w h e n d e s t r o y i n g a V M
Adding the option to delete data disks when
destroying
13. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
C l e a n u p d a t a d i s k s w h e n d e s t r o y i n g a V M
How to use it?
UI and API
destroy virtualmachine … volumeids=[ids]
14. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
C l e a n u p d a t a d i s k s w h e n d e s t r o y i n g a V M - H o w i t w o r k s ?
15. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
C l e a n u p d a t a d i s k s w h e n d e s t r o y i n g a V M - H o w i t w o r k s ?
Demo
16. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
R u n D i a g n o s t i c s
• Allows the admin to troubleshoot connectivity
from a SystemVM
• Admin can execute {ping, traceroute and arping}
from given system VM to any target address.
17. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
R u n D i a g n o s t i c s – h o w t o u s e i t
• UI and API
• run diagnostics ipaddress=[google.com] targetid=[ssvm-id]
params[] type=[ping]
18. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
R u n D i a g n o s t i c s – h o w t o u s e i t
Demo
19. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
G e t D i a g n o s t i c s D a t a
What it is?
• Easy way to execute scripts on SystemVMs or
retrieve files from them
20. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
G e t D i a g n o s t i c s D a t a - H o w i t w o r k s
Global setting which contains list of files to gather
• VR – ‘diagnostics.data.vr.defaults’
“IPTABLES], [IFCONFIG], [ROUTE], /etc/dnsmasq.conf, /etc/resolv.conf, /etc/haproxy.conf, /etc/hosts.conf,
/etcdnsmaq-resolv.conf, /var/log/cloud.log, /var/log/routerServiceMonitor.log, /var/log/dnsmasq.log”
• CPVM – ‘diagnostics.data.cpvm.defaults’
“[IPTABLES], [IFCONFIG], [ROUTE], /usr/local/cloud/systemvm/conf/agent.properties,
/usr/local/cloud/systemvm/conf/consoleproxy.properties, /var/log/cloud.log”
• SSVM – ‘diagnostics.data.ssvm.defaults’
“[IPTABLES], [IFCONFIG], [ROUTE], /usr/local/cloud/systemvm/conf/agent.properties,
/usr/local/cloud/systemvm/conf/consoleproxy.properties, /var/log/cloud.log”
21. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
G e t D i a g n o s t i c s D a t a – h o w t o u s e i t
User can also retrieve a
custom file or script
Example API call:
get diagnosticsdata targetid=[ssvm-ip]
files=/root/my-example-file
Or execute a script:
get diagnosticsdata targetid=[ssvm-ip]
files=[script]
22. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
G e t D i a g n o s t i c s D a t a - L i m i t a t i o n s
• Only supports system VMs
• A working/running SSVM is required in order to create/generate the public
file download URL.
• The Zone where target VM is running should have at least 1 secondary
storage that has a disk quota utilization of less than 95 %.
• Any script that must be executed as part of this API is expected to be
present in the system VM under the directory ‘/opt/cloud/bin/’
23. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
G e t D i a g n o s t i c s D a t a
Demo
24. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue
S a v e t h e d a t e
June 13
Cloudstack User Group meeting in Sofia, Bulgaria!
https://www.meetup.com/CloudStack-Bulgaria-User-Group-Meetup/
Apr 26
Cloudstack Collab conference – Florianopolis, Brazil
http://br.cloudstackcollab.org/
Sep 9-12
ApacheCon, Cloudstack Collab Conference - Las Vegas, US
https://www.apachecon.com/acna19/
25. C l i c k t o e d i t
The Cloud Specialists
ShapeBlue.com @ShapeBlue