[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Virtual Machines: Newbie / novice questions

On 05/14/2017 07:51 AM, rhkramer@gmail.com wrote:
I've never used a VM but I wanted to ask some newbie questions about them.

I regularly use Virtual Machines quite a lot for testing purposes. I'll be glad to cover your questions. For these questions, I'll be answering them based on using VirtualBox.

    * Is it right to consider that there is somehow a base OS and the other VMs
somehow are set up on top of it--you boot into that base OS first, and then
have the ability to switch to another VM.  OK, I'm thinking that is not the
case--I think I've heard of things like a hypervisor (??), and now I'm
guessing that the machine boots first into the hypervisor and then from there
boot into any of one or more VMS, one of which would contain what I consider
my main or base OS?

Basically VirtualBox is a program you install into your computer. It's much like any other program you have. You run it and from there you can create new virtual machines you can launch from within VirtualBox (or right click on a machine and create a desktop shortcut for easy access to just the machine without running the VirtualBox program itself). So yes, you "base OS" as you call it (which is called a "host" in Virtual Machine language) is the operating system you boot into. Each Virtual Machine you create is called a "guest" machine.

    * I know (or I'm 99.9% sure) that the software for a VM is on separate
partitions (except maybe some are or could be shared between the VM and the
"base" machine, such as for my documents and such (things that I'd want to be
accessible from any of the VMs).

Actually no. The software for the VM are stored in machine files. In VirtualBox you can even determine where to save these machine files on your hard drive. These machine files can also be exported (which I do after each update) so that you can keep them backed up on a USB stick, SD card, what have you. If something goes wrong you can then import that machine (from the exported file) and go back to work. I usually do this but any time I go to use a machine, I clone it first, then I use it, and destroy it when done. This way I don't use the original virtual machine and it's handy if I should need an identical one for testing something (which I often do). I only use the original one to do software updates on that machine.

As for shared documents, yes you can specify a folder on your hard drive (one or more, actually) and read (and even select settings to write to) that shared folder. This is the only way I know of to share files between the "host" and "guest" machines. For this, you have to use the Device menu to insert a "Guest Additions CD" (which is labeled in the Device menu for easy access). Then know the right command lines to mount that CD if it doesn't mount automatically, and finally you can move to that CD in the guest machine and run the appropriate program to install the guest additions. NOTE: In Linux you need gcc and build-essentials installed *first* before doing this. Also some updates may render the guest additions inoperable so you'll want to re-install them (especially if VirtualBox itself went through an update). Guest Additions will work on most Windows and Linux OSs. They do NOT work if you are using an Android "guest" machine as there aren't any built (that I know of) for an Android OS.

    * Can I keep a VM in a running state for instant switching to it?  (I

Absolutely. You can even close the main VirtualBox window and keep the virtual machine running.

presume that in that case, it will be using RAM, on the other hand, it could
be in a non-running (either non-booted or suspended-to-disk) and not be using

Yes, it uses ram. You could also take a "snapshot" or pause it and go unpause it later, I believe. I'm not 100% sure on this because I personally never had to use such a feature. However, I have kept VMs running and then even suspended my whole computer (ie. the host machine or as you call it "base OS") and then when I came back and took the machine out of suspended or sleep mode, the virtual machine also was awakened and running instantly.

    * I presume that booting a VM takes  about the same amount of time, maybe a
little longer than booting the base machine /  OS (well, unless the OS in the
VM is significantly "smaller" in terms of footprint and services started at

Yes, it would depend on the machine. But I don't find it is all that slow. In fact, sometimes it is about as fast as booting it via hardware. It depends on how fast your computer is, and also how much RAM, and CPUs you have set up for the virtual machine when you first put it together. There may even be other settings that might help with this, including hardware virtualization (which you should make sure your host (ie. "base") machine's BIOS supports and that it is turned on/activated. It might not always be necessary - but it depends on the type of virtual machine you need to use. For good measure, I have mine turned on and I don't notice any overall performance hit on my computer as a whole as a result.

    * Can I C&P between (applicatons in) different VMs and/or the base OS?

Yes. With the Guest Additions installed, you can (see above). Each VM must have the Guest Additions installed in order for you to use this function.

I hope this helps. I find using Virtual Machines very useful for testing, development and also for trying out new linux distributions. I keep a Windows one handy just in case I need to test something or do something. Those Windows VMs though are a pain. Just warning you. If you don't absolutely NEED one, I'd advise not even bothering. I'm seriously considering just deleting mine. Some Windows programs might be runnable in WINE rather than in a Windows VM.

Reply to: