VirtualBox Plugin for unRAID v5 and v6


theone

Recommended Posts

So if I start and stop VM's using phpvirtualbox, the sessionlist is never updated? I ran into an issue yesterday where I tried to stop the array so I could reboot, and I intentionally left some VM's running to see how the plugin would handle it. The VM's that were on the sessionlist savestated automatically, but a VM that I started from phpvirtualbox was still running, and kept the array from stopping. I manually saved it from the command line, and the array finished stopping.

 

I stop all running VMs by doing a SAVESTATE.

At the same time I also update the vms_session.cfg file with the save running vms list.

    # Get running Virtual Machines and save session
    VBOX_RUNNING_VMS=$(/opt/VirtualBox/VBoxManage list runningvms)
    # Check if any Virtual Machines are running
    if [ "$VBOX_RUNNING_VMS" != "" ] ; then
      # If some Virtual Machines are running save new session - otherwise keep previous session - this is to avoid erasing of session upon unRAID unmounting if VirtualBox has already stopped
      echo $VBOX_RUNNING_VMS > ${VBOX_PLUGIN_PATH}/vms_session.cfg
      # Stop and savestate of all running VMs
      echo $VBOX_RUNNING_VMS | cut -d\" -f2  | while read VM; do
        logit "Saving state of Virtual Machine: $VM ..."
        /opt/VirtualBox/VBoxManage controlvm "$VM" savestate
      done
      logit "All running Virtual Machines were saved"
    else
      logit "No Virtual Machines running - nothing to save"
    fi

 

The above command command is invoked upon WEBUI stop button:

<form name="stop" method="POST" action="/update.htm" target="progressFrame">
              <input type="hidden" name="cmd" value="/etc/rc.d/rc.virtualbox stop">
              <input type="submit" name="runCmd" value="Stop">
            </form>

or during array stop automatically:

<FILE Name="/usr/local/emhttp/plugins/virtualbox/event/unmounting_disks" Mode="0770">
<INLINE>
<![CDATA[
#!/bin/bash
/etc/rc.d/rc.virtualbox stop
]]>
</INLINE>
</FILE>

 

 

Link to comment

So if I start and stop VM's using phpvirtualbox, the sessionlist is never updated? I ran into an issue yesterday where I tried to stop the array so I could reboot, and I intentionally left some VM's running to see how the plugin would handle it. The VM's that were on the sessionlist savestated automatically, but a VM that I started from phpvirtualbox was still running, and kept the array from stopping. I manually saved it from the command line, and the array finished stopping.

 

Please post a screenshot of the WEBUI when you have virtualbox running and some VMs are shown as in session and others aren't but are running.

VMs.PNG.225496a0c78e63237621e0106f1340e8.PNG

MoreVMs.PNG.a88d67ed4878f93fa78793d5fd92d91f.PNG

Link to comment

jonathanm,

 

Can you post the following (in this order) for the "MoveVMs" instance you showed above:

1. Existing vms_session.cfg file content.

2. Output of /opt/VirtualBox/VBoxManage list runningvms from terminal.

 

Press STOP button in VirtualBox Plugin WEBUI

 

3. Syslog

4. vms_session.cfg file content (again).

 

Link to comment

Can you post the following (in this order) for the "MoveVMs" instance you showed above:

1. Existing vms_session.cfg file content.

2. Output of /opt/VirtualBox/VBoxManage list runningvms from terminal.

Press STOP button in VirtualBox Plugin WEBUI

3. Syslog

4. vms_session.cfg file content (again).

The picture is labled "MoreVMs" not "MoveVMs"  :)

1.

"XP" {57133605-735f-4d6f-a8ea-392cb1f54ef3} "MinecraftTurnkey" {0486ab8a-b94b-445c-b13e-1484b57f0806}

2.

"XP" {57133605-735f-4d6f-a8ea-392cb1f54ef3}
"Slack1337" {b5491bcb-42ec-464e-a0da-b0cd5e2b4f6c}
"Pardus" {61ee87f5-b044-4e49-89f4-bd4db8983c3e}
"Windows Server 2003" {eaad3b3b-539a-4d25-b7cb-fdc592803e5d}
"MinecraftTurnkey" {0486ab8a-b94b-445c-b13e-1484b57f0806}

