10.4. Oracle VM VirtualBox Desktop Provider

10.4.1. Are all Oracle VM VirtualBox Releases Compatible With Oracle VDI?
10.4.2. Oracle VM VirtualBox Install Is Failing With "Postinstall Script Did Not Complete Successfully" Errors
10.4.3. There Is an Error When I Add an Oracle VM VirtualBox Host to a Desktop Provider
10.4.4. What Are the Requirements for High Availability for Oracle VM VirtualBox?
10.4.5. Changing the Password of the VirtualBox User
10.4.6. Adding a Sun ZFS or iSCSI Storage Fails if the VirtualBox User is Not Root
10.4.7. Adding a Storage Fails With an "Unable to Stop Cluster" Error
10.4.8. A Sun ZFS or iSCSI Storage is Shown With a Reduced Capacity
10.4.9. A Storage Cannot Be Removed From a Desktop Provider
10.4.10. Virtualization Hosts Crash if a Storage is Shut Down
10.4.11. A Critical Alarm is Displayed When Storage is Added to a Desktop Provider
10.4.12. Provider Host is Unresponsive After Updating Oracle VM VirtualBox
10.4.13. Storage is Unresponsive After Updating Oracle VM VirtualBox
10.4.14. Users Experience Blurry Text in Internet Explorer
10.4.15. The Time in My Oracle VM VirtualBox Desktop Is Too Slow
10.4.16. I Can See My Oracle VM VirtualBox Hosted Desktop, But It Will Not Start
10.4.17. Why Are My Windows 7 Audio Drivers Not Automatically Installed?

10.4.1. Are all Oracle VM VirtualBox Releases Compatible With Oracle VDI?

No. See Section 4.1.2, “System Requirements for Oracle VM VirtualBox” for details of what is supported.

If you want to create virtual machine templates locally, for example on a laptop, make sure to use the same release as you have installed on your Oracle VM VirtualBox desktop provider host. This ensures that you install the correct version of the guest additions, and avoids incompatibility problems with the XML configuration files for your virtual machines, which can prevent them from being imported into Oracle VDI.

10.4.2. Oracle VM VirtualBox Install Is Failing With "Postinstall Script Did Not Complete Successfully" Errors

If you are installing Oracle VM VirtualBox, you may get the following error in the console:

## Executing postinstall script.
Configuring VirtualBox kernel modules...
VirtualBox Host kernel module unloaded.
devfsadm: driver failed to attach: vboxdrv
Warning: Driver (vboxdrv) successfully added to system but failed to attach
can't load module: No such device or address
## Aborting due to attach failure.
## Configuration failed. Aborting installation.
pkgadd: ERROR: postinstall script did not complete successfully

Installation of <SUNWvbox> partially failed.

This error is typically seen when previous releases of VirtualBox are still installed. Try removing VirtualBox (./vb-install -u). Then verify that the following packages have been removed:

  • SUNWvbox

  • SUNWvboxkern

Reboot, then try the installation again.

10.4.3. There Is an Error When I Add an Oracle VM VirtualBox Host to a Desktop Provider

Errors can occur when you add an Oracle VM VirtualBox host to a desktop provider. In Oracle VDI Manager, error alerts might be displayed on either the Specify Host or Verify Certificate steps of the configuration wizard.

Specify Host Step

After you enter the host details, the following actions happen:

  • The operating system of the host is verified.

  • The DNS name of the host (if a DNS name is used) is resolved.

  • The host's SSL and SSH certificates are retrieved.

If you see the message "The operating system does not match because all hosts should run the same operating system.", it means you cannot add the host to the desktop provider. Due to the differences in the availability of the storage types and the way they are used, the virtualization hosts for an Oracle VM VirtualBox desktop provider must use the same operating system. If you have a mixture of Oracle Solaris and Oracle Linux virtualization hosts, you must create separate desktop providers for them.

An error can be caused by DNS errors, either in resolving the host name or in contacting the host. If this happens, check the following:

  • Check that all the information you entered is correct, including SSH and SSL ports.

    You specify the SSL port when you install VirtualBox.

  • Check that the Oracle VDI host can resolve the host by using the nslookup hostname command on the Oracle VDI host.

  • Check that the host is running and that the SSH service has started:

    # svcs svc:/network/ssh:default

    The service should be online. If a service is marked as maintenance, try resetting it using:

    # svcadm clear <service_frmi>

Verify Certificate Step

An error at the Verify Certificate step, indicates that the VirtualBox web service cannot be contacted or might not be running.

Check that the VirtualBox web service is online, using the following command:

# svcs svc:/application/virtualbox/webservice:default

If the service is in maintenance mode, use the following command to clear the service and check the status again:

# svcadm clear svc:/application/virtualbox/webservice:default

If the service is offline, use the following command to enable:

# svcadm enable svc:/application/virtualbox/webservice:default

10.4.4. What Are the Requirements for High Availability for Oracle VM VirtualBox?

High Availability for an Oracle VM VirtualBox virtualization platform would require at least two VirtualBox hosts. In the event that one VirtualBox server goes down, all existing desktop sessions would be terminated. Then the terminated sessions would be restarted on the remaining VirtualBox servers as they are requested by users, as long as there is sufficient memory available.

High Availability for Oracle VDI, Sun Ray Software, and MySQL requires two Oracle VDI hosts. See Section 2.1, “About Oracle VDI Centers and Hosts” for detailed information about the hardware configurations that support this type of redundancy.

10.4.5. Changing the Password of the VirtualBox User

When you add an Oracle VM VirtualBox host to a desktop provider, you provide the user name and password of the user that runs VirtualBox on the host. These credentials are the same credentials provided when VirtualBox was installed. Oracle VDI uses the credentials to access the VirtualBox host using SSH and to access the VirtualBox web service.

Before you change the password for the VirtualBox user, it is best to enable maintenance mode for the VirtualBox host to minimize disruption to users. See Section 8.9.1, “Oracle VM VirtualBox and Microsoft Hyper-V Host Maintenance”.

To change the password of the VirtualBox user, perform all of the following steps:

  1. Change the password for the UNIX user.

    1. Log in as root or the VirtualBox user on the VirtualBox host.

    2. Change the VirtualBox user's password.

      Follow your organization's standard policy for changing passwords.

      For example, to use the passwd command:

      # /usr/bin/passwd
      passwd: Changing password for root
      New Password:
      Re-enter new Password:
      passwd: password successfully changed for root
      
  2. Change the password for the VirtualBox web service user.

    1. Log in as root on the VirtualBox host.

    2. Generate the password hash of the new password.

      You can use the VirtualBox command line to generate the hash.

      # VBoxManage internalcommands passwordhash password
      

      For example:

      # VBoxManage internalcommands passwordhash T0pSecr3t
      Password hash: bfd5bde76fcee3c2e6fc583cd0541569a1d35d551c19d99b36a0ee7628b4b114
      
    3. Change the password hash for the web service user.

      The VirtualBox web service uses the VBoxAuthSimple library to authenticate web service users. The hashed password is stored in the VirtualBox global extra data items.

      # VBoxManage setextradata global VBoxAuthSimple/users/User PasswordHash
      

      For example:

      # VBoxManage setextradata global VBoxAuthSimple/users/root \
      bfd5bde76fcee3c2e6fc583cd0541569a1d35d551c19d99b36a0ee7628b4b114
      
    4. Verify that the stored password hash for the VirtualBox web service user is correct.

      # VBoxManage getextradata global VBoxAuthSimple/users/User
      

      For example:

      # VBoxManage getextradata global VBoxAuthSimple/users/root
      Value: bfd5bde76fcee3c2e6fc583cd0541569a1d35d551c19d99b36a0ee7628b4b114
      
  3. Change the password for the VirtualBox host in Oracle VDI.

    1. In Oracle VDI Manager, go to Desktop Providers.

    2. Select the desktop provider that contains the VirtualBox host.

    3. Go to the Host tab, select the host and click Edit.

    4. In the Password field, enter the new password and click Next to confirm the changed details.

    Alternatively, use the vda provider-host-setprops command to change the password.

10.4.6. Adding a Sun ZFS or iSCSI Storage Fails if the VirtualBox User is Not Root

When you install VirtualBox, you specify the user that runs VirtualBox on the host. On Oracle Linux platforms, if you do not specify root as the VirtualBox user, you cannot add a Sun ZFS or iSCSI storage to the desktop provider.

The Cacao log messages show errors with executing the iscsiadm command, for example:

com.sun.vda.service.api.ServiceException: Error executing command
'iscsiadm -m node -T iqn.1986-03.com.sun:02:ca4afc97-4ffc-67ba-bac6-e8992567cf34 
-p 191.168.1.100:3260 -o new' on host '192.168.1.100': iscsiadm: Maybe you are not root?

On Oracle Linux platforms, if you want to use Sun ZFS or iSCSI storage, the VirtualBox user must be root.

10.4.7. Adding a Storage Fails With an "Unable to Stop Cluster" Error

Problem: When you first add an iSCSI or Sun ZFS storage to an Oracle Linux VirtualBox desktop provider, it can fail with an Unable to stop cluster as heartbeat region still active error. The problem is caused by a failure to stop a running Oracle Cluster File System version 2 (OCFS2) cluster.

Solution: Stop OCFS2 services, disconnect the iSCSI target, and then add the storage again.

To stop OCFS2 services and disconnect the iSCSI target, perform the following steps on each virtualization host for the desktop provider:

  1. Log in as root on the virtualization host.

  2. Stop the OCFS2 service.

    # /etc/init.d/ocfs2 stop

    This command should unmount all OCFS2 file systems and stop all OCFS2 activity.

  3. Verify that the OCFS2 file system is not mounted in /vdi/mount.

    Use the mount command to check if anything is mounted in that location.

    If the file system is not unmounted, try to unmount it using the following command:

    # umount /vdi/mount
    

    If it is not possible to unmount the OCFS2 file system because the device is busy. Use the following command to stop all processes running on the mount:

    # fuser -k /vdi/mount
    
  4. Stop the O2CB cluster service.

    # /etc/init.d/o2cb offline 
    # /etc/init.d/o2cb unload
  5. Disconnect the iSCSI target.

    Use the iscsiadm -m session command to list the iSCSI targets on the host. For example:

    # iscsiadm -m session
    tcp: [1] 192.168.1.100:3260,1 iqn.1986-03.com.sun:vdi:j4c4iwosixizjpniicm9:y29qlvunnmdnes5jolyu
    

    In this example, the session ID is shown in brackets [1], followed by the IP address and port of the iSCSI server (192.168.1.100:3260), followed by the iSCSI target name (iqn.1986-03.com.sun:vdi:j4c4iwosixizjpniicm9:y29qlvunnmdnes5jolyu).

    Log out of the iSCSI target.

    # iscsiadm -m node -T targetname -p ip:port --logout
    

    For example:

    # iscsiadm -m node -T iqn.1986-03.com.sun:vdi:j4c4iwosixizjpniicm9:y29qlvunnmdnes5jolyu \
    -p  192.168.1.100:3260 --logout

    Delete the iSCSI target.

    # iscsiadm -m node -T targetname -p ip:port -o delete
    

    For example:

    # iscsiadm -m node -T iqn.1986-03.com.sun:vdi:j4c4iwosixizjpniicm9:y29qlvunnmdnes5jolyu \
    -p 192.168.1.100:3260 -o delete

10.4.8. A Sun ZFS or iSCSI Storage is Shown With a Reduced Capacity

If you use either Sun ZFS storage or iSCSI storage with Oracle VM VirtualBox desktop providers on Oracle Linux platforms, Oracle VDI can show the storage as having a reduced capacity, as follows:

  • A storage that is larger than 16 terabytes (TB) is shown as having a capacity of only 16TB.

  • A small-capacity storage, for example 20 gigabytes (GB), is shown having a significantly reduced capacity, for example 15GB.

This issue is a result of using the Oracle Cluster File System version 2 (OCFS2) with the Sun ZFS or iSCSI storage types on Oracle Linux platforms.

OCFS2 only supports partitions up to 16TB (due to the default block size of 4 kilobytes). When Oracle VDI formats the OCFS2 partition on a storage, it restricts the partition size to 16TB to avoid configuration errors.

For small-capacity storages, the reduction in capacity is due to the requirements of the OCFS2 file system. The workaround is to use a bigger storage. The storage capacity should be at least 50GB, depending on the number of desktops you want to run.

10.4.9. A Storage Cannot Be Removed From a Desktop Provider

Problem: A storage cannot be removed from a desktop provider because the Remove button is disabled on the Storage tab in Oracle VDI Manager.

Solution: You must enable maintenance mode for the storage first, see Section 8.9.1, “Oracle VM VirtualBox and Microsoft Hyper-V Host Maintenance”. This enables Oracle VDI to migrate the desktops to another storage host and, if needed, to unmount the OCFS2 file systems. Once the storage is in maintenance mode, it can be removed.

If the storage is a local storage and there are multiple virtualization hosts, Oracle VDI automatically creates a local storage for each virtualization host so that the free space and number of desktops can be monitored on each host. You must enable maintenance mode for all the local storages before you can remove the local storage.

10.4.10. Virtualization Hosts Crash if a Storage is Shut Down

The problem affects VirtualBox hosts on Oracle Linux platforms, if you use either Sun ZFS storage or iSCSI storage.

If a storage host is shut down (or crashes) and the associated Oracle Cluster File System version 2 (OCFS2) file systems are still mounted on the virtualization hosts, the virtualization hosts crash.

If you need to reboot a storage host, enable maintenance mode for the storage first, see Section 8.9.2, “Storage Maintenance”. This enables Oracle VDI to unmount the OCFS2 file systems. Once the storage is in maintenance mode, it can be rebooted.

10.4.11. A Critical Alarm is Displayed When Storage is Added to a Desktop Provider

A critical alarm might be displayed in Oracle VDI Manager when you create an Oracle VM VirtualBox desktop provider or when you add storage to an existing provider and the VirtualBox hosts run on the Oracle Linux platform. On the command line, the status of the provider is shown as critical. Because the alarm takes a long time to clear, it might appear that an error has occurred.

The alarm is displayed because the configured storage is not yet ready for use. When VirtualBox hosts run on the Oracle Linux platform, Oracle VDI formats the storage using Oracle Cluster File System version 2 (OCFS2). The critical alarm is displayed for as long as it takes to format the storage. This affects Sun ZFS and iSCSI storage types only, local and network file system storage types are not affected.

10.4.12. Provider Host is Unresponsive After Updating Oracle VM VirtualBox

When you update Oracle VM VirtualBox on a host, a critical alarm might be displayed for the desktop provider because the VirtualBox host is unresponsive. This can occur because the stored configuration for the provider host is no longer accurate, for example because the SSL certificate has changed, the SSH configuration of the host has changed, or the VirtualBox user credentials have changed.

The solution is to edit the configuration of the provider host. See Section 8.8.1, “Reconfiguring an Oracle VM VirtualBox Host” for details.

10.4.13. Storage is Unresponsive After Updating Oracle VM VirtualBox

If you perform an operating system upgrade when you update Oracle VM VirtualBox on a host, a critical alarm might be displayed for the desktop provider because the storage is unresponsive. The issue affects only Sun ZFS and iSCSI storage on Oracle Linux virtualization hosts and is caused by a failure to mount the Oracle Cluster File System version 2 (OCFS2) file system.

The solution is to reload the storage configuration so that the OCFS2 file system is remounted. See Section 8.8.2, “Reloading iSCSI or Sun ZFS Storage Configuration on Oracle VM VirtualBox Hosts” for details.

10.4.14. Users Experience Blurry Text in Internet Explorer

If users experience blurry text in Internet Explorer, this might be because the area is mistakenly interpreted by Oracle VM VirtualBox as near full-screen video. This is caused by the way Internet Explorer redraws the browser window.

You can work round this issue by limiting the areas which Oracle VM VirtualBox detects and sends as video. You do this by configuring a pool property with the following command:

/opt/SUNWvda/sbin/vda pool-setprops -p limited-rca-detection=enabled PoolName

When this property is enabled, screen areas greater than 800 x 600, but smaller than full screen, are not downscaled.

10.4.15. The Time in My Oracle VM VirtualBox Desktop Is Too Slow

Windows allows random applications to change the timer frequency from the default of 100Hz (which gives very good VM performance on Oracle Solaris hosts) to an arbitrary higher value, usually 1kHz.

In general, looking at VBox.log (~/.VirtualBox/Machines/VDA/<VMNAME>/Logs/VBox.log) reliably gives the current timer resolution if one searches for the last line containing PIT: mode=... (ch=0). This works for any guest OS, as long as the number of CPUs assigned to a VM is left at the default (1). This should cover the majority of configurations used with Oracle VDI.

The typical lines are PIT: mode=2 count=0x2ead (11949) - 99.85Hz (ch=0) and PIT: mode=2 count=0x4ad (1197) - 996.81Hz (ch=0).

Assuming there is only one application which requests the high timer resolution, it can be found by terminating all running applications one by one, and watching whether the log file shows the drop in timer resolution. This shows up instantaneously.

Also, looking at the output of prstat often allows to detect which VM processes use substantially more CPU time than others. This allows reducing the number of candidates if only some VMs use 1kHz timer resolution.

Performance issues caused by the timer resolution are often dormant until the number of VMs on a VirtualBox host exceeds the number of (true) CPU cores in the server. The reason is that VirtualBox tries its best to deal with the situation, which usually keeps a full CPU core busy. When there are more such VMs they block each other, triggering a symptom which is easy to observe - time in the VM runs much slower than it should.

10.4.16. I Can See My Oracle VM VirtualBox Hosted Desktop, But It Will Not Start

In some rare circumstances a desktop may be left registered and powered off on an Oracle VM VirtualBox host. Desktops in this state for more than a couple of minutes can safely be deleted from the VirtualBox host if necessary as the configuration is stored in the Oracle VDI database and all data on a storage host. When manually unregistering a desktop from VirtualBox ensure that you also unregister the desktop's disk image.

Steps to resolve:

  1. Log in as the user you specified during the installation of VirtualBox (typically 'root').

  2. Determine the UUID of the virtual machine:

    • Execute VBoxManage list vms.

    • Or, use the Oracle VDI Manager to obtain the ZFS volume name listed in the Desktop Summary tab. The UUID is the string after the forward slash (example: f3ced2bb-d072-4efc-83c9-5a487872919d).

  3. To unregister the virtual machine on the VirtualBox host (this action does not delete the Oracle VDI desktop), execute:

    VBoxManage unregistervm uuid -delete
    
  4. To unregister the virtual disk on the VirtualBox host (this action does not delete the Oracle VDI desktop), execute:

    VBoxManage unregisterimage disk uuid
    

10.4.17. Why Are My Windows 7 Audio Drivers Not Automatically Installed?

32-bit Windows 7 does not ship with drivers for the Oracle VM VirtualBox emulated audio hardware (AC'97). However, running Windows Update should solve the problem by getting an appropriate driver for it automatically. After that update, followed by a reboot, you should have working audio.

For the 64-bit versions of Windows 7, you have to download the Realtek AC'97 drivers to enable audio.

See http://www.realtek.com.tw/downloads for download instructions.