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.”

Offline Stefano

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

- this is a SME server related forum (and this topic here is OT, I will move it to general discussion asap)
- OP is thinking about Vistualbox and your post is about something totally different :-)


Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #16 on: November 18, 2014, 12:32:26 PM »
moved to "General Discussion" as this topic is OT elsewhere

guest22

Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #17 on: November 18, 2014, 02:02:45 PM »
Code: [Select]
[quote author=kid of leognan link=topic=51282.msg260228#msg260228 date=1416309939]
wget [url]http://mirror.smeserver.eu/smeserver/releases/9.0/iso/x86_64/smeserver-9.0-x86_64.iso[/url]


I thought this smeserver.eu site has been closed and if not, should it not be listed officially?

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #18 on: November 18, 2014, 02:45:30 PM »
yep that could be good to have your information in the wiki area xavier. It is up to you.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

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

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #19 on: November 18, 2014, 03:43:06 PM »
yep that could be good to have your information in the wiki area xavier. It is up to you.

good and "politically correct", I would add.. ;-)

P.S.: Xavier, as already told, you should choose one nink and stick with it.. it will be very kind of you, thank you

Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #20 on: November 18, 2014, 04:54:08 PM »
Code: [Select]
[quote author=kid of leognan link=topic=51282.msg260228#msg260228 date=1416309939]
wget [url]http://mirror.smeserver.eu/smeserver/releases/9.0/iso/x86_64/smeserver-9.0-x86_64.iso[/url]


I thought this smeserver.eu site has been closed and if not, should it not be listed officially?
smeserver.eu is not really dead just off line, and the mirroring is for developpement only. so sorry you should read :
wget http://mir1.ovh.ca/smeserver/releases/9.0/iso/x86_64/smeserver-9.0-x86_64.iso


yep that could be good to have your information in the wiki area xavier. It is up to you.
Sorry Steph, but last time you didn't want my work, no?

good and "politically correct", I would add.. ;-)

P.S.: Xavier, as already told, you should choose one nink and stick with it.. it will be very kind of you, thank you
It's the good one, no?

kid of leognan:

- this is a SME server related forum (and this topic here is OT, I will move it to general discussion asap)
- OP is thinking about Vistualbox and your post is about something totally different :-)
hum, VirtualBox is for desktop virtualization first and if you are good enough to use it headless so It's really a better idea to use a professional tool as libvirt and KVM, especially for SMEserver Virtual Machine. It's more technical but it 's a good way to learn a lot about storage and network, no?

-install phpvirtualbox in your debian squeeze and manage virtualbox

Remember, phpvirtualbox is not maintained anymore, no?

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

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #21 on: November 18, 2014, 05:26:28 PM »
I agree that even if VirtualBox can be used headless, libvirt+KVM will give better performance, and is much more flexible (but does require a bit of work to learn how to use it). If you have another Linux desktop, I'd just recommend not to install virt-manager (a GUI for libvirt) directly on the server, so you won't have to install all the graphic stack. Just deploy libvirt+KVM on the headless server, and access it remotely (through SSH for example) from another linux desktop
C'est la fin du monde !!! :lol:

Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #22 on: November 18, 2014, 06:14:34 PM »
For DB only (because i can't send PM)

The mail address for this forum is reactivated and the domain.tld and mail.domain.tld are working fine, but pfsense is may be too much restrictive. Anyway I should receive message from your forum now.
“When the wise man points to the moon, the fool looks at the finger.”

guest22

Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #23 on: November 18, 2014, 06:34:35 PM »
For DB only (because i can't send PM)

The mail address for this forum is reactivated and the domain.tld and mail.domain.tld are working fine, but pfsense is may be too much restrictive. Anyway I should receive message from your forum now.


Headquarters? 007 here... The mission has been compromised, I have to go to the safe house. From now on, radio silence is advised for the enemy is monitoring our communication. I do have the 'shiny thing' and I'll report back when I made it safely...   007 out!

Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #24 on: November 18, 2014, 06:41:56 PM »
 :lol: (DB = Daniel B.)
“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 #25 on: November 18, 2014, 08:59:13 PM »
smeserver.eu is not really dead just off line, and the mirroring is for developpement only.

can you elaborate a bit more please? are you mirroring "our" repos only for your internal development? did I understand correctly?

Quote
Sorry Steph, but last time you didn't want my work, no?

Xavier/smeserver.eu/Kid of Leognan, you've been told many times to STOP this kind of attitude/approach; this is the L A S T warning: CEASE immediately or all your account will be locked/banned

Quote
It's the good one, no?

who knows? not me, for sure

Quote
hum, VirtualBox is for desktop virtualization first and if you are good enough to use it headless so It's really a better idea to use a professional tool as libvirt and KVM, especially for SMEserver Virtual Machine. It's more technical but it 's a good way to learn a lot about storage and network, no?

maybe, but it seems that you missed this sentence
Quote
sorry for my english, and the potential bul... in this message, i'm newbee about virtualmachine and SME

at all


Offline Xavier.A

  • ****
  • 104
  • +0/-0
Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #26 on: November 18, 2014, 10:48:41 PM »
Code: [Select]
$ echo $stefano
$
“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 #27 on: November 18, 2014, 10:52:57 PM »
if you think you're funny, you're wrong
if you think we're jocking, you're wrong

guest22

Re: Testing SME in virtualbox on Debian (squeeze)
« Reply #28 on: November 18, 2014, 11:04:21 PM »
This is getting to a point where I don't take this post seriously anymore. I unsubscribed from this post. Good luck kids.