3.

Jul 11 18:37:22 AVFiles in.telnetd[12436]: connect from 192.168.117.3 (192.168.117.3)
Jul 11 18:37:27 AVFiles login[12437]: ROOT LOGIN  on '/dev/pts/0' from 'WORKSTATION1.lan'
Jul 11 18:38:49 AVFiles rc.virtualbox[12476]: Saving state of Virtual Machine: XP ...
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: reset low-speed USB device number 6 using xhci_hcd
Jul 11 18:39:03 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 5.
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: hub failed to enable device, error -22
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: reset low-speed USB device number 6 using xhci_hcd
Jul 11 18:39:03 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 5.
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: hub failed to enable device, error -22
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: reset low-speed USB device number 6 using xhci_hcd
Jul 11 18:39:03 AVFiles kernel: usb 3-10.1: device descriptor read/all, error 2
Jul 11 18:39:04 AVFiles kernel: usb 3-10.1: reset low-speed USB device number 6 using xhci_hcd
Jul 11 18:39:04 AVFiles kernel: usb 3-10.1: device descriptor read/all, error 2
Jul 11 18:39:04 AVFiles kernel: usb 3-10.1: USB disconnect, device number 6
Jul 11 18:39:04 AVFiles kernel: xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804088b66c0
Jul 11 18:39:04 AVFiles kernel: usb 3-10.4.3: reset low-speed USB device number 10 using xhci_hcd
Jul 11 18:39:04 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 9.
Jul 11 18:39:04 AVFiles kernel: usb 3-10.4.3: hub failed to enable device, error -22
Jul 11 18:39:04 AVFiles kernel: usb 3-10.4.3: reset low-speed USB device number 10 using xhci_hcd
Jul 11 18:39:04 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 9.
Jul 11 18:39:04 AVFiles kernel: usb 3-10.4.3: hub failed to enable device, error -22
Jul 11 18:39:05 AVFiles kernel: usb 3-10.4.3: reset low-speed USB device number 10 using xhci_hcd
Jul 11 18:39:05 AVFiles kernel: xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880408cc8a20
Jul 11 18:39:05 AVFiles kernel: usb 3-10.4.3: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Jul 11 18:39:05 AVFiles kernel: input: DACAL Co. CD Manager? as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4/3-10.4.3/3-10.4.3:1.0/0003:04B4:5A9B.0008/input/input9
Jul 11 18:39:05 AVFiles kernel: hid-generic 0003:04B4:5A9B.0008: input,hidraw2: USB HID v1.00 Device [DACAL Co. CD Manager?] on usb-0000:00:14.0-10.4.3/input0
Jul 11 18:39:05 AVFiles kernel: usb 3-10.1: new low-speed USB device number 12 using xhci_hcd
Jul 11 18:39:05 AVFiles kernel: usb 3-10.1: device descriptor read/all, error 2
Jul 11 18:39:05 AVFiles kernel: usb 3-10.2: reset low-speed USB device number 7 using xhci_hcd
Jul 11 18:39:05 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 6.
Jul 11 18:39:05 AVFiles kernel: usb 3-10.2: hub failed to enable device, error -22
Jul 11 18:39:05 AVFiles kernel: usb 3-10.2: reset low-speed USB device number 7 using xhci_hcd
Jul 11 18:39:05 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 6.
Jul 11 18:39:05 AVFiles kernel: usb 3-10.2: hub failed to enable device, error -22
Jul 11 18:39:06 AVFiles kernel: usb 3-10.2: reset low-speed USB device number 7 using xhci_hcd
Jul 11 18:39:06 AVFiles kernel: xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880408cc80c0
Jul 11 18:39:06 AVFiles kernel: usb 3-10.2: ep 0x81 - rounding interval to 128 microframes, ep desc says 160 microframes
Jul 11 18:39:06 AVFiles kernel: hid-generic 0003:0B0D:0000.0009: hiddev0,hidraw3: USB HID v1.00 Device [ProjectLab CenturyCD] on usb-0000:00:14.0-10.2/input0
Jul 11 18:39:06 AVFiles kernel: usb 3-10.1: new low-speed USB device number 13 using xhci_hcd
Jul 11 18:39:06 AVFiles kernel: usb 3-10.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Jul 11 18:39:06 AVFiles kernel: input: DACAL Co. CD Manager? as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.1/3-10.1:1.0/0003:04B4:5A9B.000A/input/input10
Jul 11 18:39:06 AVFiles kernel: hid-generic 0003:04B4:5A9B.000A: input,hidraw4: USB HID v1.00 Device [DACAL Co. CD Manager?] on usb-0000:00:14.0-10.1/input0
Jul 11 18:39:06 AVFiles kernel: usb 3-10.3: reset low-speed USB device number 8 using xhci_hcd
Jul 11 18:39:06 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 7.
Jul 11 18:39:06 AVFiles kernel: usb 3-10.3: hub failed to enable device, error -22
Jul 11 18:39:06 AVFiles kernel: usb 3-10.3: reset low-speed USB device number 8 using xhci_hcd
Jul 11 18:39:06 AVFiles kernel: xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 7.
Jul 11 18:39:06 AVFiles kernel: usb 3-10.3: hub failed to enable device, error -22
Jul 11 18:39:07 AVFiles kernel: usb 3-10.3: reset low-speed USB device number 8 using xhci_hcd
Jul 11 18:39:07 AVFiles kernel: xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880408cc8480
Jul 11 18:39:07 AVFiles kernel: usb 3-10.3: ep 0x81 - rounding interval to 128 microframes, ep desc says 160 microframes
Jul 11 18:39:07 AVFiles kernel: hid-generic 0003:0B0D:0000.000B: hiddev0,hidraw5: USB HID v1.00 Device [ProjectLab CenturyCD] on usb-0000:00:14.0-10.3/input0
Jul 11 18:39:44 AVFiles rc.virtualbox[12510]: All running Virtual Machines were saved
Jul 11 18:39:44 AVFiles rc.virtualbox[12512]: vboxwebsrv service stopped

