How to use in libvirt ?

  • 1. Download VM image from (OVA) https://libreelec.tv/downloads/generic/

    2. (not requiered) tar -tf LibreELEC-Generic.x86_64-9.2.6.ova (for view inside)

    Code
    tar xvf LibreELEC-Generic.x86_64-9.2.6.ova

    u get 2 files


    LibreELEC-Generic.x86_64-9.2.6.ovf

    LibreELEC-Generic.x86_64-9.2.6.vmdk


    4. Convert VMDK to QCOW2:

    Code
    qemu-img convert -f vmdk -O qcow2 LibreELEC-Generic.x86_64-9.2.6.vmdk LibreELEC-Generic.x86_64-9.2.6.qcow2

    5. Run VM (i use Intel GVT-g video "-device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/9d8b3997-7a9e-44dc-9fed-463015a993a5,display=on")


    Code
    /usr/bin/kvm -enable-kvm -m 8134 -machine q35,accel=kvm -cpu host,kvm=on -smp cores=1,threads=2 -rtc clock=host,base=localtime \
    -boot menu=on,order=cd \
    -vga none \
    -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/9d8b3997-7a9e-44dc-9fed-463015a993a5,display=on \
    -display gtk,gl=on \
    -device ich9-intel-hda,bus=pcie.0,addr=0x1b \
    -device hda-micro,audiodev=hda \
    -audiodev pa,id=hda,server=unix:/run/user/1000/pulse/native \
    -drive file=/media/data/vm/LibreELEC-Generic.x86_64-9.2.6.qcow2,if=virtio,index=0,media=disk,cache=none,format=qcow2,aio=threads,discard=unmap \
    -net bridge,br=br0 -net nic,model=virtio,macaddr=52:54:00:09:3d:36