How to set a LXD VM to disk Bus Type USB

@stgraber Virt-manager lets you run a boot image from an ISO/IMG file and one of the settings is the ability to change the default VirtIO Disk to a Disk Bus type of “USB”. This supports booting images that normally are designed to run as live images only.

My question is I am trying to do that same for a LXD VM. I thought perhaps I should add:

security.secureboot=false

However, that doesn’t seem to solve the problem to allow the image to boot. The error that I am seeing in the GUI console is:

image

I am specifying the container in this way:

lxc init Test --vm --empty -c security.secureboot=false    
lxc config device add Test install disk source=/home/scott/Downloads/liveimage.img boot.priority=10

Any ideas?

Currently LXD will set the device type to cdrom for disk source’s ending in .iso.

So you may find that helps things. Otherwise at the current time its not possible to specify a usb option.

You could open a feature request here though https://github.com/canonical/lxd/issues

It almost appears that my application wants to see the image device type set as “USB” and removable. Is that an actual attribute?

Let’s discuss on your first thread Trying to Boot a Debian Live Image in a LXD VM