Error Running VMs in PHP Virtualbox Jail

Status
Not open for further replies.

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
Hi Guys,

I recently tried the php virtual box jail to get lubuntu or debian working as jail. Im currently on Freenas 9.10.2-U1. By default, when I tried to create Vbox jail, the template was missing. Thus, I had to dig Freenas download resource and add the link to the template screen and then get my jail setup. I tried both the vbox templates. Since release 9.10 was not showing the links I had to get them from 9.2 folder.
I tried these two:

http://download.freenas.org/jails/9.2/x64/freenas-virtualbox-4.3.12.tgz
http://download.freenas.org/jails/9.2/x64/vboxtemplate.tgz

The jail gets setup pretty nicely, and I am able to even open the vbox administration page in my browser. So to install a vm, i go through the setup wizard, do the needful and load the iso image of debian. However, the moment I press start to run the VM, I get error below:
To circumvent any ambiguity, I tried two versions of vbox templates as above, and I have also tried multiple variants of Linux such as debian x86, lubuntu x86 and even lubuntu x64.
For all times, I get the same error as below. Can anyone advice what I am missing?

Code:
Exception Object
(
    [message:protected] => The virtual machine 'Debian' has terminated unexpectedly during startup with exit code 1
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /usr/local/www/phpvirtualbox/lib/vboxconnector.php
    [line:protected] => 2382
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                     => /usr/local/www/phpvirtualbox/lib/vboxconnector.php
                    [line] => 928
                    [function] => remote_progressGet
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [progress] => 7f6b8a5f16f7d098-0000000000000136
                                    [_persist] => Array
                                        (
                                            [vboxHandle] => 7f6b8a5f16f7d098-0000000000000134
                                        )

                                    [fn] => progressGet
                                )

                        )

                )

            [1] => Array
                (
                     => /usr/local/www/phpvirtualbox/lib/ajax.php
                    [line] => 309
                    [function] => __call
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => progressGet
                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [progress] => 7f6b8a5f16f7d098-0000000000000136
                                            [_persist] => Array
                                                (
                                                    [vboxHandle] => 7f6b8a5f16f7d098-0000000000000134
                                                )

                                            [fn] => progressGet
                                        )

                                    [1] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [data] => Array
                                                        (
                                                            [responseData] => Array
                                                                (
                                                                    [progress] => 7f6b8a5f16f7d098-0000000000000136
                                                                    [info] => Array
                                                                        (
                                                                            [completed] => 1
                                                                            [canceled] => 
                                                                            [description] => Starting VM
                                                                            [operationDescription] => Creating process for virtual machine "Debian" (headless)
                                                                            [timeRemaining] => Array
                                                                                (
                                                                                )

                                                                            [timeElapsed] => Array
                                                                                (
                                                                                    [days] => 17220
                                                                                    [hours] => 2
                                                                                    [minutes] => 41
                                                                                    [seconds] => 9
                                                                                )

                                                                            [percent] => 0
                                                                        )

                                                                )

                                                            [success] => 1
                                                            [key] => 53474945cfd7ac0bf8114767c209c2a6
                                                        )

                                                    [errors] => Array
                                                        (
                                                        )

                                                    [persist] => Array
                                                        (
                                                        )

                                                    [messages] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [2] => Array
                (
                     => /usr/local/www/phpvirtualbox/lib/ajax.php
                    [line] => 309
                    [function] => progressGet
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [progress] => 7f6b8a5f16f7d098-0000000000000136
                                    [_persist] => Array
                                        (
                                            [vboxHandle] => 7f6b8a5f16f7d098-0000000000000134
                                        )

                                    [fn] => progressGet
                                )

                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => Array
                                                (
                                                    [responseData] => Array
                                                        (
                                                            [progress] => 7f6b8a5f16f7d098-0000000000000136
                                                            [info] => Array
                                                                (
                                                                    [completed] => 1
                                                                    [canceled] => 
                                                                    [description] => Starting VM
                                                                    [operationDescription] => Creating process for virtual machine "Debian" (headless)
                                                                    [timeRemaining] => Array
                                                                        (
                                                                        )

                                                                    [timeElapsed] => Array
                                                                        (
                                                                            [days] => 17220
                                                                            [hours] => 2
                                                                            [minutes] => 41
                                                                            [seconds] => 9
                                                                        )

                                                                    [percent] => 0
                                                                )

                                                        )

                                                    [success] => 1
                                                    [key] => 53474945cfd7ac0bf8114767c209c2a6
                                                )

                                            [errors] => Array
                                                (
                                                )

                                            [persist] => Array
                                                (
                                                )

                                            [messages] => Array
                                                (
                                                )

                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)

 

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
VirtualBox was deprecated in FreeNAS 9.10.2-U1. The alternative is to use FreeBSD integrated hypervisor Bhyve. You can interact with it using iohyve.

I created a how-to on how to use this a while back: https://forums.freenas.org/index.php?resources/iohyve-set-up-and-basic-usage.9/
Ok noted. Means the support is removed from Freenas 9.10 thus showing all this error. Anyways, I have gone through your guide and youtube video. Thank you for making such detailed guide. I just have one more query.
I'm fine doing console command for installing and setting up the VM, but for regular operations of VM I still prefer to vnc into it and run through a desktop gui. Will it be possible to install gnome and vnc server under iohhye debian guest? I have found this guide which shows how to do so. You think it will work?

Code:
VNC is a remote desktop sharing system that will allow you to connect your home PC to a GUI (graphical interface) hosted on your VPS, for easy remote management. This guide will walk you through the steps required to setup and access a VNC server hosted on a Debian VPS.

Before beginning, ensure you are logged in to your VPS as the root user, and run the following:

# apt-get update

# apt-get upgrade

1. Install GNOME:

#apt-get install gnome-desktop-environment

2. Install required fonts:

# apt-get install xfonts-100dpi

# apt-get install xfonts-100dpi-transcoded

# apt-get install xfonts-75dpi

# apt-get install xfonts-75dpi-transcoded

# apt-get install xfonts-base

3. Install TightVNCServer:

# apt-get install tightvncserver

4. Start TightVNCServer for the first time, it will copy config files and prompt you for a password:

# tightvncserver :1

5. Stop the VNC server, so we can continue to configure it:

# tightvncserver -kill :1

6. Edit the xstartup file:

# vi ~/.vnc/xstartup

Press "A" to enter edit mode. Replace the contents of the file with the following (or edit to match):

#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &

Press ESC, type :wq, then press enter to save and close the file.

7. Start the VNC server with your desired resolution:

# tightvncserver -geometry 1024x768 :1

You can now access your server's remote GNOME desktop with a desktop VNC client. Enter your server's main IP address, Port 1 (or 5901, alternately), and the password you set earlier to connect to the desktop.


 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
It's entirely possible to install Gnome or something for remote access, however I can't help you with the set-up of Xorg and VNC within your VM (I don't use a GUI on my Linux VMs :)). There are plenty of how-to's on the Internet for this.

The good news is that VGA consoles will be making their way to FreeNAS 9.10. It's in the latest nightly release, however it could be some time until it appears in stable.
 

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
It's entirely possible to install Gnome or something for remote access, however I can't help you with the set-up of Xorg and VNC within your VM (I don't use a GUI on my Linux VMs :)). There are plenty of how-to's on the Internet for this.

The good news is that VGA consoles will be making their way to FreeNAS 9.10. It's in the latest nightly release, however it could be some time until it appears in stable.
Thank you. I managed to setup lxde and tightvnc which allows me to access the desktop gui whenever needed. Just an addition question, is it possible to set the video memory for guests in iohyve? Because right now I note my video memory being low causing lags in mouse movements and all ui interaction. Pls advice
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Thank you. I managed to setup lxde and tightvnc which allows me to access the desktop gui whenever needed. Just an addition question, is it possible to set the video memory for guests in iohyve? Because right now I note my video memory being low causing lags in mouse movements and all ui interaction. Pls advice
Not that I am aware of.
 
  • Like
Reactions: hus

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
Not that I am aware of.
OK then. Thats a serious deal breaker. I guess I will just wait for v10 to release and having a proper gui to manage I hope such options will be made available. For now I will have to stick with Hyper V on my windows pc only.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
What exactly do you need a GUI for? Could you not tunnel X over ssh? I don't think that is as resource intensive. In my experience with many linux installs, VNC performance is usually piss poor. It seems it always lags no matter the setup.
 
Status
Not open for further replies.
Top