Are you using template or VM command lines to create VM?
I am using a VM template right now and use Virtual Guest package. Regardless, even if I need to create a fresh vm, I will have to create a virtual guest package and then use the package in a Virtual Guest Job. So I need to reuse this virtual guest job with parameters being passed
When you create your Virtual Guest Package and you have to fill out a Virtual Machine Name enter
When you run your Virtual Guest Job simply change the Name value and that will get passed to the VGP. If I remember correctly you can also enter ??NAME?? into the VGJ and pass it a Name variable at run time.
have you reviewed the commands in the blcli help in the virtualization and similar name spaces ? such as 'createVirtualGuestPackage' and 'createVirtualGuest' ?
Thanks for the replies. So then how do I pass the value for the variable NAME from the blcli command while running the job?
And Yes, I have gone through the commands and used createVirtualGuest as well to create a job.
Go through BLCLI help.
Where you will get detailed procedure from VM provisioning through BLCLI.
Study below Namespaces in it:
- Virtualization Concepts
Using BLCLI you can create bare-metal VM as well template based VM.
Please find attached VGJ.xml whihc is used in template based VM provisioning.
To create a Guest VM you can run below BLCLI command with the attached VGJ.xml after making changes in it as per your infrastructure & configuration:
blcli_execute Virtualization createVirtualGuest <VGJ.xml file with path>
Below links would be helpfult for you:
I hope ny question is clear. I already have a preconfigured job to create virtual machines. But if I run the same job second time, it will throw error saying "Virtual guest with the given name already exists". So I need to dynamically pass the virtual guest name while running the job from blcli.
i don't think you can dynamically pass the new name to the job via the blcli. in the gui you would open the job, change the name, save it, and then run the job. so you would need to do the same actions in the blcli. i don't see any released blcli commands that can do this so you could look in the unreleased - probably something like 'Virtualization.setOptionValue optionId value' if you can figure out the option id.
alternatively instead of re-using the same job, why not just create a new one w/ Virtualization.createVirtualGuest ?
Thanks Bill. I need to automate the vmcreation. So everytime i get a new request, I will need to create a new job. Suppose for 100 vms I need to create 100 different jobs. Instead I thought I could reuse the existing job if possible.
1 of 1 people found this helpful
You could. You can also set the ‘AUTO_GENERATED’ property on the job to true and cleanup will deletes the jobs after some time.
I’d be careful about re-using the same job – what if you kick off multiple concurrent requests ? changing the name could cause some problems there… so it’s safer to create a new job for each deploy imo.