Minggu, 29 Januari 2017

Creat vm OS

How to Create, Deploy and Launch Virtual Machines in OpenStack

Creat VM Openstack Eng

Prerequisites

  1. You obviously will need a running OpenStack installation, as described in my other Flashguides.
  2. You will need either the admin or demo account credentials to log into Horizon. If you installed via packstack, those credentials will be in ~/packstack-answers-[TIMESTAMP].txt. If you installed via devstack, those passwords would be in your local.conf file and printed out when devstack complets.

Create the VM

  1. Point your browser to the OpenStack Horizon dashboard, http://[YOUR_OPENSTACK_IP]:
  2. Login with your credentials. You'll see an empty dashboard like this:
  3. Click on Project -> Instances. This will show you a screen like this, with no instances yet defined:
  4. Click on the "Launch Instance" button to the right.
  5. A new window will popup:
    . There are 5 tabs at the top for different configuration areas.
  6. In the "Details" tab, Give your new instance a name and select the "Flavour". Flavours are just types of VMs, differentiated by amount of memory, virtual CPUs and disk space. Note that the right side of the window shows the limits of how many of each you have available in this OpenStack hypervisor.
  7. Set the boot source for the VM to "Boot from image". When you do this, a new drop-down will appear with a single choice, the built-in cirros image:
  8. Click on the "Access & Security" tab. You will need to define an ssh key-pair for logging into this machine:
  9. Click on the "+" button, and a new window will popup:
  10. As the instructions say, generate a new ssh-key (unless you already have one) via ssh-keygen:
    ssh-keygen -t rsa -f cloud.key
    .
  11. Open the public version of this key, cloud.key.pub, copy the contents, and paste it into the "Public Key" field of the window. Then click "Import Key Pair" at the bottom right.
  12. Now you should have the new key pair selected:
    .
  13. Now click the blue "Launch" button. The window will close, and your new instance will appear in the list of instances. The Task column will show it in a Spawning state until it is completely provisioned.