This is a set of FAQ, suggested approach, quick DO's and DON'Ts for VirtualBox. The answers here are NOT the absolute truth. There are exceptions depending on specific environment configuration. The book delves into the details of choosing an approach. (Note: VM stands for Virtual Machine)
Is it complex to maintain a Virtualized Environment?
- There is some learning curve
- You already have a starting point to learning virtualization with this book on hand
- Once you get going you will likely forget that your environment is virtualized (That is a good thing)
- It is possible to over virtualize an environment and that is no fault of the technology itself
- Break down components to the extent required
Before I start to virtualize do I need to learn how things work under the covers?
- Knowing how things work under the covers is always a great asset
- Having more depth will help you resolve issues when you are out of options
- You don't have to know everything before virtualizing your servers
Do I need expensive hardware to virtualize?
- No you do NOT require expensive or enterprise grade hardware to virtualize
- Virtualization is meant to save you on hardware costs. You will be buying less, than more hardware to virtualize
Do I need expensive software to virtualize?
- Not if you are using VirtualBox!
What are the ways I can interact with my virtual environment?
- Web/GUI interface
- Command line
- Programming SDK / Web services
What can I virtualize?
You can virtualize most operating system and devices. A lot of them will work well, although not everything is supported. Some examples:
- Operating Systems (Windows, Linux)
- Mobile devices (Android)
- Firewall devices (pfSense)
- Gnome partition editor (run from CD)
Which type of Virtualization is superior?
- Between Kernel based, Hypervisor and Containers, each have their place and reason
- None superior except when requirement dictate one over the other
Should I take advantage of "hardware assisted virtualization"?
- Yes, whenever possible please do
- Some of the advanced features such as IOMMU have specific needs and limitations
- Disabled by default on BIOS; enable even if not using them
- Required for installing 64-bit operating systems on VirtualBox
How do I estimate resources on host?
- Resources are based on workload and have little to do with virtualization
- Looking at it from a different perspective, virtualization has minimal overhead
The more CPU for guest the better?
- Not always true. Over allocation may slow down guests
Can guest share memory?
- Guests can share common memory. They can also free up designated but unused memory for other guests
- But they cannot share memory as easily as they share CPU
Hypervisor Types - which one is better?
- Type 2 Hypervisor (VirtualBox) is in no way inferior to Type 1 contrary to popular belief
- They both have their advantages neither is superior as explained in the relevant chapters
Installing VirtualBox - Which binaries to use?
Upgrading VirtualBox - How difficult & how up to date?
- Do NOT upgrade unless there is a security, bug or feature that you are interested in
- Upgrades are easy but important to test before moving to production. Have a back out plan!
- If this is a major upgrade the same rule applies except you are on a time-frame to stay supported
- Scripts in the book will ease the upgrade process
What is the best way to file sharing between servers?
The option depends on the use case:
- Sharing via VirtualBox
shared folders is a good workable solution
- Sharing disks via
Multiattach disk mode is to be considered for long term sharing
- Sharing via traditional methods (NFS) is also viable
Do I need to learn about networking concepts?
- Virtualization has a number of networking related configuration
- Keep networking simple, unless you have special network requirements
- Best to implement network features on the switch layer rather than at the host/guest
- There is an expanded chapter on the possible options and features
When to use paravirtual drivers?
- Whenever possible use paravirtual driver
- Use paravirtual network driver as most operating system support it
When and how often should I check log files?
- Remember to check the log files even if VM works correctly
- First place to go when there is an error or issue
- Using the supplied script to start VMs will display issues reported in the log
Are there recommended Linux swap settings?
- Swap can “act up” at times and it is recommended to set 'swappiness' to zero
- Refer to the performance tuning chapter on details
Is there a way to auto-start/stop VMs?
- Yes, VMs can be successfully started on host startup
- There are some caveats to successfully stopping VMs on shutdown
Should VirtualBox be run as root?
- Run VirtualBox as non-root user
- Running VirtualBox as root is not supported or recommended
- If you are having issues running as non-root:
- It's likely a file permissions issue
- Happens when you switch from root to non-root
How to allocate disks on VMs?
Read the one-line answer carefully!
- Allocate large disks with dynamic storage but small disk size/partition inside the guest
- If you allocate a large disk/partition and use ext4 you will use more space than the guest claims
- Use a single primary partition and create individual disks for each mount
How many VirtualBox VMs can you start on one host?
- Apparently that answer is 43 as indicated by a user on the VirtualBox forum!
- There is no theoretical limit
Does delete snapshot, delete snapshots?
This may be a good interview question! Most will fumble, but here is quick answer.
- Snapshot delete either deletes (discards) a snapshot or merges a snapshot to a parent snapshot
Does filesystem copy of VMs work?
- Use it to move or copy VMs, if the two VMs will never meet again (especially on the same network)
- Target host should have the same directory structure or some tweaking is required
Best way to compact my disk image (VDI or other format) file
- This is not a one-liner unfortunately
- Refer to the compacting chapter :)
- It is same as the operating system crash in Windows or UNIX
- The term is used on VirtualBox when the application gives up
Can/Should I run other loads on my host other than VirtualBox Hypervisor (load)?
- Yes, you can, but no!
- Create another VM for any load - but don't run it on the host
Can I edit the XML configuration files directly?
- No, but yes you may want to and it's alright if you are careful. I can't believe I said that!
- Comparing XML helps give a quick glace at differences between current and prior setting or between VMs
Is there a way to backup VM? - I mean reliably & consistently
- Yes, there is.
- It was one of the 1st things I personally embarked to strategize
- There is a chapter on it with scripts, flow-chart and everything you need to know
Do I need to performance tune?
- VirtualBox (and virtualization) benefit from performance tuning
- So yes and yes the book covers it
Are there supporting software that works with VirtualBox?
- Yes, there are many
- A few are included in the discussion and there is a full listing included