topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday November 8, 2024, 7:47 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: *NIX: Relatively Minimal Host OS for VirtualBox Use  (Read 85000 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
*NIX: Relatively Minimal Host OS for VirtualBox Use
« on: March 07, 2014, 04:08 PM »
Looking for an easy to install (so recognizes hardware well) *NIX -- though light on resources -- to run as a host OS for running VirtualBox guest OSes on top of.

Seen requests like this but usually see suggestions such as "start with some minimal system and just add VirtualBox and a few other things" -- but was hoping that there was an effort that shipped with VirtualBox as am not too keen on maintaining too much of a customized set up and was hoping if it were bundled that it might be better tested / integrated.

Any recommendations / ideas?  Am currently looking through this list but might also consider this list.



Currently trying CrunchBang, but this requires installing VirtualBox after the OS installation.

Vurbal

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 653
  • Mostly harmless
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #1 on: March 07, 2014, 04:30 PM »
I was looking for the same thing this a few months back but didn't put much effort into it before losing interest. I'd really like to be able to reconfigure my old dual PIII server using Turnkey Linux virtual machines which pretty much requires *Nix.

If I were more ambitious I'd probably look into creating a customized Debian distro for the job. I'm not likely to be that ambitious without some pressing motivation though.
I learned to say the pledge of allegiance
Before they beat me bloody down at the station
They haven't got a word out of me since
I got a billion years probation
- The MC5

Follow the path of the unsafe, independent thinker. Expose your ideas to the danger of controversy. Speak your mind and fear less the label of ''crackpot'' than the stigma of conformity.
- Thomas J. Watson, Sr

It's not rocket surgery.
- Me


I recommend reading through my Bio before responding to any of my posts. It could save both of us a lot of time and frustration.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #2 on: March 07, 2014, 06:34 PM »
Might it make more sense to go up a level of abstraction and use a FOSS type-1 hypervisor like Xen, then install whatever you want (including your distro) under that? Bare-metal hypervisors are as minimal a host footprint as you can get for virtual machines.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #3 on: March 07, 2014, 06:45 PM »
To use a type-2 hypervisor ( VirtualBox et al) in minimal configuration, the easiest would be to start with a distro's server version. You probably could get a smaller one (TinyCore etc.) to work. But you'd also likely have headaches identifying and installing all the dependencies when you went to install VirtualBox. Starting with the distro's text-based (i .e. non-GUI) server should already include everything you needed without being to bulky since it's the desktop environment and productivity packages that take up most of the space in a distro. A plain old server setup is pretty small.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #4 on: March 08, 2014, 07:35 AM »
Thanks for the suggestions :)



I've made a number of attempts to get Xen working over the years, but without much success...never quite make it far enough.  Have you had good experiences with it?

I'm trying to avoid too many steps during set up (cf. getting Arch and/or Gentoo installed - worth it a few times, but not great if I want to recreate a similar set up from scratch) as well as having VirtualBox or comparable stop working somewhere down the line because of an upgrade...



In the mean time, I tried out Manjaro (with Pamac / Octopi) which was a pleasant surprise -- still a bit rough but looks promising.  There also appears to be some kind of remastering support (ManjaroISO).



Now if DistroWatch.com's "Search Distribution" page would let one specify shipped-by-default packages...

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #5 on: March 08, 2014, 07:55 AM »
I've made a number of attempts to get Xen working over the years, but without much success...never quite make it far enough.  Have you had good experiences with it?

Outside of a class lab, no. It seemed to work as advertised although it was a little fiddly to set up. But that was also well over 18 months ago so I'd guess things would have changed for the better on that front.

I'm trying to avoid too many steps during set up (cf. getting Arch and/or Gentoo installed - worth it a few times, but not great if I want to recreate a similar set up from scratch) as well as having VirtualBox or comparable stop working somewhere down the line because of an upgrade...

That's why I'd just go with a vanilla Debian/Ubu server setup as the base. You could always strip out anything you really didn't want afterwards if size is that important. Then install VBox. Dump a copy of installed packages via synaptic - or use a config backup tool like Aptik and it should be a breeze to build a new one (real or virtual) any time you want. The beauty of this approach is it will autoupdate through the repositories once it's built so that hassle goes away.

Hmm...damn...now you've got me thinking... ;D

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #6 on: March 08, 2014, 08:46 AM »
That's why I'd just go with a vanilla Debian/Ubu server setup as the base. You could always strip out anything you really didn't want afterwards if size is that important. Then install VBox. Dump a copy of installed packages via synaptic - or use a config backup tool like Aptik and it should be a breeze to build a new one (real or virtual) any time you want. The beauty of this approach is it will autoupdate through the repositories once it's built so that hassle goes away.

I know you said "like Aptik", but just to confirm, Aptik doesn't work with Debian, right?

One thing that I'm a bit fuzzy about is how much cruft might remain from stripping things out -- it's not so much size but not wanting extra services running (more from a security perspective than anything else).  I've had odd experiences trying to get cups-related, portmap/NFS-related, and other things to go away before when trying the "carve away unnecessary things" approach.  It's been a while since I closely examined Debian's default server installation -- do you happen to recall if it has these sorts of things by default?

May be I'll try this sort of approach with Manjaro and try out its remastering capabilities...

Hmm...damn...now you've got me thinking... ;D

Ha ha ha!

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #7 on: March 08, 2014, 12:54 PM »
I know you said "like Aptik", but just to confirm, Aptik doesn't work with Debian, right?

Some people have cobbled it to work with Debian, but I wouldn't advise it. Debian repository software usually slots very nicely into Ubu - but not the other way around with PPAs. And since Aptik is primarily for handling PPAs (which are intended to be exclusive to Ubuntu and its derivatives) there's really no reason to try it anyway.

In any Debian-based (i.e. non-Ubuntu or other VCIW modded) distro you can use the dpkg -- get selections > {some file} command to compile a list of installed software, and then pipe that same list back in via dpkg --set-selections < {some file} and then use dselect to reinstall some or all of it.

If you're less "blood & guts" - or just don't want to dork around with dpkg and dselect (which allows a lot more granular control) just use Synaptic's "Generate package download script" and "Add downloaded packages" feature to dupe the entire works.

Note: I'm guessing you already know about this stuff so I'm mostly including it for any non-Nix user who's reading along in hopes they'll someday give The Penguin a try.

--------------------------------

re CUPS: don't read too much into anything from the perspective of a frustrated CUPS user. It's a mess that's slowly getting worked out. CUPS got so bad (and unmaintained) that a several distros stopped including it in their base install of even desktop releases. Even now it has problems with a lot of HP printers - although that may not be completely CUPS fault since HP can't seem to decide if they really want to support Linux or not.

Most annoying! :down:

--------------------------------

re: Manjaro

I have zero experience with Manjaro, so please keep us updated on what you find out if you do? Thx! :Thmbsup:
« Last Edit: March 09, 2014, 07:06 AM by 40hz »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #8 on: March 08, 2014, 06:58 PM »
Ok. Did some quick research and found somebody else over at the Crunchbang forum who seems to be thinking the way I am. So maybe there's something in it worth trying.

Start with a Debian net install. Skip the desktop environment and widows manager options and only have it install X.

Once you've got that, do an 'apt-get install virtualbox'. If apt works as advertised (and the VBox config was set up correctly for the repositories) it should also install all the dependencies needed.

Disclaimer: I haven't tried this so I don't know if it will work as described. I somehow don't think it will be quite that simple. But at least it's a place to start - and help determine what else probably needs to be done.

--------------------------

Quick note: Did some checking - using TinyCore as the host distro is definitely not gonna work.
« Last Edit: March 09, 2014, 07:05 AM by 40hz »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #9 on: March 09, 2014, 03:54 AM »
Start with a Debian net install. Skip the desktop environment and widows manager options and only have it install X.

Once you've got that, do an 'apt-get install virtualbox'. If apt works as advertised (and the VBox config was set up correctly for the repositories) it should also install all the dependencies needed.

I think one might be able to skip specifying the installation of X -- somehow I get the feeling that just doing apt-get install virtualbox will pull X in...wishful thinking?

As you were probably hinting, after installing VirtualBox, I'd guess there may be some things to tweak such as adding certain users to the vboxusers.

Since I dug out a spare machine, may be I'll give this a try.

Quick note: Did some checking - using TinyCore as the host distro is definitely not gonna work.

I came across a thread on their forums with a post indicating someone had managed at some point (though perhaps with an older version of VirtualBox):

  http://forum.tinycorelinux.net/index.php/topic,1761.msg27870.html#msg27870



Regarding Manjaro, I've now installed it twice -- not much luck with UEFI, but I suspect this has more to do with the specific machine I tried it on (from what I've read, a fair number of Lenovo notebooks seem to have "uncooperative" UEFI implementations).

I think Arch's docs are in better shape (many of which make sense for Manjaro), but Manjaro was much easier on my fingers and time during installation :)

Manjaro seems to suggest using Pamac or Octopi (roughly GUIs for Arch's packaging tool "pacman") and I'm pretty sure I'd have found those easier to use at first than pacman (though I think pacman is worth learning, I wouldn't want to start there if I had to start over).

I went for the Openbox flavor but it looks like one can choose from:

  XFCE
  KDE
  Net (bare)

and some other community-created versions:

  Cinnamon
  Gnome
  LXDE
  Enlightenment

Hmm, hadn't noticed the Net version...may be I can try out your build-up-from-minimal idea with that as a starting point.
« Last Edit: March 13, 2014, 05:38 AM by ewemoa, Reason: Terminological clarification »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #10 on: March 09, 2014, 06:01 AM »
I got the stable net install iso from Debian and performed the following steps:

1. Boot from iso-on-USB (dd-ed to USB memory)
2. Run the text installer and at the tasksel step unselect everything
3. After rebooting, install the sudo package and add the non-root user to the sudo group (then relogin)
4. Tell apt-get to install the virtualbox and xinit packages and accept the installation of the additional packages
5. Add the non-root user to the vboxusers group
6. Reboot for the VirtualBox modules to load (modprobe might work instead)
7. Log in and use startx to start X
8. From an xterm, start VirtualBox
9. Test run a guest OS

Seemed to work here.

For reference, I think the total disk space used (not including swap) was about 1.3 GB.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #11 on: March 09, 2014, 06:57 AM »

Seemed to work here.

Bingo! Nice work Mr. E. Let's catalog the above for future use. In the meantime don't neglect to create a disk image backup of the install. It will easily fit on a DVD or a modest USB key too. How convenient! :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #12 on: March 09, 2014, 07:33 AM »
In the meantime don't neglect to create a disk image backup of the install.

Out of curiosity do you have a favorite method?  I used Redo Backup for a while but it doesn't seem to be actively developed.



I also went through a similar procedure with Manjaro's Net installation iso with some success:

1. Boot from iso-on-USB
2. Log in as manjaro user (with password as reported on screen)
3. Start installer via sudo setup and proceed to the end appropriately
4. Reboot and log in as a non-root user that can use sudo
5. Using pacman install the following packages: xorg-xinit, xterm, virtualbox, linux310-virtualbox-host-modules (match to linux kernel version), and qt4
6. Add non-root (current) user to vboxusers group
7. Load VirtualBox modules via modprobe vboxdrv
8. Edit $HOME/.xinitrc to exec xterm as last line
9. Start X via startx
10. From the xterm start VirtualBox
11. Test a guest OS

The total disk space used in this case was around 1.5 GB.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #13 on: March 09, 2014, 08:48 AM »
^No real favorites when it comes to that. I'll just use whatever is available that I know works. For imaging, Clonezilla and DD are what I use. DD mostly if it's just for me. Clonezilla for clients and anybody else. Clonezilla can also install GRUB so that's a big plus when performing a disaster recovery. Clonezilla also has some nice features for use with Windows-based systems. (Check out their website for details.) And it's now UEFI (or 'URFU' as I like to think of it) bootable.  So if you straddle multiple OSes, having one tool to learn and standardize on is really nice too.

For what you're doing here, and at your level of experience, DD is probaby the quickest and easiest. Most backup apps (in true Unix tradition) invoke DD when you tell them to make an image anyway.

Ahhh...the beauty of pipes, scripting, and (optionally) a simple GUI toolkit. You can mashup an app so easily now that somebody else did all the hard work and wrote an actual command to do something. That's the beauty of the Unix Philosophy. Code somthing to do one thing extremely well. Don't reinvent the wheel. Combine pieces for convenience and more complex requirements.
« Last Edit: March 09, 2014, 08:57 AM by 40hz »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,505
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #14 on: March 09, 2014, 10:13 AM »
easy to install (so recognizes hardware well) *NIX -- though light on resources

Not having read the rest of the thread:

OpenBSD.

Much less than 100 MB RAM usage on my "hey, let's test OpenBSD" machine (latest 5.5-CURRENT with default X installation), fast and clean base system installation. It even found my Radeon card immediately.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #15 on: March 09, 2014, 01:34 PM »
Not having read the rest of the thread:

OpenBSD.

@ewemoa - re: BSD

This from the PCBSD website:

PC-BSD® 10.0 automatically installs the VirtualBox[1] open source virtualization program and the VirtualBox Guest Additions[2] with the operating system. The guest additions add mouse pointer integration, shared folders between the host and guest, better video support, and a shared clipboard.

Might be worth a look/try.

re:OpenBSD

IIRC, the developers of OpenBSD weren't much interested in having OpenBSD do anything with VirtualBox - either as guest or host. There was a time not so long ago when they seemed rather dismissive and hostile towards both Wine and VirtualBox. But that might have changed. Maybe Tuxman can point you to a how-to or tutorial. I've got nothing on my KB about doing it. And considering OpenBSD has established security as its raison d'être, I could easily understand why they might look askance at something that wishes to create or run in a virtual environment under their carefully secured OS. So I wouldn't be surprised if it were difficult or impossible to do right now. But I'll have tp leave that for others with more OpenBSD experience to say for certain.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,505
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #16 on: March 09, 2014, 01:36 PM »
Your quote is related to using PC-BSD as a guest system.

OpenBSD works as a host (or doesn't, depending on who you ask). - PC-BSD is not exactly "light on resources".

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #17 on: March 09, 2014, 01:45 PM »
Your quote is related to using PC-BSD as a guest system.

OpenBSD works as a host (or doesn't, depending on who you ask). - PC-BSD is not exactly "light on resources".

If so, I stand corrected - although that's not the way I read: PC-BSD® 10.0 automatically installs the VirtualBox[1] open source virtualization program and the VirtualBox Guest Additions[2] with the operating system.

That says (to me) that PCBSD is installing (as in hosting) VBox rather than the other way around.


Either way, I'm more familiar with using BSD to create bespoke servers rather than VM hosts, so I'll defer to you to provide instructions or links on how to do it under OpenBSD.  
 :)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,505
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #18 on: March 09, 2014, 01:47 PM »
and the VirtualBox Guest Additions[2] with the operating system.

Guest Additions are installed on the hosted system.

Either way, I'm more familiar with using BSD to create bespoke servers rather than VM hosts, so I'll defer to you to provide instructions or links on how to do it under OpenBSD. 

RTFM...  :D

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #19 on: March 09, 2014, 01:50 PM »
Guest Additions[/i][2] with the operating system.

I know. Please read the whole sentence:

PC-BSD® 10.0 automatically installs the VirtualBox[1] open source virtualization program and the VirtualBox Guest Additions[2] with the operating system.

RTFM...

I have - and still refer to it regularly whenever I'm working with OpenBSD. It's a lot to memorize otherwise. ;)

I've also found Absolute OpenBSD: Unix for the Practical Paranoid by Michael W. Lucas; and Brandon Palmer's Secure Architectures with OpenBSD to be worthwhile additions to the bookshelf. Highly recommended. :up:
« Last Edit: March 09, 2014, 01:55 PM by 40hz »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,505
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #20 on: March 09, 2014, 01:51 PM »
Yep, the host software and the guest software. Now how does this invalidate my thesis?

(Interestingly, you emphasize a different part every time.)

-- Mod Edit - Removed offensive content.
« Last Edit: March 09, 2014, 02:25 PM by Josh »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #21 on: March 09, 2014, 02:02 PM »
(Interestingly, you emphasize a different part every time. Like a woman.)

*YAWN*...

Now how about you contributing something of substance to the discussion by showing us how to install VirtualBox under OpenBSD since it was you who suggested it as the host OS?

I'm sure we're all anxious to benefit and learn from your expertise and experience.


Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,505
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #22 on: March 09, 2014, 02:05 PM »
*YAWN*... (now that's something of substance.)

I told ewemoa where to look by giving one of the possible answers to the question asked initially. If that's not enough, ewemoa might come back to it, right?

Gwen7

  • Participant
  • Joined in 2009
  • *
  • Posts: 134
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #23 on: March 09, 2014, 02:09 PM »
-40hz: dftt ;-)

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: *NIX: Relatively Minimal Host OS for VirtualBox Use
« Reply #24 on: March 09, 2014, 02:10 PM »
@gwen - Thank you for the reminder. ;D