6. Basic Usage¶
This section would introduce the basics of using z/VM Cloud Connector to manage z/VM host, some samples are given here.
6.1. Workflow description¶
6.1.1. Spawning a virtual machine¶
- Image import from external image repository into zvm cloud connector , for one image, only need to be done once
- Store the information into DB record
- Call from upper layer to create a guest, this will define a .user direct. through z/VM SMAPI and DIRMAINT based on user input along with the disks allocations
- SMAPI call DIRMAINT to define a user direct
- Call from upper layer to deploy a guest
- In turn, cloud connector start to copy disk contents from image to the allocated disks in step 3
- Post deploy actions such as network setup, customerized files from cloud connector the new deploy VM
- Start the VM
- During power on of the VM (first time) , doing setup of the network and utilize the customerized files to update network, hostname etc (by default, using cloud-init)
6.1.2. Creating a vswitch¶
- Call from upper layer to trigger the Vswitch create call
- HTTP service (cloud connector REST API) get the request and handle to cloud connector server
- In turn SMAPI was called and handle the VSWITCH cerate command, this will include persistent definition of Vswitch and define in z/VM CP
- CP was called to create vswitch on the fly
6.2. Usage Sample¶
The sample would be added later about calling z/VM Cloud Connector RESTful API for managing z/VM host.