Does anybody here "live" inside Virtualbox?

This is for discussing general topics about how to use VirtualBox.
Post Reply
Lucmove
Posts: 30
Joined: 30. Sep 2020, 08:08

Does anybody here "live" inside Virtualbox?

Post by Lucmove »

I run an old version of Linux and have software that isn't available on the newer versions. Not upgrading has it's share of problems too.
It's absolutely not something new. I've had to deal with that for many years.

Now I am considering "living" inside Virtualbox, I mean, always using it instead of bare metal, as another form of dual boot.

First, I thought of running Linux as usual but with another Linux as virtual machine to be used occasionally.

But then I thought that I may be better off always using the VM and making it a habit because that would make the whole system more portable in the following ways:

1. I would have system snapshots and rollback whether or not the Linux distro or underlying file system can offer them.

2. That everyday distro can be kept and used forever as long as I have Virtualbox much in the way I can run Windows applications forever as long as I have Wine. Replacing the system would be less traumatic.

I intend to make some separation between system (in guest VMs) and data (in the host). The data would be accessible by both the host and the guest (or even multiple guests) via Shared Folders.

Does anybody have experience with that? Are there any pitfalls you would warn against before I do something like this? So far I am only concerned with RAM. I can only have 16GB and that would have to be shared between the host and the guest, and Virtualbox recommends very low values for guests so I'm not sure the guest will work well under that regime.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Does anybody here "live" inside Virtualbox?

Post by mpack »

Personally no, I don't "live" inside VMs in that way for my main machine, because I would not want to add unnecessary interference layers between myself and the physical hardware.

The backup and portability advantages that you mention can also be had using a whole disk backup mechanism such as Macrium - and without adding hardware access problems.

I also btw am very fond of mini PCs, specifically the HP Elitedesk 800 G1, which can be found relatively cheaply on eBay. If I wanted to run a specialist Linux I'd buy another of those, run it headless and RDP into it (after installing xrdp on the Linux).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Does anybody here "live" inside Virtualbox?

Post by scottgus1 »

I have "worked" inside a Virtualbox VM before, and it worked OK for the purposes I put to it.

The RAM, disk space, and processor settings chosen by the New Machine Wizard are very conservative, to keep folks who have smaller host PCs from having trouble. You can increase these values if you have greater resources on your host PC. Note that more processors in a VM does not necessarily help the VM and will slow it down a little to a bit more because of extra required scheduling oversight on the host. 2 processors is good to start on. Then add more if you plan multi-processor-aware software in the VM.

The Virtualbox graphics cards are low-capability. The VM won't see the host's fifty-gazzilion-shader-core monster GPU. Gaming and high-end graphics will be limited. 7.0 is expanding graphics capabilities, but bugs are still being worked on.

I agree with my colleague Mpack that there's great survivability in a host image backup. I make them all the time too, and have used them for hard drive death & resurrection. A VM does have a hint more transportability for switching hosts, though, since a host image is tied to the physical hardware and a restore to different hardware may have some growing pains to get through, unless you've forked over for the fancier dissimilar-hardware-restore function in the backup software. A VM can be taken to any capable host and fired right back up.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Does anybody here "live" inside Virtualbox?

Post by arQon »

Lucmove wrote:Does anybody have experience with that?
I do. Well over a decade of it, in fact, which I'd say makes me more authoritative than most on the subject, for once. :)

All my "personal" stuff lives in a VM. As does all my "work" stuff (a different one, obviously). I have another one for hobby development, and half a dozen more for other things. (This post is being made from inside one of them, in fact).
The arrangement started out this way for historical reasons that no longer apply, but having experienced both options there's just no question which is superior for my needs, and it isn't even close. Since your goal is AFAICT much closer to my usage than it is Scott's or mpack's (ask me how I know :P) it should work well for you too, unless one of the details you haven't yet gotten to turns out to be critical.

