Koozali.org: home of the SME Server

Testing SME in virtualbox on Debian (squeeze)

Offline jerome

  • *
  • 6
  • +0/-0
Testing SME in virtualbox on Debian (squeeze)
« on: November 17, 2014, 09:47:28 AM »
Hi everybody,

For my job, i have a new need: hosting multiple website !
At this moment i have a Debian squeeze which fits the need but i thought about SME Server (the first distribution which allow me to discover linux years ago !) which could be better choice because really made for it (but maybe i'm already wrong here ?)
So i decided to try to install SME Server 9 (from iso) in virtualbox but my server is headless and always send me :
Code: [Select]
Failed to open the X11 display!
Could someone help me with the dedicated command line to set up a new virtual machine in virtualbox for SME Server 9 (ISO) ?
(sorry for my english, and the potential bul... in this message, i'm newbee about virtualmachine and SME)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #1 on: November 17, 2014, 10:37:27 AM »
just guessing but: how are you trying to connect to your SME? via VNC/RDP from virtualbox?

another question/request: can you give us more details about what are you trying to achieve and how (in your mind)? will your SME be in server & gateway or server only mode?

Offline jerome

  • *
  • 6
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #2 on: November 17, 2014, 11:06:57 AM »
Hi Stefano

And thx for your interest... and hope i will have clear answers

For the moment i cant connect my SME because i didn't have created the virtual server yet
I can access my Debian on which i installed virtualbox by ssh and would like to do so (when SME will be set ut virtualbox) with SME

I my mind the SME will be "server only mode" (cause my server is behind a Box which handle the network stuff and allow all ext. entering traffic from port 80 to the debian). For the moment this Debian handle several website with virtualhost of apache2 but i would like to try SME for this task because i remember it was really dedicated to this and allow me to have mail, ftp... created with a bay (quite similar to a site in my mind)

Hope have being clear

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #3 on: November 17, 2014, 11:16:01 AM »
You cannot use the gui of virtualbox if your server is headless....you have to use phpvirtualbox or something similar. At the minute when you try to use virtualbox, the software is looking about a x server which is not installed because you are headless.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline jerome

  • *
  • 6
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #4 on: November 17, 2014, 11:20:17 AM »
I thought it could be possible when i read that
http://xmodulo.com/how-to-create-and-start-virtualbox-vm-without-gui.html

But maybe not ? and will install phpvirtualbox !
Thx

guest22

Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #5 on: November 17, 2014, 02:29:12 PM »
For my job, i have a new need: hosting multiple website !

SME Server by default can host multiple websites. e.g:
- Have the DNS registrar point the specific domain IP's to the same IP of SME Server
- Create an ibay for each website
- Create the domains in server manager and have each respective domain point to the related ibay
- Upload your content to each ibay.

or am I missing something here?

Offline jerome

  • *
  • 6
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #6 on: November 17, 2014, 02:36:43 PM »
I'm afraid not being so clear i thought i was :)

Quote
SME Server by default can host multiple websites. ...

I know that but want to test it before migrate all to SME !
(that s why i first want to try in a virtualbox)
Am i clear  :?

guest22

Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #7 on: November 17, 2014, 02:43:30 PM »

Why trying to do all that on a production Debian box for testing only?


Offline jerome

  • *
  • 6
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #8 on: November 17, 2014, 02:46:45 PM »
cause i only have one production server !
(if you are interested in sending me money to have a dev serveur... :)

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #9 on: November 17, 2014, 04:58:51 PM »

So i decided to try to install SME Server 9 (from iso) in virtualbox but my server is headless and always send me :
Code: [Select]
Failed to open the X11 display!

That error message doesn't come from sme, but from virtualbox....no ?
It seems to me that you tried to launch virtualbox by a command line in a terminal of your debian server...do i'm right ?

You cannot use virtualbox in a headless environment except by specific command to virtualbox http://wiki.contribs.org/VirtualBox#Usage_-_VBoxManage
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline jerome

  • *
  • 6
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #10 on: November 17, 2014, 05:40:54 PM »
Totally right !
... i think i gonna try by adding a complete testing sme server (without going through virtualbox which is a bit over my undersantding :(
Anyway thanx for the link (which was exactly what i needed) and long life SME !!

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #11 on: November 17, 2014, 06:43:00 PM »
I can see some solutions

-install phpvirtualbox in your debian squeeze and manage virtualbox
-try this also, but I  do not test http://remotebox.knobgoblin.org.uk/
-manage by command line virtualbox
-install a xorg on your server and manage virtualbox with the gui
...

If you use smeserver as a host, you can use smeserver-phpvirtualhost to manage guests...

My 2C
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #12 on: November 18, 2014, 10:31:01 AM »
Hi everybody,

For my job, i have a new need: hosting multiple website !
At this moment i have a Debian squeeze which fits the need but i thought about SME Server (the first distribution which allow me to discover linux years ago !) which could be better choice because really made for it (but maybe i'm already wrong here ?)
So i decided to try to install SME Server 9 (from iso) in virtualbox but my server is headless and always send me :
Code: [Select]
Failed to open the X11 display!
Could someone help me with the dedicated command line to set up a new virtual machine in virtualbox for SME Server 9 (ISO) ?
(sorry for my english, and the potential bul... in this message, i'm newbee about virtualmachine and SME)

REFERENCES :

Installation
Code: [Select]
yum install xorg-x11-xauth
create a custom template:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/ssh/sshd_config
cat > /etc/e-smith/templates-custom/etc/ssh/sshd_config/50X11Forwarding << EOF
X11Forwarding yes
X11UseLocalhost no
EOF

re-start the service
Code: [Select]
expand-template /etc/ssh/sshd_config
cat /etc/ssh/sshd_config
sv t /service/sshd or service sshd restart

re-connect to the server with the "X option" and blowfish compression
Code: [Select]
exit
ssh -c blowfish -X root@[server ip] -p [SSH port]
echo $DISPLAY

if you need help > http://www.unix.com/, if you are french > http://virtualisation.developpez.com/

A+
“When the wise man points to the moon, the fool looks at the finger.”

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #13 on: November 18, 2014, 11:12:00 AM »
@kid of leognan:

Quote
For the moment i cant connect my SME because i didn't have created the virtual server yet

the issue is with debian and virtualbox, not SME AFAICT



Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #14 on: November 18, 2014, 12:25:39 PM »
REFERENCES :
and if you like Perl:

On the Debian vm Host with root
Code: [Select]
apt-get install kvm libvirt-bin libvirt virt-manager
and
Code: [Select]
modprobe kvm
lsmod | grep kvm

Download the ISO file
Code: [Select]
mkdir -p /storage/local/{images,iso,lxc}
cd /storage/local/iso
wget http://mirror.smeserver.eu/smeserver/releases/9.0/iso/x86_64/smeserver-9.0-x86_64.iso

Create the disk:
Code: [Select]
qemu-img create -f qcow2 -o preallocation=metadata /storage/local/images/vmsme9-64.qcow2 20G
Create the VM
Code: [Select]
screen
virt-install --connect qemu:///system \
--name vmsme9-64 \
--ram 1024 \
--vcpus 1 \
--disk path=/storage/local/images/vmsme9-64.qcow2,format=qcow2,bus=virtio,cache=none \
--network=bridge:br0,model=virtio \
--vnc \
--os-type=linux \
--os-variant=rhel6 \
--cdrom /storage/local/iso/smeserver-9.0-x86_64.iso \
--accelerate \
--noautoconsole \
--keymap=fr
   

Detach screen
Code: [Select]
CTRL+A+D

Launch virt-manager
Code: [Select]
virt-manager
Set up this guest to start automatically whenever the host is booted:
Code: [Select]
virsh autostart vmsme9-64
-/-
“When the wise man points to the moon, the fool looks at the finger.”