Jump to content

** GUIDE ** Running Tech and Me Owncloud VM appliance on KVM on Unraid.

5 posts in this topic Last Reply

Recommended Posts



I deciced to move away from the owncloud Docker for multiple reasons.  I was looking for a good appliance VM with Owncloud and automated updates, webmin, other enhencements over the official owncloud VM.  It's where I found the great site techandme.se.  They create and maintain multiple VM appliances; one of them is an "owncloud VM".


Getting started


1. Get the "Ubuntu 16.04 main (or mirror) Preinstalled Owncloud (PHP 7.0)" from this site : https://www.techandme.se/pre-configured-owncloud-installaton/


2. Extract the ZIP or RAR to a folder on your cache drive (or SSD where you want to store the VMs)

I suggest : /mnt/cache/VMs/Disks/owncloud/


3. Logon in SSH to your Unraid box with root and convert the vmdk using this command :


qemu-img convert -p -f vmdk -O raw /mnt/cache/VMs/Disks/owncloud/owncloud.vmdk /mnt/cache/VMs/Disks/owncloud/owncloud.img


4. When the conversion is completed, delete the VMDK and other VMware files (*.vmdk, *.vmx, etc) in the /mnt/cache/VMs/Disks/owncloud/ folder and keep only the new "owncloud.img"


5. create a new VM that point to a Ubuntu template.  You can use my XML provided below.


7. Boot the VM and follow the Install scripts questions, it's all automated!



VM details from my XML :


  • 1 CPU, 2 Core (6 and 7) - change to the core you want to pin
  • 2GB RAM, max 3GB RAM  - change to RAM you want, 2GB works fine for me
  • br0 network - give an IP from your router, accessible from the LAN
  • VNC passwd is 'test', keymap is 'fr-ca'  - change to what you want
  • 9p Mount:  /unraid (point to /mnt/user)


Code of the XML :


<domain type='kvm' id='4'>
  <description>Owncloud VM (techandme.se)</description>
    <vmtemplate xmlns="unraid" name="Ubuntu" icon="ubuntu.png" os="ubuntu"/>
  <memory unit='KiB'>3145728</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>2</vcpu>
    <vcpupin vcpu='0' cpuset='6'/>
    <vcpupin vcpu='1' cpuset='7'/>
    <type arch='x86_64' machine='pc-q35-2.5'>hvm</type>
    <topology sockets='1' cores='2' threads='1'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/VMs/Disks/owncloud/owncloud.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/'/>
      <target dir='unraid'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    <interface type='bridge'>
      <mac address='52:54:00:2a:5f:99'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-Owncloud/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='' keymap='fr-ca'>
      <listen type='address' address=''/>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>


Configuring 9P Sharing (passthrough of Unraid /mnt/user) :


1. Login on the newly build VM using the ocadmin user and the password you setup in the first boot of the VM.

2. become root by typing sudo -i

3. Create the folder /mnt/unraid:

mkdir /mnt/unraid

4. type the following command to go inside the fstab file :

nano /etc/fstab

5. On the last blank line of file fstab, add the following :

unraid /mnt/unraid 9p rw,dirsync,relatime,trans=virtio,version=9p2000.L,posixacl,cache=loose 0 0

6. Quit & save the fstab file (ctrl+x, Yes to save).

7. Reboot the VM.



The new sharing should work and in your Owncloud, you should be able to use "External Storage Support" to point a "local" share to the /mnt/unraid/WhateverFolderYouDesire.



Share this post

Link to post

the VM works without using 9p for networking

I followed the instructions but it starts in emergency mode when using the 9p network addon.




Share this post

Link to post

I am new to all of this.  I don't know much shell script, so please bear with me.  How do i ssh into my unraid usb stick to mount the vm?

Share this post

Link to post

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.

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.