Vm Templates
Contents |
[edit]
Design in Progress
[edit]
Version 1
[edit]
Design
For general-purpose OS images (F10, windows XP, etc), we don't want to tie Vm Size to ISO.
[edit]
Storage
[edit]
Implementation
- At the lowest level we will keep Vm Template and Vm Size separate for further implementation post-v1.
- We set up a yml file with "default" Vm Size values(just one set), and the controller processing uses that
- We get list of images from cobbler (do this in CloudService rather than controller? cobbler calls will be moving to qpid in a future version, this woudl allow wui/controller not to change) and combine this selection with Vm Size to initiate creation of Vm.
- A user must have Privelege::CLOUD_CREATE to create a new vm in the cloud.
- If a user has CLOUD_CREATE for multiple pools, show a list of pools to choose from in the create form.
[edit]
Storage -attach or create
- Iterate over all available storage volumes in the storage pools that belong to the HW pool -- if we find one that's the right size, then we use it.
- Iterate over all the storage pools that support creating new volumes (i.e. nfs, lvm) -- find the first that has enough available space to create the volume we want. This round will just pick one arbitrarily, with no regard to type or anything else besides that it is a storage pool for the user's resourcepool. (TODO: check if we can actually tell available space from the storage pool level)
- Fail the task if we can't find any free storage volumes and can't create any.
[edit]
Pseudo code
(module written using BDD-inspired language)
module CloudService
include <various modules as needed>
def svc_new
should check if user has permission:CLOUD_CREATE
should return list of VmTemplates to choose from
should return list of VmResourcePools to choose from if user has more than one
end
svc_create
should check if user has permission:CLOUD_CREATE for give VmResourcePool
should call some storage service to see if there is a volume available for use, and if not, add a task to create one (this may require one or more new StorageXService methods)
should call VmService::svc_create, using chosen VmTemplate, VmResourcePool, and values from VmSize.yml
end
end
VmSize.yml:
small:
cpus: 2
memory: 262144
storage_size_in_gb: 15
[edit]
Post-Version 1
- Provide a way to create multiple Vm Size values -- either in yml or model
- When we start offering specialized appliance-like images, we _might_ want to tie them to Vm Size values via an idea of a more detailed Vm Profile.
- Alternatively, we may want to keep this optional- optional meaning that you don't have to pick a Vm Profile -- you can just pick a (Vm Template and Vm Size. but if you do pick a profile, that pulls in the template/sizing metadata.
[edit]
Glossary
- Vm Size
- in this context, when we say Vm Size, we mean metadata to help define a new vm(separate from what is provisioned _onto_ that vm). This metadata includes cpu, ram, and storage size (and possibly network-related information)
- Vm Template
- the provisioned system. Initially, this is likely just isos, but in future releases may be ks, appliance, etc.
- Vm Profile
- combination of Vm Size and Vm Template

