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 22, 2019
via email
Hi Team,
I have already tried this ovm_clone and working fine. Thanks
I need help for i have to give input in ansible playbook based on the input
ovm clone create from template .
The below input asked from user
1.vm name
2.repository
3.server name
4.cpu
5.memory
6.nic card details.
7.template name
if you have please share to me.
Please provide me the python library and playbook for this.
…On Fri, Dec 20, 2019 at 12:33 AM Court ***@***.***> wrote:
Hi Team, Thanks, Can i use clone_vm library . I will execute this in
ansible. Have you tested create clone vm from template. I am not using
github..i am using ansible with awx. Is this work?
… <#m_-4404609172660169148_>
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*
Yes, you are free to use it. Yes, I do builds with this library.
—
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=AOBH73NVDUMATQ7F6F4DFULQZPAONA5CNFSM4J3NUK2KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6G3C#gistcomment-3116465>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOBH73MXBXA7CMJXDAAL4EDQZPAONANCNFSM4J3NUK2A>
.
--
*Thanks & RegardsDivyalakshmi R*
Hi Team,
I have already tried this ovm_clone and working fine. ThanksI need help for i have to give input in ovm_clone based on the input cvm clone create from template with ,The below input asked from user1.vm name2.repository3.server name4.cpu5.memory6.nic card details.
Please provide me the python library and playbook for this.
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