Linuxloops disk images can be run in Virtual Machines by treating them as raw disks.
WARNING: Do not launch the currently running Linuxloops image in a Virtual Machine. I don't see why anyone would want to do that but it will most likely break the image.
The boot mode needs to be set to EFI and disk images can natively be used as raw disks:
qemu-system-x86_64 -drive file=/test.img -m 8192 -enable-kvm -machine type=pc,accel=kvm -M q35 -cpu host -smp 4,sockets=1,cores=4,threads=1 -bios /usr/share/ovmf/x64/OVMF.fd -vga virtio -display gtk,gl=on -audio driver=sdl,model=virtio
-
From the OS with VirtualBox installed, cd into the Linuxloops image folder.
-
(Linux only) Make sure your user has ownership over the image file:
sudo chown myusername:myusername ubuntu.img
- Create a virtual disk template for the Linuxloops image:
From Windows: C:\"Program Files"\Oracle\VirtualBox\VboxManage.exe internalcommands createrawvmdk -filename ubuntu.vmdk -rawdisk ubuntu.img
From Linux: vboxmanage internalcommands createrawvmdk -filename ubuntu.vmdk -rawdisk ubuntu.img
-
Open VirtualBox and setup a new virtual machine. When requested for the storage, select the vmdk file we have just created in the Linuxloops image folder.
-
Open the VM settings -> System -> enable EFI
-
Start the VM