Ask Your Question

how to add 2 devices with '--block-device' in 'nova boot'

asked 2015-10-09 03:30:44 -0500

Kevin Ching gravatar image

when I try to create vm by 'nova boot' command, it's hard to add 2 devices into that vm. And, it always boot the second device 'bootindex=2' For example, I want to add 2 cdroms into vm:

nova boot --block-device source=image,dest=local,id=<>,bus=ide,type=cdrom,bootindex=1 --image xx1.iso --block-device source=image,dest=local,id=<>,bus=ide,type=cdrom,bootindex=2 --image xx2.iso --flavor xxxxx --nic net-id=<>,subnet-id=<> name

So, could anyone tell me how to add more than devices?

edit retag flag offensive close merge delete


I am not aware of ability to boot 2 block devices. The workaround is to boot with one block device, and after span add another block device to the instance

capsali gravatar imagecapsali ( 2015-10-09 05:06:27 -0500 )edit

Thanks, then, how to use command to achieve this? I mean how to use command to add another device? I am not able to use dashboard recently.

Kevin Ching gravatar imageKevin Ching ( 2015-10-09 05:37:14 -0500 )edit

the command you are looking for is nova volume-attach <server id> <volume id> <opt /dev/vdX>.

You must first create a volume prior to attaching it with cinder create .

capsali gravatar imagecapsali ( 2015-10-22 06:29:21 -0500 )edit

no, that command can not add cdrom device which I want to include windows drivers when installing windows system

Kevin Ching gravatar imageKevin Ching ( 2015-10-23 04:11:04 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-12 02:35:06 -0500

nova attach-volume.

If you want to attach images rather than volumes, I don't think this can be done directly. In other words, images are for booting only. In this case, first create a volume from your image, using cinder create --image-id....

edit flag offensive delete link more


and then? second? third?

Kevin Ching gravatar imageKevin Ching ( 2015-10-23 04:12:10 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-10-09 03:30:44 -0500

Seen: 1,470 times

Last updated: Oct 12 '15