[nova][dev] image to local block device mapping not supported

Sean Mooney smooney at redhat.com
Mon Apr 3 12:33:55 UTC 2023


On Mon, 2023-04-03 at 10:44 +0200, Nemanja Miletic wrote:
> Hello,
> 
> Nova does not support image to local block device mapping since issue in this bug is fixed:
> https://bugs.launchpad.net/nova/+bug/1377958
> 
> In particular I am interested in scenario best described with this command:
> openstack server create --flavor m1.small --network mgmt --image XXX \
> --block-device uuid=YYY,source_type=image,\
> destination_type=local,disk_bus=ide,device_type=cdrom,boot_index=1 testvm300
> 
> For above command nova gives error:
> Block Device Mapping is Invalid: Mapping image to local is not supported.
> 
> Libvirt does not have issues with having two block devices which have file source.
> 
> My question is what am I missing here? Why Nova does not support image to local block device mapping?
the simple answer is that if we allow this then you could eiasly fill the hosts root file system

in yoru exmaple you are using two diffent images but the size of the second image YYY would not be accounted for in the
placment  resouce allocation of local vm usage.

if you created a 100TB glance image as a qcow and then specifed it on a host that was configure ot use raw storage
that file will get converted and fill the host storage.
if the YYY image is a driver disk or install iso then generally we would suggest takign a differnt approch
if its a driver disk then you would boot a vm form the XXX image as normal and attach the iso as a cinder volume.
if it was a install iso then the normal workflow is described here https://docs.openstack.org/nova/rocky/user/launch-instance-using-ISO-image.html



> 
> Thank you for your help.
> Nemanja
> 




More information about the openstack-discuss mailing list