New openmediavault-kvm plugin

  • Why are we not using KVM?

    It should be. Can you post the xml where it isn't being used?


    but I just looked at some of you code and was just wondering what you are trying to achieve with this:

    That code lets the VM use kvm for an x86_64 VM when run on an amd64 or i386 host but uses qemu when run on armhf or arm64.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yes here is one:

    What is the output of: arch

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • It is x86_64

    Not sure how I broke this but it is fixed in 5.0.15 in the repo now.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • When i trie to start an existing VM i get this error:

    internal error: process exited while connecting to monitor: qemu-system-x86_64: -realtime mlock=off: warning: '-realtime mlock=...' is deprecated, please use '-overcommit mem-lock=...' instead
    2021-03-24T10:21:37.372405Z qemu-system-x86_64: -drive file=/srv/dev-disk-by-uuid-902507df-dca3-495d-b83e-ece79565570d/VM/Virtual Hard Disks/Windows 10 Pro.raw,format=raw,if=none,id=drive-virtio-disk0: Could not open '/srv/dev-disk-by-uuid-902507df-dca3-495d-b83e-ece79565570d/VM/Virtual Hard Disks/Windows 10 Pro.raw': Permission denied


    What can i do, that the VM starts?

  • Could not open '/srv/dev-disk-by-uuid-902507df-dca3-495d-b83e-ece79565570d/VM/Virtual Hard Disks/Windows 10 Pro.raw': Permission denied


    What can i do, that the VM starts?

    You need to fix the permissions issue. What kind of filesystem is the mountpoint that you picked?

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Can i set german keymap?

    It seems this is set by the vnc or spice client not the VM. If the keymap is wrong with the noVNC container, I don't have a way to change that and you will have to use a normal vnc or spice client.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • How can i use VLANS in the VMs?


    I tried to create a brigde, but on the bridge i cannot create a VLAN.

    Use a macvtap network and then the vlan would be setup in the VM.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • i cannot ping my machine and the vlan ip from the omv system

    macvtap doesn't allow host-guest communication. What is your use case? If you need a bridge, just delete the network adapter, add a bridge, and then apply the config. I recommend a static IP when doing this. After that, when creating a VM, you would select the bridge model for the network adapter.


    The plugin is meant to be simple. Using VLANs is not simple and requires lots of non-plugin controllable config. For advanced config, you can always use virt-manager.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Ok but i can not create on a brige a vlan interface. When i trie to create this i get this error:


    Error #0:

    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run --no-color systemd-networkd 2>&1' with exit code '1': debian:

    ---------- ID: remove_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 10:30:25.429066 Duration: 0.92 ms Changes: ---------- file.find:

    ---------- ID: remove_empty_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 10:30:25.430068 Duration: 1.369 ms Changes: ---------- file.find:

    ---------- ID: remove_netplan_config_files Function: module.run Result: True Comment: file.find: ['/etc/netplan/10-openmediavault-default.yaml', '/etc/netplan/20-openmediavault-enp2s0.yaml', '/etc/netplan/50-openmediavault-br0.100.yaml', '/etc/netplan/60-openmediavault-br0.yaml'] Started: 10:30:25.431510 Duration: 1.02 ms Changes: ---------- file.find: - /etc/netplan/10-openmediavault-default.yaml - /etc/netplan/20-openmediavault-enp2s0.yaml - /etc/netplan/50-openmediavault-br0.100.yaml - /etc/netplan/60-openmediavault-br0.yaml

    ---------- ID: configure_etc_network_interfaces Function: file.managed Name: /etc/network/interfaces Result: True Comment: File /etc/network/interfaces is in the correct state Started: 10:30:25.433509 Duration: 18.103 ms Changes:

    ---------- ID: symlink_systemd_resolvconf Function: file.symlink Name: /etc/resolv.conf Result: True Comment: Symlink /etc/resolv.conf is present and owned by root:root Started: 10:30:25.451689 Duration: 1080.705 ms Changes:

    ---------- ID: configure_netplan_default Function: file.managed Name: /etc/netplan/10-openmediavault-default.yaml Result: True Comment: File /etc/netplan/10-openmediavault-default.yaml updated Started: 10:30:26.532547 Duration: 6.628 ms Changes: ---------- diff: New file mode: 0644

    ---------- ID: configure_netplan_ethernet_enp2s0 Function: file.managed Name: /etc/netplan/20-openmediavault-enp2s0.yaml Result: True Comment: File /etc/netplan/20-openmediavault-enp2s0.yaml updated Started: 10:30:26.539253 Duration: 18.352 ms Changes: ---------- diff: New file mode: 0644

    ---------- ID: configure_netplan_vlan_br0.100 Function: file.managed Name: /etc/netplan/50-openmediavault-br0.100.yaml Result: True Comment: File /etc/netplan/50-openmediavault-br0.100.yaml updated Started: 10:30:26.557682 Duration: 16.405 ms Changes: ---------- diff: New file mode: 0644

    ---------- ID: configure_netplan_bridge_br0 Function: file.managed Name: /etc/netplan/60-openmediavault-br0.yaml Result: True Comment: File /etc/netplan/60-openmediavault-br0.yaml updated Started: 10:30:26.574165 Duration: 29.269 ms Changes: ---------- diff: New file mode: 0644

    ---------- ID: apply_netplan_config Function: cmd.run Name: netplan apply Result: False Comment: Command "netplan apply" run Started: 10:30:26.603549 Duration: 123.41 ms Changes: ---------- pid: 4964 retcode: 78 stderr: /etc/netplan/50-openmediavault-br0.100.yaml:14:13: Error in network definition: br0.100: interface 'br0' is not defined link: br0 ^ stdout:

    Summary for debian

    ------------

    Succeeded: 9 (changed=8)

    Failed: 1

    ------------

    Total states run: 10

    Total run time: 1.296 s in /usr/share/php/openmediavault/system/process.inc:195

    Stack trace:

    #0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(62): OMV\System\Process->execute()

    #1 /usr/share/openmediavault/engined/rpc/config.inc(167): OMV\Engine\Module\ServiceAbstract->deploy()

    #2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)

    #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

    #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)

    #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusQA...', '/tmp/bgoutputid...')

    #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))

    #7 /usr/share/openmediavault/engined/rpc/config.inc(189): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)

    #8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)

    #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

    #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)

    #11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)

    #12 {main}

  • br0.100: interface 'br0' is not defined link: br0 ^ stdout:

    You need to file an OMV issue for that. It must not be configuring bridges with vlans properly.

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Does it need a Save To new name option?

    I was trying to keep it simple to not need that since I didn't think a filename would already exist. The code seems to be doing something wrong in your case. What is the source filename?

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I was trying to keep it simple

    Dooh, my bad, I was the one being simple and doing something wrong in my case...

    I had a pool added with sub-directories in it (virtualbox folder structure), the .vdi was in a sub-directory and I was selecting the directory name to Convert!

    Note to self, read the screen thoroughly.

    Thanks for the reply and the great work on this KVM plugin.


    I'm still unable to connect via noVNC, you mentioned DNS may be an issue, what DNS servers can I try?

    Currently using gatewayIP and 1.1.1.1

    All VM's configured to use your Default network, also tried a macvtap bridge network.

    OMV server has a static assigned IP from DHCP.

    When trying to connect via noVNC (dougw/novnc docker container) there is no other vnc connections to the VM.

    I also have a docker container binhex/arch-krusader which is a file manager connecting via noVNC working good.

    In Firefox Web Developer Tool, the Network traffic shows 2 errors,

    1. Firefox can’t establish a connection to the server at wss://myomvservername.local:8081/websockify.

    2. Failed when connecting: Failed to connect to server ( (code: 1006)) (very generic err code, not much joy googling that)

    Is there anything else I could check or info I can supply to track down my issue?

  • Dooh, my bad, I was the one being simple and doing something wrong in my case...

    I had a pool added with sub-directories in it (virtualbox folder structure), the .vdi was in a sub-directory and I was selecting the directory name to Convert!

    I guess I could look to see why it is showing directories. That is wrong to show them.

    The container itself has to be able to resolve the OMV host's name. If you are using 1.1.1.1, that will not know the ip address for your hostname. Can you try changing your OMV system's dns server to your router?


    As a test, could you also try spinning up a container manually to see if using your OMV's systems IP address (instead of hostname) works?

    You might need to adjust the vnc port.

    docker run -d -e REMOTE_HOST=[YOUR_OMV_IP_ADDRESS] -e REMOTE_PORT=5901 -p 8081:8081 dougw/novnc

    omv 6.0.30-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.19 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!