How to install OpenELEC (Official) in a VM


johnodon

Recommended Posts

Not you selling the cards, but the fact that in this day and age AMD cannot make a proper driver...stupid.

 

Thats true  ;D ;D ;D OE using opensource driver (not Catalyst) because on catalyst even less working proper.

And whats is funny - in opensource driver people must integrated VDPAU from nvidia for hardwared acceleration  ;D ;D

Link to comment

i get fully working Openelec with your methood and virtio bus driver :)

 

my xml

<domain type='kvm'>
  <name>OpenELEC</name>
  <uuid>2aa5fb1e-a0c7-581d-d764-a1a56be2a929</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="openelec.png" os="openelec"/>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
    <loader type='pflash'>/usr/share/qemu/ovmf-x64/OVMF-pure-efi.fd</loader>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/.vms/kvm/oe.img'/>
      <target dev='hda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:4d:8c:44'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/OpenELEC.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/.vms/GT730.ROM'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0a12'/>
        <product id='0x0001'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

i can send you this image if you want

Link to comment

i get fully working Openelec with your methood and virtio bus driver :)

 

my xml

<domain type='kvm'>
  <name>OpenELEC</name>
  <uuid>2aa5fb1e-a0c7-581d-d764-a1a56be2a929</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="openelec.png" os="openelec"/>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
    <loader type='pflash'>/usr/share/qemu/ovmf-x64/OVMF-pure-efi.fd</loader>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/.vms/kvm/oe.img'/>
      <target dev='hda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:4d:8c:44'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/OpenELEC.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/.vms/GT730.ROM'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0a12'/>
        <product id='0x0001'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

i can send you this image if you want

 

I'm trying my hardest to wait for the Official build to have the virtio modules.  :)

 

Has their been any updates?  Were you able to squash the commits?

 

John

Link to comment

I know we are talking about the 720 card,  but what about 210, would those work too?

 

Check the forums.  I seem to recall some having issues with the 210 but I could be wrong.

 

and one more, the gt 610?  microcenter has an open box for 30 and 10$ rebate...

 

Edit, NM, just saw this and the issues there, so it seems the 720 is where it is at...

https://lime-technology.com/forum/index.php?topic=44030.msg420434#msg420434

Link to comment

I am about to setup a OE vm on my unRAID and was just wondering... does it mean we cannot use OEs built-inn update function to upgrade OE to newer versions? So if a new version gets released, we have to setup a new vm and all the settings over again?

 

Thanks

 

The only upgrade path for the OE using the LT template is for a new template to be released.  The internal OE upgrade mechanism (or manual upgrade) will not work.

 

John

Link to comment

Ok thanks.

 

I am getting nowhere with OE. I followed the tutorial in the first post in creating the VM and modifying the xml before start, also tested with both images.

 

Am I missing something obvious here?

 

You will get that error when OE cannot find a partition.

 

Are you using seabios or ovmf?

Are you sure you changed disk to 'sata'?

 

Remember, if you edit the VM again after making manual changes to the XML, those changes will be erased.

 

Post your XML here in code tags.

 

John

Link to comment

I am using SeaBios, didn't pay much attention to it, it was the default value plus the tutorial used the same...

One thing I noticed here compared to the xml created when using LT template, is that it creates a mount to appdata, but here it does not ask for that...

 

This is the xml after I edited it and started the VM for the first time.

<domain type='kvm'>
  <name>OpenElec-unraid</name>
  <uuid>1d7ba658-92da-2448-1543-b5691a3e41a8</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="openelec.png" os="openelec"/>
  </metadata>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/vdisks/openelec/OpenElec-unraid/vdisk1.img'/>
      <target dev='hda' bus='sata'/>
      <boot order='2'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/ISOs/OpenELEC-unRAID.x86_64-5.95.3_1.img'/>
      <target dev='hdb' bus='sata'/>
      <boot order='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:c6:20:f0'/>
      <source bridge='br0'/>
      <model type='e1000'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/OpenElec-unraid.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='no'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Link to comment

You are mixing two different methodologies here (see in red below):

 

<disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/user/ISOs/OpenELEC-unRAID.x86_64-5.95.3_1.img'/>

      <target dev='hdb' bus='sata'/>

      <boot order='1'/>

    </disk>

 

My method for installing OE Final in a VM uses the image file you download from OE's website...not the LT OE template IMG file.

 

Download this and extract tha IMG file out of it into your Images repo:  http://releases.openelec.tv/OpenELEC-Generic.x86_64-6.0.0.img.gz

 

Change the red line above to point to the OpenELEC-Generic.x86_64-6.0.0.img file like below:

 

<disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/ISOs/OpenELEC-Generic.x86_64-6.0.0.img'/>
      <target dev='hdb' bus='sata'/>
      <boot order='1'/>
    </disk>

 

This should get you going.  Your other option is to just create the OE VM from the LT template but OE will not be at v6 Final.

 

John

Link to comment

Thanks! That was it :) I corrected the image, and got the OE installer. After install was complete (I guess), forced stopped the VM, and removed the OE install image disk.

 

But when I start it again, is does not boot up. Perhaps is does not work with VNC innside OE? and I must assign a GPU to it?

Link to comment

Thanks! That was it :) I corrected the image, and got the OE installer. After install was complete (I guess), forced stopped the VM, and removed the OE install image disk.

 

But when I start it again, is does not boot up. Perhaps is does not work with VNC innside OE? and I must assign a GPU to it?

 

OE does not have support for virtualized GPU.  You must have a GPU passed through.

 

Also, post install you must make sure these changes to the XML are changed:

 

Now that we created the VM, we need to make some changes to the XML prior to booting it the first time.  Below is the XML that was created from the example above with the changes that I made shown in RED.  In a nutshell, here are the things that need to change:

 

- bus types for each disk need to be changed from 'virtio' to 'sata'

- remove the 'address' lines from both disk sections

- change the 'boot order' for hda from 1 to 2

- add '<boot order='1'/>' to hdb

- change 'model type' for the network card from 'virtio' to 'e1000'

- remove the 'address' line from both network card section

 

John

Link to comment

One thing I cannot seem to get working is telnet towards the OE VM. Keep getting "Connection refused". I have ssh enabled in OE. FTP works just fine so I can access files and such.

 

Or is there a way I can avoid using ssh, and just map a /appdata/openelec folder to my cache to store OE userdata files?

Link to comment

One thing I cannot seem to get working is telnet towards the OE VM. Keep getting "Connection refused". I have ssh enabled in OE. FTP works just fine so I can access files and such.

 

Or is there a way I can avoid using ssh, and just map a /appdata/openelec folder to my cache to store OE userdata files?

 

Are you using the correct network bridge in the KVM settings (br0).

 

Go to  System --> System Info in OE and see what IP it is being assigned.  Is it consistent with the rest of your network?

 

As far as appdata..not with this solution unless you netboot OE.  Otherwise all settings are contained within the IMG file.

 

John

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.