public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Running Gentoo in VirtualBox
@ 2017-12-31 19:40 thelma
  2017-12-31 19:48 ` Matthias Hanft
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: thelma @ 2017-12-31 19:40 UTC (permalink / raw
  To: Gentoo mailing list

I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
etc.

What are my chances to run Gentoo as a VirtualBox?

Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
every month so I have to go through Gentoo handbook); to configure it
the way I want it takes another week or two.

So I was thinking,  if I run Windows 10 and configure Gentoo as a
virtual box it might be easier to transfer it from one system to
another, in case there is a HD failure (like it just happened to me
yesterday).

Any input will be appreciated.
I know I might have problem with Serial port and receiving faxes via
HylaFax as they are time sensitive.

-- 
Joseph


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Running Gentoo in VirtualBox
  2017-12-31 19:40 [gentoo-user] Running Gentoo in VirtualBox thelma
@ 2017-12-31 19:48 ` Matthias Hanft
  2017-12-31 20:10 ` Alec Ten Harmsel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Matthias Hanft @ 2017-12-31 19:48 UTC (permalink / raw
  To: gentoo-user

thelma@sys-concept.com wrote:
> 
> What are my chances to run Gentoo as a VirtualBox?

I just did it (amd64-Gentoo on Win10/64), and it works like a charm.

No problems encountered at all.  However, here it's just a "server-
Gentoo" (only Apache, Postfix and all that - no GUI/desktop, no
special hardware).

-Matt



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Running Gentoo in VirtualBox
  2017-12-31 19:40 [gentoo-user] Running Gentoo in VirtualBox thelma
  2017-12-31 19:48 ` Matthias Hanft
@ 2017-12-31 20:10 ` Alec Ten Harmsel
  2017-12-31 20:13 ` Alan McKinnon
  2018-01-01 12:44 ` [gentoo-user] " Kai Krakow
  3 siblings, 0 replies; 7+ messages in thread
From: Alec Ten Harmsel @ 2017-12-31 20:10 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 31, 2017 at 12:40:43PM -0700, thelma@sys-concept.com wrote:
> I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
> etc.
> 
> What are my chances to run Gentoo as a VirtualBox?
> 
> Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
> every month so I have to go through Gentoo handbook); to configure it
> the way I want it takes another week or two.

Instead of running Gentoo with VirtualBox and backing up the image, I'd
recommend storing your configurations in a git repo and using ansible[1]
or salt[2] to deploy them when you need to.

Also, if you ever expand to more than 1 server, these tools make even
more sense. I use salt for my personal setup, which is 1 server and 1
laptop (I have 2-3 more servers that I need to get set up someday...),
but salt is simpler and no less powerful.

Hope this helps,

Alec

1. https://www.ansible.com/
2. https://saltstack.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Running Gentoo in VirtualBox
  2017-12-31 19:40 [gentoo-user] Running Gentoo in VirtualBox thelma
  2017-12-31 19:48 ` Matthias Hanft
  2017-12-31 20:10 ` Alec Ten Harmsel
@ 2017-12-31 20:13 ` Alan McKinnon
  2017-12-31 20:33   ` R0b0t1
  2017-12-31 23:52   ` thelma
  2018-01-01 12:44 ` [gentoo-user] " Kai Krakow
  3 siblings, 2 replies; 7+ messages in thread
From: Alan McKinnon @ 2017-12-31 20:13 UTC (permalink / raw
  To: gentoo-user

On 31/12/2017 21:40, thelma@sys-concept.com wrote:
> I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
> etc.
> 
> What are my chances to run Gentoo as a VirtualBox?
> 
> Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
> every month so I have to go through Gentoo handbook); to configure it
> the way I want it takes another week or two.
> 
> So I was thinking,  if I run Windows 10 and configure Gentoo as a
> virtual box it might be easier to transfer it from one system to
> another, in case there is a HD failure (like it just happened to me
> yesterday).
> 
> Any input will be appreciated.
> I know I might have problem with Serial port and receiving faxes via
> HylaFax as they are time sensitive.
> 


That is not the question. The real question is:

Why are you running a production fax server with n backup or redundancy
plans?

Virtualization here will not solve your risk or effort exposure. It will
increase it.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Running Gentoo in VirtualBox
  2017-12-31 20:13 ` Alan McKinnon
@ 2017-12-31 20:33   ` R0b0t1
  2017-12-31 23:52   ` thelma
  1 sibling, 0 replies; 7+ messages in thread
From: R0b0t1 @ 2017-12-31 20:33 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 31, 2017 at 2:13 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> On 31/12/2017 21:40, thelma@sys-concept.com wrote:
>> I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
>> etc.
>>
>> What are my chances to run Gentoo as a VirtualBox?
>>
>> Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
>> every month so I have to go through Gentoo handbook); to configure it
>> the way I want it takes another week or two.
>>
>> So I was thinking,  if I run Windows 10 and configure Gentoo as a
>> virtual box it might be easier to transfer it from one system to
>> another, in case there is a HD failure (like it just happened to me
>> yesterday).
>>
>> Any input will be appreciated.
>> I know I might have problem with Serial port and receiving faxes via
>> HylaFax as they are time sensitive.
>>
>
> Virtualization here will not solve your risk or effort exposure. It will
> increase it.
>

I agree: this way lies pain.

Firstly, if you must use Windows, I highly recommend using Hyper-V
over VirtualBox or VMWare/ESXi. It is free and has better hardware
configuration support.

