Virtual machines have been exploding in popularity for a number of reasons. Have you taken the plunge into the virtual world? If you haven’t — or even if you have — this guide can give you both knowledge and ideas.
What is a virtual machine?
Virtual machines (VMs) are guest operating systems or application environments that run on a physical machine called the host, but give you the perception that you’re connected to a different physical box.
For example, let’s say you have a Windows and a Linux operating system installed on the same physical computer. When you use the Windows OS, it gives you a different look and feel compared to the Linux one. You can’t see your Windows documents in your Linux and vice-versa. This gives you a perception that each OS is connected to a different computer when in reality they are connected to the same box.
Likewise, you can use the same physical machine for both your production and test environments, so what you do in the test environment doesn’t affect your data or application in the production environment.
This differentiation is achieved through virtualization software that imitates a dedicated hardware to ensure that your experience on a virtual machine is the same as that on a dedicated server.
Do virtual machines need any specific hardware?
Though virtual machines don’t need any specific hardware, they nevertheless require a lot more bandwidth and processing capacity than a traditional one.
What are the types of virtual machines?
You can classify virtual machines into two types. The first one, called a system virtual machine, mimics all the components and processes of a real computer. It allows you to use a single server as different machines and you can even run multiple operating systems on it.
The second type is called a process virtual machine, and it is used to run only a single application or process. This virtual machine doesn’t exist when the application is not in use. This type of virtual machine is mainly used to run a single program that’s incompatible with the underlying operating system.
What is the best way to scale a virtualization setup?
The most cost-effective way to scale up an existing virtualization system is by adding some extra memory. This will allow you to run more machines concurrently and at the same time, will improve the overall performance.
Let’s look at an example. Say your virtual machines are running on a 32-bit Microsoft Virtual Server. So, VMs are restricted to about 3.6GB of physical memory. When you increase the memory, subject to the amount that’s supported by the host’s operating system, you can increase the memory of each VM. In turn, this will lead to better performance.
You even have the choice to add more VMs when you have extra memory.
How can I back up my virtual machine?
Use tools like Windows Backup to create backup files and copy them to a host computer or any other external device. Alternately, use a cloud backup service that supports VMs to store your data on the cloud. You’ll most likely have to install third-party software like a cloud client to back up your files on the cloud.
If you want to back up the entire VM, keep the VM in saved state, copy all the related files, and resume it again. You can also automate it using Virtual Server COM API.
Is there a limit to the number of VMs I can install?
The number of VMs you can install is limited only by your system’s resources. Since each VM requires a certain amount of CPU, RAM, memory, and other resources, your physical system’s configuration determines the number of VMs you can install on it.
However, remember virtualization adds some overhead to your system, so it may be slower than what you may experience on real hardware. For this reason, it’s not a good idea to install multiple apps or games that demand a ton of resources.
What is the use of VMs?
VMs are useful for experimenting with different operating systems and applications without having to install them on your physical hardware.
For example, you can try a new Linux distribution on your operating system to check out its look and feel. Once you’re done experimenting, you can delete this VM and continue with the operating system on your host machine.
This flexibility is what makes VMs so popular. In fact, it’s not just restricted to operating systems. You can use it to create a test environment for a specific set of users, too, and once they’re done, you can delete them.
Another advantage is whatever you do inside of a VM is sandboxed from the rest of the system. This way, you can test different apps and systems to see what they do without worrying about them affecting your physical system.
Lastly, you can use VMs to run software that are not otherwise supported by your host’s operating system. A good example would be running Windows XP or other old applications that are no longer supported by existing operating systems.
What’s the difference between a dynamically allocated and fixed-size disk?
In a fixed-size you allocate a certain amount of space for a VM, and this space is locked regardless of how much of the allotted space you use. On the other hand, a dynamically allocated disk adjusts according to your requirements. This doesn’t mean the disk will expand forever, rather you set the upper limit and this disk will expand as you use until it reaches the specified limit.
Setting this upper limit is important to ensure that one VM doesn’t use up all the space in your system.
In terms of performance, fixed-size disks are better and you’ll also know how much disk space you’ve used.
How can I set up a VM?
- Open your VM app and click on a link or button for creating a new VM.
- This will open a wizard. Simply follow through the instructions on it. Sometimes, the default values appear, especially when you choose operating systems. So, make sure you change the values you want.
- First off, ensure that the name and version are right.
- The wizard will next prompt you to create a virtual database. You can skip this option if you already have a virtual disk you want to use.
- Next, you’ll have the choice to create a dynamically allocated or a fixed-size disk.
- In the next step, choose the size of your disk. You can go with the defaults or customize it for your needs.
- Finally, when you click the “Create” button, your virtual hard disk is created.
- After this, you’ll see the main app window. If you have multiple VMs, choose the one you want and hit the “Start” button.
That’s it. Your VM is set up and ready to use.
Can my virtual machine access my computer’s files?
By default, no. Your virtual machine is an isolated container that will have no access to your computer’s file system.
But you can allow a virtual machine to access your computer’s files by setting up shared folders in your VM app. This way, the guest operating system accesses a folder just like how it would access a shared folder on a network.
How can I migrate a VM?
You can migrate a VM using the software’s migrate function.
- Choose the VM you want to migrate.
- Click on the migrate option to begin the process.
- Choose the destination host computer (the one you want to migrate to). The software will also give you a list of choices based on compatibility. You can select from one of these choices, if you’re unsure of your destination computer.
- If your virtual software has a drag-and-drop feature, use it to move your VM folders to the destination computer.
Can you suggest some ways to speed up my VM?
Your VM can take up a lot of your computer’s resources and can still be slow. Here are some ways to speed it up.
- Use fixed-size disks instead of dynamically allocated ones simply because they take up less overhead.
- Many VM software come with a drive package that’ll make your guest OS run faster.
- Antivirus may slow down your VM by scanning through its files, so it’s best you exclude VM directories in your Antivirus software.
- Some specialized processors like Intel VT-x and AMD-V improve virtualization, so make sure they’re enabled for your system.
- Give more memory to your VMs, as they tend to be memory-hungry all the time.
- Likewise, allocate more CPU. If your physical box has a multicore CPU, ensure you allocate more cores to your VM.
- Move your VMs to a solid-state drive as that’s one of the fastest ways to improve your computer speed.
- Sometimes, putting your VM on suspend mode is better than shutting it down completely, as it doesn’t have to boot from scratch every time.
- Do simple tasks like reducing the background applications and programs, improving boot time, and reducing the amount of RAM. These are things you’d do in a physical computer to boost its performance and the same applies to virtual machines, too.
You can follow one or more of these suggestions to improve your computer’s speed.
Is it possible to add a NIC to my VM after I create it?
Yes, it’s possible.
Stop the VM and deallocate it first. Then, add or remove a NIC, provided it’s not the last NIC on your VM.
How can I uninstall a VM?
Uninstalling a VM is as easy as installing it. Simply navigate to the virtual machine’s main folder on the physical hard drive of your computer. You can see all the virtual machines that are installed on your system here, along with its settings and related data.
Generally speaking, most main folders will have an uninstall option. Just click on it to uninstall your VM.
If this option is not available in your main folder, you can do it manually. Choose the VM you want to uninstall and move all its contents to the trash bin. Clean out the trash bin right away to delete the virtual machine’s operating system completely.
Photo credit: Flickr / Hanul