简体   繁体   中英

jclouds openstack create instance

I recently installed jclouds to use with eclipse to create a project in java to communicate with openstack. Does anyone know if there is a way to create an instance from a snapshot or using default parameters (ovf image ). I would appreciate it. Thank you very much.

Try OpenStack4j . Jcloud is only a high level basic API for OpenStack since it supports many other clouds. Example using OpenStack4j

// Create a Server Model Object
Server server = Builders.server()
                    .name("Ubuntu 2")
                    .flavor("flavorId")
                    .image("imageId")
                    .addPersonality("/etc/motd", "Welcome to the new VM! Restricted access only")
                    .build();

 // Boot the Server
 Server server = os.compute().servers().boot(server);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM