Ask Your Question
1

Setting Image (Create new volume) as the default instance boot source

asked 2014-10-30 23:51:43 -0600

Liam Haworth gravatar image

Afternoon Ask Openstack,

The question in the title pretty much says it all but I will expand on why. In my work place we use TestKitchen to run tests for our software and cookbooks, these tests are running by our CI system with the --parallel tag mean all the tests run side by side.

When all the tests (10 all together) are spun up side by side it causes the disk on the computer node (which we only have one of right now) to hit 100% usage because of this some of downloads inside the test timeout and hang. Our [hopeful] solution is to hand of the disk IO to our SAN that is attached as a volume store.

The problem we are having is that I can't find any way to set the default boot source option to "Boot from image (creates new volume)", is there anyway to do this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-10-31 01:33:12 -0600

dbaxps gravatar image

updated 2014-10-31 01:52:54 -0600

You wrote : The problem we are having is that I can't find any way to set the default boot source option to "Boot from image (creates new volume)", is there anyway to do this?
Same command may be performed via CLI and just placed inside script which will make this option default

[root@icehouse1 ~(keystone_demo)]# nova boot --flavor 2 --key_name oskey45 --nic net-id=b6e4a53c-bc1f-4751-93e9-70c6775dd186 --block-device source=image,id=564585e4-65b9-46ef-9a74-084397d1b94a,dest=volume,size=5,shutdown=preserve,bootindex=0 UbuntuRS2910
+--------------------------------------+-------------------------------------------------+
| Property                             | Value                                           |
+--------------------------------------+-------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                          |
| OS-EXT-AZ:availability_zone          | nova                                            |
| OS-EXT-STS:power_state               | 0                                               |
| OS-EXT-STS:task_state                | scheduling                                      |
| OS-EXT-STS:vm_state                  | building                                        |
| OS-SRV-USG:launched_at               | -                                               |
| OS-SRV-USG:terminated_at             | -                                               |
| accessIPv4                           |                                                 |
| accessIPv6                           |                                                 |
| adminPass                            | y8eyRevM9kyZ                                    |
| config_drive                         |                                                 |
| created                              | 2014-10-31T06:12:14Z                            |
| flavor                               | m1.small (2)                                    |
| hostId                               |                                                 |
| id                                   | b7156014-4d9e-4e30-9584-465e52c5d4f6            |
| image                                | Attempt to boot from volume - no image supplied |
| key_name                             | oskey45                                         |
| metadata                             | {}                                              |
| name                                 | UbuntuRS2910                                    |
| os-extended-volumes:volumes_attached | []                                              |
| progress                             | 0                                               |
| security_groups                      | default                                         |
| status                               | BUILD                                           |
| tenant_id                            | 6e94228087d34f62846f55a7b95e109b                |
| updated                              | 2014-10-31T06:12:14Z                            |
| user_id                              | 88fb823162b24a4789f8b703462ecade                |
+--------------------------------------+-------------------------------------------------+
[root@icehouse1 ~(keystone_demo)]# nova list
+--------------------------------------+----------------+-----------+----------------------+-------------+--------------------------------------------------------+
| ID                                   | Name           | Status    | Task State           | Power State | Networks                                               |
+--------------------------------------+----------------+-----------+----------------------+-------------+--------------------------------------------------------+
| 761abfa2-eebc-4cd7-b5e9-88a75ee34e2c | CentOSNPRX07   | SUSPENDED | -                    | Shutdown    | demo_net=40.0.0.27, 192.168.1.155; private01=20.0.0.24 |
| 6dbb64aa-4410-4901-a2bd-9593b2a8fbf4 | UbuntuPWRX2710 | SUSPENDED | -                    | Shutdown    | demo_net=40.0.0.25, 192.168.1.154; private01=20.0.0.22 |
| b7156014-4d9e-4e30-9584-465e52c5d4f6 | UbuntuRS2910   | BUILD     | block_device_mapping | NOSTATE     |                                                        |
| b34b33f1-24ff-4253-b51d-371d1508a44e | VF20PWRS01     | SUSPENDED | -                    | Shutdown    | demo_net=40.0.0.22, 192.168.1.158; private01=20.0.0.19 |
+--------------------------------------+----------------+-----------+----------------------+-------------+--------------------------------------------------------+
[root@icehouse1 ~(keystone_demo)]# nova list
+--------------------------------------+----------------+-----------+------------+-------------+--------------------------------------------------------+
| ID                                   | Name           | Status    | Task State | Power State | Networks                                               |
+--------------------------------------+----------------+-----------+------------+-------------+--------------------------------------------------------+
| 761abfa2-eebc-4cd7-b5e9-88a75ee34e2c | CentOSNPRX07   | SUSPENDED | -          | Shutdown    | demo_net=40.0.0.27, 192.168.1.155; private01=20.0.0.24 |
| 6dbb64aa-4410-4901-a2bd-9593b2a8fbf4 | UbuntuPWRX2710 | SUSPENDED | -          | Shutdown    | demo_net=40.0.0.25, 192.168.1.154; private01=20.0.0.22 |
| b7156014-4d9e-4e30-9584-465e52c5d4f6 | UbuntuRS2910   | ACTIVE    | -          | Running     | private01=20.0.0.25                                    |
| b34b33f1-24ff-4253-b51d-371d1508a44e | VF20PWRS01     | SUSPENDED | -          | Shutdown    | demo_net=40.0.0.22, 192.168.1.158; private01=20.0.0.19 |
+--------------------------------------+----------------+-----------+------------+-------------+--------------------------------------------------------+
[root@icehouse1 ~(keystone_demo)]# neutron port-list --device-id b7156014-4d9e-4e30-9584-465e52c5d4f6
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                        |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| 95526856-25a3-4783-a0e3-8766b581887e |      | fa:16:3e:4c:22:e8 | {"subnet_id": "2b10048a-6160-4ea7-bad3-4cd1af4da683", "ip_address": "20.0.0.25"} |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
[root@icehouse1 ~(keystone_demo)]# neutron floatingip-create public
Created a new floatingip:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    |                                      |
| floating_ip_address | 192.168.1.160                        |
| floating_network_id | 98df9192-3397-4422-b208-06f70f0484ad |
| id                  | d7e0386b-d3f8-4dde-b3a6-f89a7c44955d |
| port_id             |                                      |
| router_id           |                                      |
| status              | DOWN                                 |
| tenant_id           | 6e94228087d34f62846f55a7b95e109b     |
+---------------------+--------------------------------------+
[root@icehouse1 ~(keystone_demo)]# neutron floatingip-associate d7e0386b-d3f8-4dde-b3a6-f89a7c44955d  95526856-25a3-4783-a0e3-8766b581887e 
Associated floatingip d7e0386b-d3f8-4dde-b3a6-f89a7c44955d
[root@icehouse1 ~(keystone_demo)]# neutron floatingip-show d7e0386b-d3f8-4dde-b3a6-f89a7c44955d
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    | 20.0.0.25                            |
| floating_ip_address | 192.168.1.160                        |
| floating_network_id | 98df9192-3397-4422-b208-06f70f0484ad |
| id                  | d7e0386b-d3f8-4dde-b3a6-f89a7c44955d |
| port_id             | 95526856-25a3-4783-a0e3-8766b581887e |
| router_id           | d2526168-b52f-43fd-a73a-5b76a2b416db |
| status              | ACTIVE                               |
| tenant_id           | 6e94228087d34f62846f55a7b95e109b     |
+---------------------+--------------------------------------+
[root@icehouse1 ~(keystone_demo)]# nova list | grep  b7156014-4d9e-4e30-9584-465e52c5d4f6
| b7156014-4d9e-4e30-9584-465e52c5d4f6 | UbuntuRS2910   | ACTIVE    | -          | Running     | private01=20.0.0.25, 192.168.1.160                     |

[root@icehouse1 ~(keystone_demo)]# ssh -i oskey45.pem ubuntu@192.168.1.160
The authenticity of host '192.168.1.160 (192.168.1.160)' can't be established.
ECDSA key fingerprint is bd:78:51:43:f3:e6:31:04:b1:ff:d2:e5:3a:a4:dc:77.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.160' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information ...
(more)
edit flag offensive delete link more

Comments

This isn't really what I am looking for, I can change the command used by TestKitchen to make the instances, it is part of a Ruby API (fog). I was wondering if there is a settings in the nova conf that will allow me to set this

Liam Haworth gravatar imageLiam Haworth ( 2014-11-05 15:55:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-30 23:51:43 -0600

Seen: 405 times

Last updated: Oct 31 '14