Giter Club home page Giter Club logo

powervs-image-capture's Introduction

PowerVS Image Capture

Script to automate capturing images of PowerVS LPARs on IBM Cloud and storing them to IBM Cloud Object Storage. Each image name has the current unix time appended to the name to ensure uniqueness in object names.

Main script to edit is: powervs_image_capture.sh

Script with test key data: powervs_image_capture_test.sh

Prerequisities and Guide:

  1. Install the IBM Cloud CLI: https://cloud.ibm.com/docs/cli?topic=cli-getting-started
  2. Create an API key to use to sign on (this will go into the IBM_CLOUD_API_KEY variable in the script): https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui#create_user_key
  3. Download and install the Power IaaS plugin for IBM Cloud CLI: https://cloud.ibm.com/docs/power-iaas-cli-plugin?topic=power-iaas-cli-plugin-power-iaas-cli-reference#power-iaas-cli-before
  4. Use ibmcloud pi service-list to get the list of PowerVS workspaces and copy the correct one's CRN. This will go into the CRN_POWERVS_WRKSPCE variable in the script
  5. ibmcloud pi service-target {CRN} sets the target to that Power workspace. This is already in the script
  6. Use ibmcloud pi instances to list the instances and their IDs. Copy the ID of the LPAR that you want to create the image for. This will go into the LPAR_ID variable
  7. Go to Cloud Object Storage and create a bucket. Then once the bucket is created, go to "Service Credentials" on the left side menu, click "Create New Credentials", name the credentials what you want, but keep in mind to click "Advanced Options" and select HMAC "On". You will get a JSON output that you can copy the Access Key and Secret from, and input that along with the bucket name (you can also add a folder after the bucket name if you wish) and bucket region to the script in the COS defines section: https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-uhc-hmac-credentials-main
  8. ibmcloud pi instance-capture is used to take an image and store it in COS. Again this is already in the script, but if you wish to check out the CLI doc, it is here: https://cloud.ibm.com/docs/power-iaas-cli-plugin?topic=power-iaas-cli-plugin-power-iaas-cli-reference#ibmcloud-pi-instance-capture
  9. (Bonus) You can use this script to automate capturing VMs since the name of the backup includes a unique Unix time in it, allowing you to get a unique backup everytime.

Further Help

powervs-image-capture's People

Contributors

emaadparacha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.