4.

"XP" {57133605-735f-4d6f-a8ea-392cb1f54ef3} "Slack1337" {b5491bcb-42ec-464e-a0da-b0cd5e2b4f6c} "Pardus" {61ee87f5-b044-4e49-89f4-bd4db8983c3e} "Windows Server 2003" {eaad3b3b-539a-4d25-b7cb-fdc592803e5d} "MinecraftTurnkey" {0486ab8a-b94b-445c-b13e-1484b57f0806}

 

Repeat of runningvms command after pressing stop and waiting for command to return.

"Slack1337" {b5491bcb-42ec-464e-a0da-b0cd5e2b4f6c}
"Pardus" {61ee87f5-b044-4e49-89f4-bd4db8983c3e}
"Windows Server 2003" {eaad3b3b-539a-4d25-b7cb-fdc592803e5d}
"MinecraftTurnkey" {0486ab8a-b94b-445c-b13e-1484b57f0806}

vboxinterface.png.3cb3c6f6fece4252e7793c57d1e8284e.png

Link to comment

6.0 beta 4

 

Two issues:

 

1. When I "Save Below Configuration" it blanks out all the settings in the virtualbox config file, except for the symlink location, regardless of what settings I have on the webpage.

 

2.  I 'll restore the previous settings by editing the file manually, including upgrade on boot, start on array mount, etc, however after a system restart none of the settings are followed and according to the log it says these settings are disabled?  The plugin doesn't install on boot, and obviously nothing else happens either.  I have to manually install it from the webpage and start everything up.

 

Everything else works fine and I can run VMs without problems.  Just wish it would survive a restart as expected.

 

 

Capture.JPG.62845fba2ea6e0f65ee9c9424be31b02.JPG

Capture3.JPG.038c7e6dcd95bbd4ccfe020427c10775.JPG

Capture2.JPG.3fe2289118f7d01b404849da29cb7bbe.JPG

Link to comment

I have successfully installed virtualbox and tried out my first installation of ubuntu today.

 

Unfortunately the virtual machine hangs on installation saying that it has problems with CHS sector 0.

 

I had a feeling that I might have problems as:

 

