Getting Started with Virtual Machines
Copyright © 2015 . All rights reserved.
- 1 Introduction
- 2 Licensing is Your Responsibility
- 3 Considerations When Using Virtual Machines
- 4 Creating a Master VM Image
- 5 Saving and Exporting VMs
Userful's Virtual Desktop Infrastructure (VDI) solution is a feature that makes it possible to map full-screen Virtual Desktop sessions to stations.
This guide provides step-by-step instructions for installing virtual machines (VMs) to use with the Userful Virtual Desktop Infrastructure (VDI) station mapping session container. It also includes instructions for saving and copying VM Master Images. "Station Mapping" lets a system administrator configure what type of Virtual Desktop session to launch on each station. Once the system administrator has mapped a Virtual Desktop session to a station, it will automatically launches a full-screen session on that station.
The simple instructions provided here are sufficient for creating VMs for demonstration purposes; in production environments, system administrators should refer to either Virtual Machine Optimization guide for how to configure.
Userful VDI technology relies on third-party virtual machine players (also known as "hypervisors") like Oracle® VirtualBox™ to create and configure Virtual Machines.
For deployments in production environments, Userful strongly recommends accessing the third-party documentation for detailed information, instructions and troubleshooting of VMs created with that VM player.
For example, VirtualBox has extensive online documentation.
Licensing is Your Responsibility
Please Note: You are responsible for complying with all operating system and application vendors’ license agreements when you clone a virtual machine or make it available for multiple users.
Considerations When Using Virtual Machines
- Make sure that sufficient system resources, especially RAM, are available for all mapped stations. For example, if the master VM is 512MB, and there are 15 stations, the system must have at least 8Gigs RAM available.
- The BIOS of the host PC must be configured to enable the hardware virtualization CPU setting.
- Though not required, performance will be better with a solid state drive (SDD). In particular, it is recommended to store the VM images on SSD.
- If cloned VMs are to be bound to an Active Directory domain:
- The Master VM must not be bound to an Active Directory domain prior to cloning, and
- "Writable" clones must be used. The reason is that (for security purposes) Windows performs automatic machine password changing at regular intervals. You can disable this automatic password changing according a Microsoft KB article: http://support.microsoft.com/kb/154501.
- Zero-client devices must be connected to the host PC, assigned, and configured.
- All Master VM image(s) must be stored under the same user account, such as "administrator" (or any other user who will "own" the VM images).
- If you access the internet through a proxy, it is important to configure your golden master image with the correct proxy settings.
- Install VirtualBox Extension Pack through Control Center > System Operations > Third-Party Add-ons
Creating a Master VM Image
A key advantage Userful's design is that cloning is automatic and quick; clones are copied from "known good" virtual machine master images known as golden masters. Plan to build one or more master system images and have end-users only use clones of these. Once an optimized golden master image is created, it can be copied to several systems.
To create a Master VM Image, follow one of the following options:
Creating a Master VM Image From Installation Media or Disk Image (.iso)
It is not necessary to create a Master VM image on host PC; you can create image on any desktop environment(laptops etc) and copy the same on the host PC. Following steps can be used to create a "golden master" VM image that can be copied to host PCs as an ova format for VDI funtionality.
- Creating a Master VM Image
- Exporting Master VM Image to an OVA format
- Transferring an OVA file to host PC
- Importing a Master VM
- Station Mapping
Creating a Master VM Image
This process can be used to create a "golden master" VM image that can then be copied to other machines.
- Login to the Desktop.
- Userful recommends logging in with an administrator account, as this account will have access to create, configure and/or delete VMs.
- Note: At any point in the following instructions, press F1 to access VirtualBox help instantly.
- The Name can be whatever you like, but Userful recommends using a short but descriptive name. In the example to the right, Windows 7 is the Name.
- Select a Type from the drop-down list. In the example to the right, the Type is Microsoft Windows.
- Select a Version from the drop-down list. In the example to the right, the Version is "Windows 7".
- Important: If your operating system is 64-bit, you must select the 64-bit Version of the OS.
- The more RAM is allocated to a VM, the better the performance will be.
- Each VM (or VM clone) is restricted to use only the amount of RAM (plus a small overhead) allocated.
- Ensure that your host PC has enough RAM to handle the number of VMs you plan to run, at the memory allocation you select.
- There is a wealth of information online regarding memory allocation for VMs. Userful recommends researching the memory requirements for the operating system you wish to install as a VM.
|Userful suggests the following minimum memory allocations for selected operating systems:
These are good starting points for demonstration purposes, but may not be sufficient for production use, depending on system hardware and/or intensity of usage.
- Choosing "Fixed size" means that a portion of your hard disk storage will be reserved for the VM disk file.
- Choosing "Dynamically allocated" means that the VM hard drive will only use space on the host PC's physical hard drive as it is needed (up to a maximum size that you will choose in the next step). Note that storage space is not "returned" to the host PC even if the VM is no longer using it.
- According to VirtualBox documentation, "While occupying much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically allocated file."
- Ensure that your physical hard drive has enough capacity for the number of VMs you plan to run.
- Note: Your newly-created VM hard drive should appear in the VM list on the left side of the window.
- If installing from media, insert the installation media (typically an optical disk) and wait several seconds for it to spin up or be mounted.
- Click on the small "Folder" icon to browse to your host PC's optical drive, or the location of the .iso file, then click "Start".
- Follow the instructions for installing your chosen operating system.
- When installation is finished, you should have the VM running in VirtualBox and the same VM would be listed under Control Center > Virtual Machines > Master Virtual Machines Summary tab.
The image to the right is an example of what a VirtualBox VM looks like, when running in windowed mode.
Note that at the top and bottom of the window are elements from the VirtualBox application.
When a VM is run in fullscreen mode, no VirtualBox control elements will be visible. Stations mapped to VM stations will always run in fullscreen mode.
- For a list of Guest operating systems, including whether or not Guest Additions are available, please go to the Virtualbox Guest OS Status page.
- Methods of accessing virtual optical drives will vary, depending on which Guest OS you are using. Make sure that the virtual CD/DVD drive is enabled in the VM player (refer to VirtualBox documentation for more information) and that the VM "owner" is in the cdrom user group.
- To install, access the CD/DVD drive, find the appropriate .exe or .sh file (depending on the OS type), and follow the on-screen prompts to complete the installation. For detailed help installing Guest Additions, please see the VirtualBox documentation.
Creating/Exporting Virtual Appliance Files
Once a virtual machine is created and optimized, you may wish to create a virtual appliance (.ova to use as a Golden Master Image, to be deployed on several Userful systems. The most common file format for virtual appliances is Open Virtualization Format, which is not specific to any system architecture. These files have an .ova format and includes VM configuration data. To create an ova file from a Master VM:
- Launch VirtualBox by going to Applications > System Tools > Oracle VM VirtualBox
- Note: At any point in the following instructions, press F1 to access VirtualBox help instantly.
- Navigate to the folder where you wish to save the appliance file, and enter a filename with the .ova extension.
- In the example to the right, the file path is /shared-files/Win8.ova.
- To change any of the configuration settings, simply double-click on the description.
- The export process will take several minutes.
Transferring an OVA file to host PC
Virtual Appliance is a virtual machine, complete with all customizations and settings (including memory allocation and network configuration).
The most common file format for virtual appliances is Open Virtualization Format, which is not specific to any system architecture.
An OVF package is a directory containing several files; for ease of copying and redistributing, OVF packages are often compressed with the tar utility into a single .ova file.
If you have an existing .ova file, it can be used quickly to create a Guest OS VM on host PC, complete with pre-configurated settings. To do so:
- Copy the .ova file using any storage medium (e.g. USB keys) from any desktop environment to your host PC (under "/shared-files" directory). Alternatively, you can transfer files through ssh or another mechanism that you are familiar with. For information on accessing storage medium, visit Manuals/Removable_Storage_and_Optical_Drives.
Once finished, next step is to import Master VM from an ova file.
Please Note: Before using an .ova file for creating Master VM image, please ensure Guest Additions are installed as supported by Guest OS. For the complete list of OS and supported guest additions, visit https://www.virtualbox.org/wiki/Guest_OSes
Importing Master VM Image
To import a Master VM from an ova file:
- Ensure .ova file exists in /shared-files directory. If not, copy .ova file in /shared-files directory of the host PC
- Open Control Center > Virtual Machines
- Click “Import VM image” button and wait for few seconds
- Click “Ready to Import” button next to (.ova) file to create the master image. This process takes some time
- Once finished, Master VM Image will be listed under Control Center > Virtual Machines > Master Virtual Machines Summary is ready for use through Control Center > Station Mapping.
Saving and Exporting VMs
Saving and Copying Virtual Hard Disk Files(VDI file)
It can be very time-consuming to create Master Images on each system manually, by installing from media. Fortunately, VM players allow users to create VMs much more quickly by using an existing virtual machine as a template. Virtual machine "templates" can be either:
- VM player-specific; that is, a file type that is created by a specific VM player and is compatible only with that player.
- If using Oracle VirtualBox, the "virtual hard drive" file has a .vdi extension.
- When installing new Master VM Images from a .vdi file, some configuration will still need to be done on the target system.
- VM-player neutral; that is, in a virtual appliance format that can be exported and/or imported from many VM players.
- The most common file format for virtual appliances is Open Virtualization Format, which is not specific to any VM player or system architecture. These files have a .ova format.
- When installing new Master VM Images from a .ova file, configuration data is also imported.
Saving and Copying Virtual Hard Disk Files to Use as Golden Master Images
Once a virtual machine is created and optimized, you may wish to use the VM's virtual hard disk file (.vdi as a Golden Master Image, to be deployed on several Userful systems.
To do so:
1. First, ensure you have a removable storage medium (such as a CD/DVD or USB flash drive) with enough capacity to save the .vdi file.
- Alternatively, you can transfer files through ssh or another mechanism that you are familiar with.
2. Next, find the .vdi file. Unless you have specified a different directory for VM storage, the virtual hard drive file will be in the directory that the VM player creates.
- With Oracle VirtualBox, that directory is in the home directory of the user who "owns" the VMs. Typically the file path is: /home/<VM-Owner>/VirtualBox VMs/<Guest-OS-Name>/
3. Locate the file with the .vdi extension.
4. Copy that file onto your removable storage media.