Ask Your Question
0

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

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

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

Comments

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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

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

Comments

and then? second? third?

Kevin Ching gravatar imageKevin Ching ( 2015-10-23 04:12:10 -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: 2015-10-09 03:30:44 -0600

Seen: 1,129 times

Last updated: Oct 12 '15