Advertisement
gregmark

OpenStack or Bust, Part 10: launching vm instance

Mar 19th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.45 KB | None | 0 0
  1. # Need to pick a flavor.  Simplifies assigning resource units to vms.  Let's pick 2, m1.small.
  2.  
  3. root@kcon-gen-01i:~# nova flavor-list
  4. +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
  5. | ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
  6. +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
  7. | 1  | m1.tiny   | 512       | 0    | 0         |      | 1     | 1.0         | True      | {}          |
  8. | 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      | {}          |
  9. | 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      | {}          |
  10. | 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      | {}          |
  11. | 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      | {}          |
  12. +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
  13.  
  14. # We have one image to chose from.
  15.  
  16. root@kcon-gen-01i:~# glance image-list
  17. +--------------------------------------+--------------+-------------+------------------+---------+--------+
  18. | ID                                   | Name         | Disk Format | Container Format | Size    | Status |
  19. +--------------------------------------+--------------+-------------+------------------+---------+--------+
  20. | 0b103aa4-2137-4e83-b20a-f9702a2c2f60 | myFirstImage | qcow2       | bare             | 9761280 | active |
  21. +--------------------------------------+--------------+-------------+------------------+---------+--------+
  22.  
  23. # Running nova bot using credentials for our project_one user; the command gets the auth_url from our creds file and overrides the rest.  Also running date to make it easier for us to bullseye log messages if necessary.
  24.  
  25. root@kcon-gen-01i:~# date ; nova --os-username user_one --os-password user_one --os-tenant-name project_one boot vm-01 --image $(stack_id -i myFirstImage) --flavor 2
  26. Tue Mar 19 18:35:15 EDT 2013
  27. +------------------------+--------------------------------------+
  28. | Property               | Value                                |
  29. +------------------------+--------------------------------------+
  30. | OS-DCF:diskConfig      | MANUAL                               |
  31. | OS-EXT-STS:power_state | 0                                    |
  32. | OS-EXT-STS:task_state  | scheduling                           |
  33. | OS-EXT-STS:vm_state    | building                             |
  34. | accessIPv4             |                                      |
  35. | accessIPv6             |                                      |
  36. | adminPass              | rpUMQmd3GpF4                         |
  37. | config_drive           |                                      |
  38. | created                | 2013-03-19T22:35:16Z                 |
  39. | flavor                 | m1.small                             |
  40. | hostId                 |                                      |
  41. | id                     | ee8b26a4-2c2e-4429-b780-41a9582a5568 |
  42. | image                  | myFirstImage                         |
  43. | key_name               | None                                 |
  44. | metadata               | {}                                   |
  45. | name                   | vm-01                                |
  46. | progress               | 0                                    |
  47. | security_groups        | [{u'name': u'default'}]              |
  48. | status                 | BUILD                                |
  49. | tenant_id              | c2cdb8d4d2484cf8bc8bf95dd759df12     |
  50. | updated                | 2013-03-19T22:35:16Z                 |
  51. | user_id                | b157401ac19d4cfcb33d929524c477dc     |
  52. +------------------------+--------------------------------------+
  53.  
  54. # Ta da.  Now let's verify:
  55.  
  56. root@kcon-gen-01i:~# nova list
  57.  
  58.  
  59. # Egad!  It's not there!  Oh, the humanity!
  60.  
  61. root@kcon-gen-01i:~# nova --os-username user_one --os-password user_one --os-tenant-name project_one list
  62. +--------------------------------------+-------+--------+------------------------+
  63. | ID                                   | Name  | Status | Networks               |
  64. +--------------------------------------+-------+--------+------------------------+
  65. | ee8b26a4-2c2e-4429-b780-41a9582a5568 | vm-01 | ACTIVE | net_proj_one=50.50.1.2 |
  66. +--------------------------------------+-------+--------+------------------------+
  67.  
  68. # Ohhhhhh.... phew.  Never mind.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement