In previous chapters we have set up the disk storage elements required for our new virtual machine. We are now ready to create a Guest. But first, do not forget to copy the installation media of your preferred operating system to the Media Storage. Then, open the "Guest/Host/Pool" section of the tree view and select on the pool where you want to create the Guest. Click on the "New Guest" button, and the New Guest form will appear:
In the form inputs of the General section, enter a guest name for your new Guest, an optional description, select the Guest OS you plan to install (or the best match) from the dropdown list and select to "Boot from" cdrom. The preset for the Guest OS lets the Dashboard select the virtual hardware (network card, graphics card, disk controller, etc) with the best compatibility and support, to avoid problems.
With the controls on the right, you can configure the virtual hardware of the Guest. Choose the amount of virtual CPUs and RAM that you want this Guest to use. The kind of emulated CPU, keyboard driver, audio, etc is preselected by the Dashboard, based on the OS that you want to install. You shouldn't change these, unless you know what you are doing. Changing these settings to values not supported by your OS can make your Guest OS installation to fail.
You can also set a Preferred host. It tells the flexVDI Manager on which flexVDI Host should the machine preferibly run. You can leave it empty if you want to let the Manager decide (this is the default). Keep in mind that resources are assigned to Guests in order of Pool priority, and having selected a Host as preferred does not ensure that a Guest will run on it, as it may have been assigned to another pool of higher priority. If a Guest must run on a specific Host, you should create a Pool with only that Host, and create the Guest in it.
All these settings can be changed later (before or after installation of the Guest O.S.), if a different set of resources is required. When you are finished, click on the "Save" button. The details view will change to reflect that the state is now "Stopped", and it will show two additional tabs: Network and Storage.
Configure network interfaces
Switch to the Network tab:
Click on the 'Add Network Interface' button to add more network interfaces to the Guest. For each interface, you must set the following properties:
- Bridge: select one of the virtual bridges created on the Hosts with flexvdi-config, where the interface will be connected.
- Driver: select the virtual interface model. The virtio model is a purely virtual device, while the rtl8139 and e1000 models emulate the physical network cards with the same name. The virtio model has the best performance, but there is no support for this model in some OS. In those cases, try with the other two models.
- VLAN mode: select how the Guest accesses VLANs in the bridge it is connected to. There are three modes:
- none: This is the simplest configuration. The port of the virtual bridge that is connected to the Guest sends/receives untagged traffic only. Use this option when you have no VLAN in your network, or your hosts only receive untagged traffic from their trunk switches.
- access: In access mode, traffic from one VLAN is sent untagged from the bridge to the Guest, and tagged again when traffic is sent from the Guest to the bridge. Enter the VLAN ID in the next textbox. This is equivalent to configuring a hardware switch port in access mode, hence its name.
- trunk: In this mode, the traffic of a list of VLANs is passed unmodified (tagged) to the Guest. Enter a list of comma separated VLAN ID's in the next textbox (e.g. "1,23,60", or "5" if there is only one ID). The Guest will need to be configured properly to access those networks. This is equivalent to configuring a hardware switch port in trunk mode.
Now we will configure the storage units of the Guest. In a previous chapter we configured a Volume called MyExternalVolume, that we will now use to store the virtual disk image of our Guest. Switch to the Storage tab:
There are three tables, for disk images, physical disks and media images. We will start by adding a disk image, so click on the 'Add Disk Image' button to add a new one. For each disk you must set the following properties:
- Image storage: Image Storage where the image will be stored. Select "MyImageStorage" from the dropdown list.
- Volume: Volume where the image will be stored. Select "MyExternalVolume" from the dropdown list.
- Image file: Click on the '+' button next to the field, and a dialog will appear:
In this dialog, you can a) create a new virtual disk image in the Volume you just selected, giving a name and size (in MiB); or b) select an existing disk image in the Volume. In this case, no disk image exists yet, so create a new one with enough space to install your Guest OS.
- Disk controller: Two disk controllers are available for disk images: virtio and ide. As with network interfaces, virtio offers the best performance, but ide is required in those Guest OS that do not have a driver for a virtio disk controller, as it emulates a real IDE controller.
- Port #: Port number of the disk controller where the disk image is plugged in. You usually do not have to touch this field as the flexVDI Dashboard will automatically select the next available port for you. However, this number controls the order in which disks are seen by the Guest OS, so you may want to change it. This is important to control the boot order, for instance.
The next table allows to connect Host's physical disks directly to a Guest. We won't use them in this simple installation, and we have not defined a Direct Storage yet, so there is nothing to do here.
The last table allows to define optical drives for the Guest, and attach ISO images to them. Click on the 'Add Media Image' button to add two new optical drives. The first one will contain the installation media, and the second one will contain the Guest Tools ISO. For each media image, you must configure the following properties:
- Media Storage: Media Storage that contains the ISO image you want to attach. It can also be "Empty drive" for an empty optical drive or "Internal MS" for special ISO images, like the Guest Tools ISO. Having an empty drive is useful to attach an ISO image later, even while the Guest is running. Select the "cifs" Media Storage for the first optical drive, and the "Internal MS" for the second.
- File: ISO image to attach to this drive. Select the installation media for the first drive, and "guest-tools" for the second.
- Port #: The disk controller for media images is currently always IDE. Again, the flexVDI Dashboard will automatically use the next available number, but you can change the order.
When you are finished, review the configuration and click the "Save" button. You can modify any configuration of your guest as long as you do not start it. When a guest is running, only the ISO images attached to optical drives can be modified.
Starting the guest
There are two ways to start a guest: with the "Start" command and the "Start once" command. The difference is that with the "Start" command, if the virtual machine is stopped for any reason other than a user action from the Dashboard, the flexVDI Manager will start it again. This option is specially useful for server type machines. For now, simply click on the Guest's "Start/Stop" dropdown and click on "Start once".
You have just asked flexVDI Manager to start a Guest. This operation may take several seconds to complete, but flexVDI Dashboard does not make you wait until the operations you request complete. Instead, you can immediately continue using the program because all communications between flexVDI Dashboard and flexVDI Manager are asynchronous. As a result, sometimes the information you see on your screen is not completely up to date, as it can take some moments to be refreshed.
Connecting to the Guest
Now you will want to access the console of your new Guest. When a Guest is started, the "Open Console" button is enabled. You can click on it, and a new browser tab will open.
Congratulations! You have successfully created your Guest, and you have opened its system console. You can proceed with the Operating System installation now. Check the chapter on how to configure guest operating systems.
flexVDI offers the flexVDI Guest Tools. This software significantly improves the user experience providing features and improved performance. It includes two types of software components:
- Virtio drivers for Windows. Most Linux distributions come with support for virtio devices, but Windows does not. Drivers for all virtio devices are included in the Guest Tools ISO. In particular, you will need this ISO inserted during Windows installation if your disk images use this controller type, so that the drivers can be loaded. Look inside the "viostor" folder for the right driver for your Windows edition.
- Guest agents. These are agents running inside the Guest and communicate with the flexVDI Client, enabling features like clipboard sharing, resolution adjustment and automatic session login.
Insert the Guest Tools ISO in a running Guest just changing the ISO file in one of the configured optical drives. It includes an installer for Linux and Windows, that will install and activate the Guest Agents and the required drivers for any detected virtio device in your Guest.
The Guest Tools ISO is installed in every host, and can be updated with yum just like any other system package. Alternatively, you can download the latest version of the software from http://depot.flexvdi.com/guest-tools/.