1. My unraid machine only has 2GB Ram ( guest ubuntu OS allocated 512mb)

2. I am installing the virtual images on an array mounted parity protected drive. My cache drive died recently.

 

The CPU is a Q6600 2.4ghz quad core so I shouldnt have a problem there.

 

Can someone confirm that these would be issues?

Link to comment
  • 4 weeks later...

I have the same problem  on 6b6 where if I hit the save configuration button it wipes everything out of the file.

Yeah, just edit the file manually and don't ever touch anything in the configuration side of the web interface or hit save and it works fine. I use phpvirtualbox to do all my management anyway.
Link to comment

I have the same problem  on 6b6 where if I hit the save configuration button it wipes everything out of the file.

Yeah, just edit the file manually and don't ever touch anything in the configuration side of the web interface or hit save and it works fine. I use phpvirtualbox to do all my management anyway.

 

Yep that's my plan although from the first page looks like phpvirtualbox doesn't work in v6 yet?  Have to figure what to do here

 

-- I take that back looks like I will install the apache plugin and go from there

Link to comment
  • 2 weeks later...
  • 4 weeks later...

run PHP VB on another machine, that's what I'm doing for now.

So yes, I've been editing the file manually, however I can't get it to install the plugin and restart VMs automatically when restarting the unraid machine.  Has anybody found a solution to this?

 

So i setup wamp and am trying to get phpvb pointed at my unraid. Any tips? I started everything, renamed config.php-example to config.php and then pointed the server to my unraid server but it says it cant connect to it on 18083.  I started the service successfully on the unraid server.  What now?

 

Yeah i tested the port and it isnt listening on 18083 on my unraid server.  The service says started but none of the paths i am using get created somethign aint right here..

 

update - fixed it not even sure exactly what i did wrong first time.  Made sure all settings were right then reinstalled plg and it worked.  Cool

Link to comment

I am currently running the latest UNRAID 6beta9, and trying to get virtualbox 64 running using the Apache plugin for the webserver (since there isnt another 64bit webserver that I could find) .  I think I have everything setup correctly, but I keep getting invalid username and password errors when trying to log into the virtualbox webserver. I tried admin\admin, but its not working. Is there something else I need to change? If anyone could point me in the right direction that would be great.

 

Link to comment

did you rename your config.php-example to config.php and edit it and point it at your unraid server?  Also did you start the VBOXWEBSRV service?  You also have to edit the config file manually and I had to change the location of VBOXWEBSRV log file as well as the VirtualBox symbolic link before installing.

 

Yes on config.php rename. The VBOXWEBSRV is started. I am getting to the Vbox log on screen, it just wont accept a username and password. I tried admin/admin, but it says that combo is invalid. I tried the recovery.php file to reset the admin creds, but that didnt work either.

Link to comment

I am currently running the latest UNRAID 6beta9, and trying to get virtualbox 64 running using the Apache plugin for the webserver (since there isnt another 64bit webserver that I could find) .  I think I have everything setup correctly, but I keep getting invalid username and password errors when trying to log into the virtualbox webserver. I tried admin\admin, but its not working. Is there something else I need to change? If anyone could point me in the right direction that would be great.

 

 

I am trying to remember if this was the same problem I had but for the heck of it try this:

 

chgrp nobody /var/lib/php

 

Now try to log into the web pgae

 

I had to put that in my go file as it turned out to be a permissions issue as the root cause and the invalid username/pwd was just a side effect

Link to comment

I am currently running the latest UNRAID 6beta9, and trying to get virtualbox 64 running using the Apache plugin for the webserver (since there isnt another 64bit webserver that I could find) .  I think I have everything setup correctly, but I keep getting invalid username and password errors when trying to log into the virtualbox webserver. I tried admin\admin, but its not working. Is there something else I need to change? If anyone could point me in the right direction that would be great.

 

 

I am trying to remember if this was the same problem I had but for the heck of it try this:

 

chgrp nobody /var/lib/php

 

Now try to log into the web pgae

 

I had to put that in my go file as it turned out to be a permissions issue as the root cause and the invalid username/pwd was just a side effect

 

Go file? can I change this through a windows explorer page on the share, or do I have to do this command through putty?

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.