kvm autostart doesnt work

    • Official Post

    It is working on my systems. What is the output of:


    sudo ls -al /etc/libvirt/qemu/autostart/

    sudo virsh list --autostart


    And did you look at the logs for the VMs in /var/log/libvirt/qemu/? Are you using usb storage?

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • this is what mine shows


    Code
    sudo ls -al /etc/libvirt/qemu/autostart/
    total 8
    drwxr-xr-x 2 root root 4096 May  9 15:48 .
    drwxr-xr-x 4 root root 4096 May  7 20:21 ..
    lrwxrwxrwx 1 root root   27 May  9 15:48 Win10.xml -> /etc/libvirt/qemu/Win10.xml
    
    sudo virsh list --autostart
     Id   Name    State
    -----------------------
     2    Win10   running
  • sudo ls -al /etc/libvirt/qemu/autostart/

    Code
    total 8
    drwxr-xr-x 2 root root 4096 May  7 14:54 .
    drwxr-xr-x 4 root root 4096 May  9 20:33 ..
    lrwxrwxrwx 1 root root   31 May  7 14:54 1c-server.xml -> /etc/libvirt/qemu/1c-server.xml
    lrwxrwxrwx 1 root root   29 May  7 14:54 mikopbx.xml -> /etc/libvirt/qemu/mikopbx.xml


    sudo virsh list --autostart

    Code
     Id   Name        State
    ---------------------------
     3    1c-server   running
     4    mikopbx     running


    And did you look at the logs for the VMs in /var/log/libvirt/qemu/? Are you using usb storage?

    Code
    2024-05-09T17:31:30.327091Z qemu-system-x86_64: warning: Spice: ../server/reds.cpp:2551:reds_init_socket: getaddrinfo(0.0.0.0,5901): Address family for hostname not supported
    2024-05-09T17:31:30.327109Z qemu-system-x86_64: warning: Spice: ../server/reds.cpp:3442:do_spice_init: Failed to open SPICE sockets
    2024-05-09T17:31:30.327115Z qemu-system-x86_64: failed to initialize spice server
    2024-05-09 17:31:30.401+0000: shutting down, reason=failed

    here's the problem, how can i solve this?

    • Official Post

    here's the problem, how can i solve this?

    The plugin has a menu that lets you remove spice and then you could re-add it.

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Find solution by disabling (disgusting) ipv6

    in /etc/sysctl.conf add the following lines at end


    Code
    # Turn off IPv6
    net.ipv6.conf.all.disable_ipv6 = 1

    then

    Code
    sysctl -p

    and reboot for success

  • mcking230

    Added the Label resolved
  • mcking230

    Added the Label OMV 7.x
    • Official Post

    Find solution by disabling (disgusting) ipv6

    in /etc/sysctl.conf add the following lines at end

    I don't know why that works but I do not have ipv6 disabled on my systems.

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hello everyone, after 3 versions of OMV over the years I decided to join the forum. First off - thanks very much to all the dedicated contributors of this great software!


    I was having the same troubles as mcking230. The vm wouldn't autostart, Spice wasn't activated and later it showed the same red error message upon the attempt to remove it from the vm.

    Find solution by disabling (disgusting) ipv6

    in /etc/sysctl.conf add the following lines at end


    Code
    # Turn off IPv6
    net.ipv6.conf.all.disable_ipv6 = 1

    then

    Code
    sysctl -p

    and reboot for success

    This worked for me as well.


    As a sidenote: After the deactivation of IPv6 I could connect to my vm (Debian 12 with Xfce4 and xRDP) via RDP from a windows machine. That was impossible before.

    • Official Post

    What kind of network setup do you have on your OMV system. I can't replicate this even with no ipv6 setup. Please post the output of: ip a

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Code
    ip a

    as user root yields the following result:

    The mini server is hooked up to a FritzBox and gets its ip address via DHCP. The FritzBox is configured to provide always the same to this machine.

    • Official Post

    Your system has no ipv6 networking now. Not sure if it did before. I added lines to only enable ipv6 forwarding if ipv6 networking is detected. https://github.com/OpenMediaVa…/main/debian/postinst#L15 Not sure what else I can add since I can't reproduce the issue.

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Would you like me to test this by commenting out the statement to disable IPv6? Or is it not just as easy as this to revert to the former configuration? And when would the new version of the package (?) be available for installation? Incidently, I was notified about an update for KVM only today. This got something to do with your change?

    • Official Post

    Would you like me to test this by commenting out the statement to disable IPv6? Or is it not just as easy as this to revert to the former configuration?

    If you comment it out and reboot, it will revert your change.


    And when would the new version of the package (?) be available for installation? Incidently, I was notified about an update for KVM only today. This got something to do with your change?

    The update you are being notified about has the change I was referring to.

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Commenting out the configuration line to deactivate IPv6 brought back the error messages for the vm. Consequently, it did not autostart. So I will disable IPv6 again to get it working again - at least for the time being.

  • Another interesting result of the test: After uncommenting the IPv6 deactivation line, saving the conf file and rebooting the server - the vm would autostart again. UnfortunateIy, I forgot to perfom the second part of mcking230 suggestion after editing sysctl.config:

    Quote
    Code
    sysctl -p

    This prevented me from loggin in via RDP again. So I executed sysctl -p, rebooted and was able to log in to the vm with RDP again. Dunno whether that is of some diagnostic value to the experts.

    • Official Post

    sysctl -p is only needed to activate the setting without rebooting. What is the output of: grep -ir forward /etc/sysctl.d/*

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Code
    ***@server:~$ grep -ir forward /etc/sysctl.d/*
    /etc/sysctl.d/99-sysctl.conf:# Uncomment the next line to enable packet forwarding for IPv4
    /etc/sysctl.d/99-sysctl.conf:#net.ipv4.ip_forward=1
    /etc/sysctl.d/99-sysctl.conf:# Uncomment the next line to enable packet forwarding for IPv6
    /etc/sysctl.d/99-sysctl.conf:#net.ipv6.conf.all.forwarding=1
    /etc/sysctl.d/ip_forward.conf:net.ipv4.ip_forward=1
    • Official Post

    What about: ip a

    omv 7.7.0-2 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.1 | kvm 7.0.17 | compose 7.3.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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!