Ask Your Question

Adding an iso to instance launch

asked 2019-12-12 16:43:33 -0600

awalters gravatar image

updated 2019-12-12 19:38:37 -0600

I'm trying to launch an instance from an image, and also attach an iso to it that contains config data for that instance. I can do this via --block-device on a test box where I have Cinder installed. However, on my test box without Cinder (I don't actually need it for anything else in this test) this doesn't work. I tried changing the destination to local rather than volume and it says that combination is not supported. I tried switching to using a config-drive, and while this works with a small config file, it fails with the message "request is too large" when I include all of the info I actually need. Is there any other way to handle this short of installing Cinder? I just tried to add it on and got lots of errors (never added it after initial install before), and I don't need it for anything else, so I'm hoping to avoid going down this path if possible.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-12-13 03:20:20 -0600

nicholas666 gravatar image

If you use KVM you can use " virsh attach-disk instance-uuid XXX.iso hda --sourcetype block --driver qemu --subdriver raw --type cdrom" to attach a iso with cdrom.

if don't have hda dev . you can change nova/virt/libvirt/

    cd_cfg = vconfig.LibvirtConfigGuestDisk()
    cd_cfg.driver_name = 'qemu'
    cd_cfg.source_device = 'cdrom'
    cd_cfg.driver_format = 'raw'
    cd_cfg.driver_cache = 'none'
    cd_cfg.target_bus = 'ide'
    cd_cfg.target_dev = 'hda'
    cd_cfg.root_name = 'disk'
    cd_cfg.source_type = 'file'
    cd_cfg.source_path = ''

also you can modify KVM xml boot dev = 'cdrom' to change order

<boot dev="hd" />
<smbios mode="sysinfo" />
</os> (link text)

edit flag offensive delete link more


Interesting...thanks! I'd wondered about doing it that way, but saw a post elsewhere that said not to directly use libvirt commands in OpenStack. Have you tried it this way personally? Any gotchas or odd potential behaviours to be aware of?

awalters gravatar imageawalters ( 2019-12-13 11:39:18 -0600 )edit

Yes, I've done this before, but the important thing to note is that the migration and ceilometer will collect this hda device.You can use libvirt python sdk instead of virsh commands.

nicholas666 gravatar imagenicholas666 ( 2019-12-16 20:26:36 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-12-12 16:43:33 -0600

Seen: 99 times

Last updated: Dec 13 '19