While there are a small number of reasons for not doing things this way (which I'll get to shortly) none of them apply to me. As a bonus, since I'm much more comfortable inside Linux these days than I am Windows, whereas Windows remains by far the superior platform for gaming, this way I get to have my cake and eat it too. Host independence is one of the other benefits of this idea, since there are also times I do actually need or want to be running on Linux on the bare metal.

> Are there any pitfalls you would warn against before I do something like this?

Over the significant timespan that I've been doing this, the only problems of any significance have been the result of (transient) bugs in VBox, and have nothing to do with the concept. That certainly doesn't mean there aren't any though, most of which Scott has already covered.

The "why not just make backups?" argument is potentially a strawman, in that it would have had absolutely no bearing on my original needs, but IDK whether or not it does on yours. (And to be fair, I'm sure I had the same misunderstanding in the back of my head at the time, but it didn't matter since my priority was portability). Having a Windows-only backup of your Windows-only data in a Windows-only format isn't going to help you much if the only other PC in the house runs Linux.

Regardless: if you aren't already backing up your data, no change in what the mechanism is will help you. While the faster recovery time of a VM is indeed very evident on the rare occasions you actually need it - whether that's because a drive has died, or the host has been irreparably damaged, or the guest has - if it's not a rare event in the first place then you're doing something badly wrong.

> So far I am only concerned with RAM.

That's certainly going to be the dominant factor. It was even back in the dual-core days. Unless you have some very unusual and specific needs though, 16GB will be more than enough.

> recommends very low values for guests so I'm not sure the guest will work well under that regime.

It won't. Those recommendations are actually adequate for most desktop use, but they haven't kept up with the bloat of incompetence that is the modern Web. If you're capable of closing a browser tab when you've finished with it, 4GB will be fine. If not, go with 6GB; and if you use wildly-unsuitable not-browser things like chat clients (looking at you, Discord...) in your browser, go with 8GB.

It *doesn't matter* that you're using "a lot of" RAM for the VM if the host isn't doing anything but running that VM and the hardware. There are no rules like "you should keep half the host RAM free" etc, despite what the VBox GUI implies: it's wrong because it needs to be wrong so that newbies don't end up configuring nonfunctional arrangements, and it's based on use cases that bear no resemblance at all to yours.
You do need to not *starve* the host, but even mediocre distros boot to ~500MB use, so if you're genuinely going to live in the guest even just 2GB would be a very generous amount to give the OS and VBox. The only reason I'm not suggesting you just go with 8GB off the bat is that I have no idea what you might want to run on the host or how hungry it is. (Hint: you shouldn't be running *anything* on the host without a good reason. Ever. Just use another VM instead, unless a VM is outright impractical or impossible).

> I would have system snapshots and rollback whether or not the Linux distro or underlying file system can offer them.

This is actually the only bad part of your plan, and I expect the only reason mpack didn't go to town on it is because he'd already dismissed the basic idea, so from that perspective there was no point wasting time on details. You don't want a snapshot to exist for more than a few days at most. "A few hours" would be much better, and "a few minutes" better still. You don't ever want them to be more than one deep.
By the time you have sufficient knowledge to break those guidelines, you'll either have sufficient experience to do so wisely or you'll acquire it painfully then. :)

Snapshots are not backups. To put it simply: use snapshots to roll back *system* changes. That also means that the snapshot shouldn't outlive you being satisfied that the update hasn't done something terrible to the machine. Use backups for your data. Note that the VM is *itself* also data.

> I intend to make some separation between system (in guest VMs) and data (in the host). The data would be accessible by both the host and the guest (or even multiple guests) via Shared Folders.

Roughly, this is the way to go. It depends on how generally you're using "data", but yes: for the most part you'll want things split that way, and shared folders are the correct mechanism for it.

Returning to "pitfalls in general":
* You will need an adequate CPU. "Adequate" means a minimum of 4 cores (which is something I *really* shouldn't still have to mention in 2023, but Intel happens).
* You will want the machine as a whole to be at least on par with a 2012 HEDT box, i.e. a workstation. That you have 16GB should mean you're covered, but, laptops (and Intel, again).
* Pretty much everything else comes down to GPU use:
** If your usage is "I watch YouTube", this is a less than ideal plan, but not actually a problem.
** If your usage is "I watch YouTube in 4K", this is a *much* less than ideal plan, and may well approach "problematic".
** If your usage is "the thing I play 3D games on (or run CAD, etc etc)", this is a nonviable plan.

Other than that you're good to go.
(There are some very minor annoyances with using a Linux guest on a Linux host, but they don't really apply to this use case anyway).

The specifics will come down to which of your systems is which. For example, if your "I like *this* OS instance" is because it has a version of gnome that doesn't utterly suck, or it's a posd-free release of Debian, etc, that needs to be the *guest* system. You can either learn about "P2V", or - if you know what you're doing - just backup your data and configs etc, create a new VM, and restore them into that.
If you chose A, your backups aren't good enough and you should probably address that first. :)

Once you've done that you can simply use it *as* your main system, and find any trouble spots before you commit to it.

I'm not going to lecture you about keeping your personal data in an unsupported OS, but I will remind you that it's not the greatest idea. If that means running a current distro release in *another* VM specifically for things that matter (online banking, etc), that's a smaller price than you'd otherwise risk paying.
Post Reply