Created
August 8, 2017 22:23
-
-
Save cocampbe/f4437e6b7d666c0cd5a48cb60c795b57 to your computer and use it in GitHub Desktop.
Oracle VM REST API info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Found this info here: http://blog.ls-al.com/oracle-vm-ovm-rest-api/ | |
Had trouble finding the rest calls to create a vm clone from a template. | |
## CloneVM failing | |
## The value for the argument "serverPoolId" was found to be null | |
def cloneVm(s,baseUri,templateVm,vmName): | |
repo_id=get_id_from_name(s,baseUri,'Repository','ovs1') | |
sp_id=get_id_from_name(s,baseUri,'ServerPool','ovs-home') | |
template_id=get_id_from_name(s,baseUri,'Vm',templateVm) | |
print 'clone {} into repo_id {:20} ServerPool Id {:55}'.format(template_id,repo_id,sp_id) | |
data={ "serverPoolId": sp_id, | |
"repositoryId": repo_id, | |
"createTemplate": False | |
} | |
uri='{base}/Vm/{vmId}/clone'.format(base=baseUri,vmId=template_id) | |
r=s.put(uri,data=json.dumps(data)) | |
job=r.json() | |
print job | |
# wait for the job to complete | |
vm_id=wait_for_job(job['id']['uri'],s) | |
print "new vm id:" + vm_id |
divya-create
commented
Dec 31, 2019
via email
Hi Team,
Please provide me the playbook for ovm_vnic and ovm_network.
…On Fri, 20 Dec 2019, 00:40 Court, ***@***.***> wrote:
Hi Team, How to get user input for vmnamr,cpu,memory,boot disk name in
ansible for clone vm from template. If you have this type of playbook and
library.please share to me
… <#m_-3397080742478564509_>
On Wed, 18 Dec 2019, 00:47 Divyalakshmi, *@*.*> wrote: Hi Team, Thanks,
Is possible provide the Vm_clone library using OVM CLI. I have checked
provided vm_clone library and its use REST API. On Tue, Dec 17, 2019 at
6:38 PM Court @.*> wrote: > Can you please provide me the playbook for vm
clone > > Try my repo https://github.com/cocampbe/ansible-ovm > > — > You
are receiving this because you commented. > Reply to this email directly,
view it on GitHub >
https://gist.github.com/f4437e6b7d666c0cd5a48cb60c795b57?email_source=notifications&email_token=AOBH73KYJZEESGE4VNNLTQLQZDFOHA5CNFSM4J3NUK2KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6B5M#gistcomment-3113942,
> or unsubscribe >
https://github.com/notifications/unsubscribe-auth/AOBH73MYAHKRSYMEEPTURJLQZDFOHANCNFSM4J3NUK2A
> . > -- *Thanks & RegardsDivyalakshmi R*
For building VMs I use the clone library to first create a VM from a
template. I then use the ovm_modify module to change the cpu and memory.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/f4437e6b7d666c0cd5a48cb60c795b57?email_source=notifications&email_token=AOBH73K7EG5CBPODPOLMCUDQZPBKZA5CNFSM4J3NUK2KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6G3K#gistcomment-3116469>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOBH73P5PAGGA6AEOSZ5ZPDQZPBKZANCNFSM4J3NUK2A>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment