Start an empty VM with: Note: Change VM-name to a custom name you choose.
lxc init VM-name --empty --vm
Note: In some cases it might be required to disable SecureBoot, when it blocks the .iso file (Recommendation: Disable only when necessary!).
You can do this, either by adding -c security.secureboot=false to the init/launch command
or by modifying the config key of an existing VM with: lxc config set VM-name security.secureboot=false.
Grow the VMs filesystem size:
The default size is mostly too small.
You can choose what size you think is reasonable, in this example I use 15 Gigabyte (GB).
lxc config device override VM-name root size=15GB
Add the .iso file to the VM via a disk device: Note: Adjust the values accordingly.
lxc config device add VM-name custom-device-name disk source=/home/user/pathtoiso/isoname.iso
Start the VM with GUI: lxc start VM-name --console=vga
security.secureboot=false should only really be used when absolutely required.
That’s the case for Windows due to the virtio scsi driver not being signed, but for most Linux distributions at least, they have properly signed binaries and won’t need it.
I tried to install from a LinuxMint iso, and there were some problems booting from the iso.
I had to follow these instructions to make it work: OVMF/UEFI Boot Entries - Proxmox VE
Unfortunately, no, it is not related to that. It happens in both cases (secure boot enabled or disabled). It happens with a Debian iso as well. The error message looks like this:
BdsDxe: faled to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot (0x0) /Pci (0x1,0x1) /Pci (0x0,0x0) /Scsi (0x0,0x1) : Not Found
>>Start PXE over IPv4.
PXE-E16: No valid offer received.
... some failure message similar to the above...
>>Start PXE over IPv6.
PXE-E16: No valid offer received.
... some failure message similar to the above...
>>Start HTTP boot over IPv4.....
Error: Could not retrieve NBP file etc.
>>Start HTTP boot over IPv6.....
Finally it boots from the iso.
It seems to be a boot order problem, but I don’t know how to specify booting directly from the iso, instead of trying the other options.
Hi everyone. I recently started using lxc containers as isolated dev envs and I was surprised how easy and efficient everything is, I thoroughly enjoyed it. I was trying to create a vm in the past hours to install a linux distro from ISO that is not amongst the images. I was following this article right here after getting through the spam esc and which image to boot from manuver I managed to get graphical console and the gui installation of the distro was almost smooth, apart from one thing. I’m stuck trying to make my vm have internet access. I can ping the vm just fine from the host, but no internet connection in the vm. I was going through reddit and the instance config part of the docs but I just can’t comprehend it. I installed lxd snap. Lxd version is 5.0.0,the host is running Pop!_OS and the vm is running Ubuntu Budgie 22.04. Any steps helping to troubleshoot, maybe solve the situation would be highly appreciated. Thank you