(Click to open topic with navigation)
A VM service can contain multiple resources or subservices. For instance, the example below contains a VM and storage. To combine multiple resources in a single service, you must create a virtual container and add the services to it.
To create a virtual container and add workflows
> mvcctl -c
VC 'vc1' created
vc1
. To do so, run msub -l, requesting the storage workflow's configured submit job. You may submit multiple storage mounts if desired. You must submit a job script to satisfy the msub syntax, but Moab ignores the script. > msub -l walltime=2:00:00,gres=gold:50,flags=gresonly,template=storage -W x="vc=vc1" job.sh --xml
<Data><job JobID="Moab.4"></job><CreatedVC>vc2</CreatedVC></Data>
Job Moab.4
and VC vc2
have been created. Moab.4
has been placed inside of vc2
, and vc2
has been placed inside of vc1
.
vc1
, setting its dependencies on the storage mount variable (SM) and its name space (vc2
). To request a specific name for your VM, set the VMID variable. The request will be rejected if the VM ID is not available.
> msub -l walltime=INFINITY,template=VMTracking,os=rhel51,depend=set:vc2.SM -W x="vc=vc1" -W x=var=VMID=myVM" job.sh --xml
<Data><job JobID="Moab.5"></job></CreatedVC>vc4</CreatedVC></Data>
Job Moab.5
and VC vc4
have been created. Moab.5
has been placed inside of vc4
, and vc4
has been placed inside of vc1
. Moab.5
depends on vc2.SM
, the variable set by Moab.4
's trigger.