Secondly, the backup scheme you are wanting to implement is easier and
more robustly done with LVM. Even if you don't want to deal with that,
rsync over SSH is secure and easy to set up. More complicated
solutions like BorgBackup may ultimately be the most appropriate.

Thirdly, save your configuration files so you do not need to reread
the documentation each time you install a system. Look at Gentoo stage
4 tarballs and programs like Ansible or Puppet. You might also
consider running Debian. Gentoo is nice, but not necessary or even
suitable for every use case.

Cheers,
     R0b0t1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Running Gentoo in VirtualBox
  2017-12-31 20:13 ` Alan McKinnon
  2017-12-31 20:33   ` R0b0t1
@ 2017-12-31 23:52   ` thelma
  1 sibling, 0 replies; 7+ messages in thread
From: thelma @ 2017-12-31 23:52 UTC (permalink / raw
  To: gentoo-user

I configure all machine the same way.  The older units saver as a
backup.  If something goes wrong all I need to do is to boot one of the
backup machine and restore the files, or do minor adjustments.

Thelma
On 12/31/2017 01:13 PM, Alan McKinnon wrote:
> On 31/12/2017 21:40, thelma@sys-concept.com wrote:
>> I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
>> etc.
>>
>> What are my chances to run Gentoo as a VirtualBox?
>>
>> Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
>> every month so I have to go through Gentoo handbook); to configure it
>> the way I want it takes another week or two.
>>
>> So I was thinking,  if I run Windows 10 and configure Gentoo as a
>> virtual box it might be easier to transfer it from one system to
>> another, in case there is a HD failure (like it just happened to me
>> yesterday).
>>
>> Any input will be appreciated.
>> I know I might have problem with Serial port and receiving faxes via
>> HylaFax as they are time sensitive.
>>
> 
> 
> That is not the question. The real question is:
> 
> Why are you running a production fax server with n backup or redundancy
> plans?
> 
> Virtualization here will not solve your risk or effort exposure. It will
> increase it.
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user] Re: Running Gentoo in VirtualBox
  2017-12-31 19:40 [gentoo-user] Running Gentoo in VirtualBox thelma
                   ` (2 preceding siblings ...)
  2017-12-31 20:13 ` Alan McKinnon
@ 2018-01-01 12:44 ` Kai Krakow
  3 siblings, 0 replies; 7+ messages in thread
From: Kai Krakow @ 2018-01-01 12:44 UTC (permalink / raw
  To: gentoo-user

Am Sun, 31 Dec 2017 12:40:43 -0700 schrieb thelma:

> I'm using Gentoo as a server (so it runs 24/7) Apache, Asterisk, Hylafax
> etc.
> 
> What are my chances to run Gentoo as a VirtualBox?
> 
> Installing Gentoo takes me 2-3 days (basic setup min., I don't do it
> every month so I have to go through Gentoo handbook); to configure it
> the way I want it takes another week or two.

I recommend having a template Gentoo system with the basic setup and 
basic world set you need. Keep that updates once in a while. If you need 
to deploy a new system, simply clone from this.

I'm doing something similar with our servers:

Upon deploying a new server, I just clone a most similar one, excluding 
the data partitions. Then I cleanup world, make.conf, passwd/groups, 
reset the machine uid in /etc, adjust IP configuration, and run "emerge --
depclean" followed by a world upgrade.

This can be made easier if you're planning your mount volumes correctly, 
that is having mysql, home, hylafax whatever on separate partitions. It 
allows you to run rsync without crossing mount borders.

This works for me since 10+ years of running Gentoo based servers now.


> So I was thinking,  if I run Windows 10 and configure Gentoo as a
> virtual box it might be easier to transfer it from one system to
> another, in case there is a HD failure (like it just happened to me
> yesterday).
> 
> Any input will be appreciated.

I usually virtualize systems by first preparing the kernel to have 
support for VirtualBox or VMware, then installing the proper tools.

After this, prepare the VM and empty disk images, boot sysrescuecd in it 
(which is actually Gentoo based), format and mount your empty disk images 
in it (within the final structure, so you pre-create mount points), then 
use rsync over SSH (as root) to transfer all files. You can do that while 
the source system is still online.

Keep in mind not to rsync special directories like /sys or /proc from the 
source. Create empty mount points instead.

Then try to boot the system offline (do not yet connect it to virtual 
networking), see if it boots. If not, try to fix it and record the steps. 
You can also chroot into the cloned system from sysrescuecd.

Now it's time for resync. Stop services on the source system so it quasi-
offline, just keep sshd running. Now, rsync again. It will now copy the 
differences in just a few seconds to minutes. Maybe reapply the 
previously recorded fixing steps, then boot the cloned system and shut 
the other system down.

If source and destination is the same hardware, you may want to use an 
external drive as intermediate rsync storage. But then you have an 
offline system you cannot boot in case of failure. It's a bit harder then 
if you do it the first time. But it also works great if you are familiar 
with the process.


> I know I might have problem with Serial port and receiving faxes via
> HylaFax as they are time sensitive.

Serial port usually does work in pass-through mode, I've done exactly 
that previously with hylafax.


-- 
Regards,
Kai

Replies to list-only preferred.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-01 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-31 19:40 [gentoo-user] Running Gentoo in VirtualBox thelma
2017-12-31 19:48 ` Matthias Hanft
2017-12-31 20:10 ` Alec Ten Harmsel
2017-12-31 20:13 ` Alan McKinnon
2017-12-31 20:33   ` R0b0t1
2017-12-31 23:52   ` thelma
2018-01-01 12:44 ` [gentoo-user] " Kai Krakow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox