9.3. Oracle VM VirtualBox Desktop Provider

9.3.1. Why Are My Windows 7 Audio Drivers Not Automatically Installed?
9.3.2. Oracle VM VirtualBox Install Is Failing With "Postinstall Script Did Not Complete Successfully" Errors
9.3.3. There Is an Error When I Add an Oracle VM VirtualBox Host to a Desktop Provider
9.3.4. Are all Oracle VM VirtualBox Releases Compatible With Oracle VDI?
9.3.5. I Can See My Oracle VM VirtualBox Hosted Desktop, But It Will Not Start
9.3.6. The Time in My Oracle VM VirtualBox Desktop Is Too Slow
9.3.7. What Are the Requirements for High Availability for Oracle VM VirtualBox?
9.3.8. How Do I Change the Password of the VirtualBox User?
9.3.9. Users Experience Blurry Text in Internet Explorer
9.3.10. A Critical Alert is Displayed When Storage is Added to a Desktop Provider
9.3.11. A Storage Cannot Be Removed From a Desktop Provider
9.3.12. Adding a Storage Fails With an "Unable to Stop Cluster" Error

9.3.1. 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.

9.3.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.

9.3.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 off line, use the following command to enable:

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

9.3.4. 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.

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

In some rare circumstances a desktop maybe 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>

9.3.6. 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.

9.3.7. 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.

9.3.8. How Do I Change 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.

To change the password of the VirtualBox user, you must 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.

9.3.9. 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.

9.3.10. A Critical Alert is Displayed When Storage is Added to a Desktop Provider

A critical alert 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 provider is shown as critical. Because the alert takes a long time to clear, it might appear that an error has occurred.

The alert 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 alert 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.

9.3.11. 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. 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.

9.3.12. 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