Description of problem: I was able to add cirros QCOW2 image [1]: [para@virtual-rhel-beta ~(keystone_admin)]$ glance add name=cirros-0.3.0-x86_64 is_public=true disk_format=qcow2 container_format=bare < cirros-0.3.0-x86_64-disk.img Added new image with ID: 48853af8-7302-4ee4-995e-dcb045d92201 But I was unable to do the same with my RHEL test image in RAW format: [para@virtual-rhel-beta ~(keystone_admin)]$ sudo qemu-img info test.img image: test.img file format: raw virtual size: 2.0G (2147483648 bytes) disk size: 1.2G [para@virtual-rhel-beta ~(keystone_admin)]$ sudo glance add disk_format=raw container_format=bare is_public=true name="test-image" < test.img You must provide a username via either --os-username or env[OS_USERNAME] [1] https://launchpadlibrarian.net/83305348/cirros-0.3.0-x86_64-disk.img Version-Release number of selected component (if applicable): [para@virtual-rhel-beta ~(keystone_admin)]$ rpm -qa *glance python-glance-2012.2.1-1.el6ost.noarch openstack-glance-2012.2.1-1.el6ost.noarch How reproducible: Always Steps to Reproduce: 1. Create RAW image 2. Try to add it using Glance CLI Actual results: Image is not added. Expected results: Add image or throw relevant exception. Additional info: None
Hi John, The "You must provide a username via either --os-username or env[OS_USERNAME]" error message suggests an issue with environment variables not being propagated. Have you tried with the sudo -E (preserve environment) option? Cheers, Eoghan
Hi Eoghan, if this question is for me :), then no I didn't try it with -E. Will try. Martin
Works with -E. Closing.