Virtualbox on omv4

    • Offizieller Beitrag

    Do they log files (in the same directory as the VM files) tell you anything?

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • I just deleted all log so i could get a new one.
    (Just restarted the omv server and logged into phpvirtualbox)
    but there's no log files yet?


    so where can i look to get the log file?
    an omv-log?

  • I found this (/var/lib/vbox/.config/VirtualBox.VBoxSVC.log)


    VirtualBox XPCOM Server 5.2.10_Debian r121806 linux.amd64 (Apr 26 2018 08:56:30) release log
    00:00:00.000553 main Log opened 2018-06-18T14:30:37.726895000Z
    00:00:00.000555 main Build Type: release
    00:00:00.000557 main OS Product: Linux
    00:00:00.000558 main OS Release: 4.16.0-0.bpo.2-amd64
    00:00:00.000559 main OS Version: #1 SMP Debian 4.16.12-1~bpo9+1 (2018-06-03)
    00:00:00.000574 main DMI Product Name: All Series
    00:00:00.000579 main DMI Product Version: System Version
    00:00:00.000621 main Host RAM: 15922MB (15.5GB) total, 15753MB (15.3GB) available
    00:00:00.000625 main Executable: /usr/lib/virtualbox/VBoxSVC
    00:00:00.000625 main Process ID: 928
    00:00:00.000626 main Package type: LINUX_64BITS_GENERIC (OSE)
    00:00:00.001754 main IPC socket path: /tmp/.vbox-vbox-ipc/ipcd
    00:00:00.106451 nspr-2 VirtualBox: object creation starts
    00:00:00.107200 nspr-2 Home directory: '/var/lib/vbox/.config/VirtualBox'
    00:00:00.107877 nspr-2 Loading settings file "/var/lib/vbox/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
    00:00:00.112525 nspr-2 Successfully initialised host USB using sysfs
    00:00:00.157970 nspr-2 HostDnsMonitorProxy::notify
    00:00:00.159920 nspr-2 Failed to open "/dev/vboxdrvu", errno=2, rc=VERR_VM_DRIVER_NOT_INSTALLED
    00:00:00.163099 nspr-2 VD: VDInit finished with VINF_SUCCESS
    00:00:00.163161 nspr-2 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={0eb668d2-495e-5a36-8890-29999b5f030c} aComponent={SystemPropertiesWrap} aText={Cannot determine default Guest Additions ISO location. Most likely they are not$
    00:00:00.170843 nspr-2 Loading settings file "/srv/dev-disk-by-label-www/virtual/Windows10/Windows10.vbox" with version "1.15-linux"
    00:00:00.175822 nspr-2 VirtualBox: object created
    00:00:00.207931 nspr-3 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'exist.'}, preserve=false aResultDet$
    00:00:00.239235 nspr-2 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'appropriate'}, preserve=false aResu$
    00:00:00.278412 nspr-3 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'linux-headers-amd64.'}, preserve=fa$
    00:00:00.313855 nspr-2 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'fixed.'}, preserve=false aResultDet$

  • Okay i played a little bit around and im now down to this:
    (I added a rule /follow this guide http://www.mgreene.org/?cat=39 and this solved the problem with 00:00:00.159920 nspr-2 Failed to open "/dev/vboxdrvu", errno=2, rc=VERR_VM_DRIVER_NOT_INSTALLED)


    VirtualBox XPCOM Server 5.2.10_Debian r121806 linux.amd64 (Apr 26 2018 08:56:30) release log
    00:00:00.000152 main Log opened 2018-06-18T20:07:38.253806000Z
    00:00:00.000154 main Build Type: release
    00:00:00.000157 main OS Product: Linux
    00:00:00.000158 main OS Release: 4.16.0-0.bpo.2-amd64
    00:00:00.000159 main OS Version: #1 SMP Debian 4.16.12-1~bpo9+1 (2018-06-03)
    00:00:00.000177 main DMI Product Name: All Series
    00:00:00.000183 main DMI Product Version: System Version
    00:00:00.000232 main Host RAM: 15922MB (15.5GB) total, 14660MB (14.3GB) available
    00:00:00.000236 main Executable: /usr/lib/virtualbox/VBoxSVC
    00:00:00.000237 main Process ID: 8414
    00:00:00.000237 main Package type: LINUX_64BITS_GENERIC (OSE)
    00:00:00.001415 main IPC socket path: /tmp/.vbox-vbox-ipc/ipcd
    00:00:00.104802 nspr-2 VirtualBox: object creation starts
    00:00:00.104886 nspr-2 Home directory: '/var/lib/vbox/.config/VirtualBox'
    00:00:00.105056 nspr-2 Loading settings file "/var/lib/vbox/.config/VirtualBox/VirtualBox.xml" with version "1.12-linux"
    00:00:00.106715 nspr-2 Successfully initialised host USB using sysfs
    00:00:00.110824 nspr-2 NetIfAdpCtlOut: VBoxNetAdpCtl: Error while retrieving link speed for docker0: VBoxNetAdpCtl: ioctl failed: Operation not supported
    00:00:00.111993 nspr-2 NAT: resolv.conf: nameserver 208.67.222.222
    00:00:00.112006 nspr-2 NAT: resolv.conf: nameserver 208.67.220.220
    00:00:00.112023 nspr-2 HostDnsMonitor: old information
    00:00:00.112027 nspr-2 no server entries
    00:00:00.112030 nspr-2 no domain set
    00:00:00.112033 nspr-2 no search string entries
    00:00:00.112035 nspr-2 HostDnsMonitor: new information
    00:00:00.112038 nspr-2 server 1: 208.67.222.222
    00:00:00.112041 nspr-2 server 2: 208.67.220.220
    00:00:00.112044 nspr-2 domain: kekecserver
    00:00:00.112047 nspr-2 search string 1: kekecserver
    00:00:00.112053 nspr-2 HostDnsMonitorProxy::notify
    00:00:00.115329 nspr-2 VD: VDInit finished with VINF_SUCCESS
    00:00:00.115413 nspr-2 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={0eb668d2-495e-5a36-8890-29999b5f030c} aComponent={SystemPropertiesWrap} aText={Cannot determine default Guest Addition$
    00:00:00.118808 nspr-2 Loading settings file "/srv/dev-disk-by-label-www/virtual/Windows10/Windows10.vbox" with version "1.15-linux"
    00:00:00.121096 nspr-2 VirtualBox: object created



    EDIT: the last error i have is because theres no Guest addtions installed or the path is not set.
    I downloaded the guest.iso called VBoxGuestAdditions_5.2.10.iso
    I renamed it and put it in:
    /usr/share/virtualbox/VBoxGuestAdditions.iso



    and then i used this cmd to see if it worked and it did:
    VBoxManage list systemproperties

    • Offizieller Beitrag

    I guess I will have to try this on my system. I haven't used virtualbox in a long time.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • I've the same problem after reboot of the server. The VM doesn't start automatically although activated in the settings. Here is the log file:




    Will try the workaround from the link @kekec888



    Edit: the workaround didn't work because the changes were only made for "vboxdrvu" and "vboxnetctl". The permissions stay the same for "vboxdrv".



    Edit 2: I found out that 60-virtualbox-dkms.rules changed the permissions of "vboxdrv" back to the old settings. Now I have



    Code
    crw-rw---- 1 root  vboxusers  10,    58 Jun 19 23:19 vboxdrv
    crw-rw---- 1 root  vboxusers  10,    57 Jun 19 23:19 vboxdrvu
    crw-rw---- 1 root  vboxusers  10,    56 Jun 19 23:19 vboxnetctl


    After a reboot the VM is not in the "powered off" state but unfortunately now it shows "aborted"

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    3 Mal editiert, zuletzt von Huberer ()

  • @Huberer hmm mine stays the same, but you are right with file vboxdrv, but that doesnt seems to affect or give any errors in log...
    Try this for autoboot:


    I made a workaround solution - i created a script in /etc/init.d/startvm
    startvm file content:
    --------------------------------------------------------------------------------------------------------
    #!/bin/bash
    #
    #This init script autostarts necessary vms at boot
    #and saves running vms on shutdown
    # Sed explanation: sed -e 's/^.//' -e 's/.$//'
    # 1. -e means to allow multiple arguments in a single sed command
    # 2. 's/^.//' means to substitute (s) / at the beginning of the line (^), any character (.) / [substitute with nothing] /
    # 3. 's/.$//' means to substitute (s) / any character (.), at the end of the line / [substitute with nothing] /


    VBOXUSER=vbox
    RUNNINGVMS=$(sudo -H -u $VBOXUSER vboxmanage list runningvms | cut -d " " -f1 | sed -e 's/^.//' -e 's/.$//')
    STOPPEDVMS=$(sudo -H -u $VBOXUSER vboxmanage list vms | cut -d " " -f1 | sed -e 's/^.//' -e 's/.$//')



    case "$1" in
    start)
    for i in $STOPPEDVMS
    do
    echo "Starting" $i "VM"
    sudo -H -u $VBOXUSER vboxmanage startvm $i --type headless
    sleep 5
    done
    ;;
    stop)
    for i in $RUNNINGVMS
    do
    echo "Saving state of" $i "VM"
    sudo -H -u $VBOXUSER vboxmanage controlvm $i savestate
    done
    ;;
    *)
    echo "Usage: /etc/init.d/startvm {start|stop}"
    exit 1
    ;;
    esac
    exit 0
    --------------------------------------------------------------------------------------------------------
    *This script will start all VM's and will put all VM's to savestate



    I ran this cmd to make it execute:
    chmod +x /etc/init.d/startvm


    Then i insalled sysv-rc-conf to mng my rc.d :
    apt-get install sysv-rc-conf


    run the application with:
    sysv-rc-conf


    and here i choose 2 and 6 (2 for startup and 6 for shutdown/reboot)



    And now its working :D


    Feel free to ask any questions :)

    • Offizieller Beitrag

    On my test system, I just created a VM and set it to autostart in the Virtual Machines tab of the plugin. I rebooted my system (I didn't manually shutdown the running VM) and the newly created VM was running after reboot. The plugin is doing the right thing according to the virtualbox documentation by adding pvbx/startupMode to the extraData for the VM. Not sure how the plugin is not working for some.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • @kekec888


    Thank you very much. I've tested your script and everything runs fine :thumbup:
    After reboot the VM is back again. Perfect.


    @ryecoaaron


    Don't know but in my case the VM didn't start after reboot. Fortunately the script of @kekec888 runs good.

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • @kekec888


    1. Thank you for the script... it seems to do what is expected (it starts VMs, not sure where I would see if it REALLY saved the state (or just started newly):


    2. Is there a chance to enhance the script a bit:


    Your scrip starts ALL VMs, but I may want to have only some started, not all.
    Is that doable?
    If that helped, I could change the name of the VM to start (or include) the word "AUTOSTART" if that had


    Thx again!


    Nico

    OMV: 4.1.19-1
    HW: Athlon 200GE / Gigabyte Aorus M (B450) / 16 GB RAM
    Boot Drive: Kingston 240GB nVME
    Data Drives: 3 HDD

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!