[Openstack] [Nova] Query regarding REST API for VM creation for any tenant

Anil Vishnoi vishnoianil at gmail.com
Wed Apr 10 19:50:35 UTC 2013


Hi,

To attach a VM to specific network (owned by same tenant) user can specify
--nic option in the command line with the network-id to which VM needs to
be attached

--nic <net-id=net-uuid,v4-fixed-ip=ip-addr>
                        Create a NIC on the server. Specify option multiple
                        times to create multiple NICs. net-id: attach NIC to
                        network with this UUID (optional) v4-fixed-ip: IPv4
                        fixed address for NIC (optional). port-id: attach
NIC
                        to port with this UUID (optional)

e.g
nova boot --image ed8b2a37-5535-4a5f-a615-443513036d71
--flavor 1
--nic net-id= <id of first network>
--nic net-id= <id of second network>  test-vm1

But looks like same can not be done using the REST API call.I didn't not
find any key where i can provide the networks detail where VM need to be
attached.


{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://servers.api.openstack.org/1234/images/52415800-8b69-11e
0-9b19-734f6f006e54",
"flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : ""
}
]
}
}

Does that mean we can't accomplish this using REST API? Or is there any
alternate way we can accomplish this using REST?

-- 
Thanks
Anil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130411/ed730547/attachment.html>


More information about the Openstack mailing list