VMware Horizon Client Disconnects Immediately After Connecting: HccChannelPlugin::ChannelAddRef: No shared memory channel

Recently I’ve needed to connect to a virtual desktop using VMware Horizon Client. Immediately after connecting, I received the error message:

ERROR (1FD0-19D0) <6608> [vmware-remotemks] HccChannelPlugin::ChannelAddRef: No shared memory channel. Horizon client service may be down.
FATAL (1FD0-1E14) <vmware-usbd> [vmware-remotemks] GOT DEP ACCESS VIOLATION

After much research and try & error, I was able to determine that VMWare Horizon Client requires up to 4GB of RAM for physical machines and 5GB of RAM for virtualized Windows 7, 8.1, 10 systems (VirtualBox, VMWare Workstation).

Share Button

HOWTO: Enable 3D Acceleration in VMWare Player/Workstation in Ubuntu Linux 15.04 with Intel Graphics SOLVED

When youVMware start a virtual machine using VMWare Workstation or Player and receive a warning saying 3D Acceleration is not available, you can easily enable it. All you need to do is add a single line to the .vmx file (e.g. “Fedora Linux.vmx”):

mks.gl.allowBlacklistedDrivers = "TRUE"
Share Button

How to patch your VMware ESXi 5x server for free using esxicli command line

First, download the current patch from VMware. VMwareIn my case, it was ESXi550-201312001 that I downloaded from Download Patches page. You will need to have a valid VMware login but you don’t have to pay for a support contract 🙂

Copy the downloaded zip file to your ESXi server. I put it in /vmfs/volumes/52f573f2-d2dddb9e-e83a-001b213a7c46/Patches/ESXi550-201312001.zip but you can put it anywhere on your server. How to transfer it? Either temporarily enable ssh on the server and use winscp or scp.

Log into the console (I enabled ssh on the server) and issue the following command:

esxcli software vib update -d *where ever you put it*/ESXi550-201312001.zip
Share Button

Sybase SQL Server for Linux – still going strong

Last night I helped a friend at a small company install, configure and tune Sybase SQL Server for Linux using the same method as I used on HOWTO: INSTALLING AND RUNNING SAP / SYBASE SQL SERVER ESD 6 ON UBUNTU LINUX USING KVM. No, I didn’t provide the software, they already had it.

There is something refreshing going to sybinit using ctrl-a to go to the next screen.  No X-Windows needed.  No Java.  Just a simple DBMS doing DBMS work. 

Share Button

HOWTO: Installing and running SAP / Sybase SQL Server esd 6 on Ubuntu Linux using KVM

You can run KVM on just about any modern Linux distribution provided that your host is capable of providing virtualization. The folks over at HowtoForge go through the steps for Ubuntu 12.10.

What you will need for the KVM virtual machine:

  • Ubuntu Server 6.06.2 for Intel x86
  • Sybase SQL Server esd 6 for Linux 32bit (if anyone knows of a location to legally download these let me know)

I used virt-viewer to create the virtual machine but you can create the xml file yourself if you want to. Make sure you specify:

  • Disk bus: IDE using native threads and no caching
  • 1GB of RAM or more
  • VNC or Spice display

my Sybase_11033.xml file:

<domain type='kvm'>
  <description>Sybase SQL Server on Ubuntu 6.06.02 (Dapper Drake)</description>
  <memory unit='KiB'>1048576</memory>
  <currentmemory unit='KiB'>1048576</currentmemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='pc-1.2'>hvm</type>
    <boot dev='hd'></boot>
  <clock offset='utc'></clock>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='threads'></driver>
      <source file='/var/lib/libvirt/images/Sybase_11033.img'/>
      <target dev='hda' bus='ide'></target>
      <address type='drive' controller='0' bus='0' target='0' unit='0'></address>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'></driver>
      <source file='/home/jason/iso/ubuntu-6.06.2-server-i386.iso'/>
      <target dev='hdb' bus='ide'></target>
      <address type='drive' controller='0' bus='0' target='0' unit='1'></address>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'></address>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'></address>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'></address>
    <interface type='bridge'>
      <mac address='52:54:00:59:e1:78'></mac>
      <source bridge='br0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'></address>
    <serial type='pty'>
      <target port='0'></target>
    <console type='pty'>
      <target type='serial' port='0'></target>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'></target>
      <address type='virtio-serial' controller='0' bus='0' port='1'></address>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'></graphics>
      <model type='qxl' vram='65536' heads='1'></model>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'></address>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'></address>

Go through the install of Ubuntu Server 6.06.2. After it is completed, you will need to modify a few files:

Replace /etc/apt/sources.list with:

deb http://old-releases.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install alien

Modify /boot/grub/menu.lst adding elevator=deadline:

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
 defoptions=quiet splash elevator=deadline

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title		Ubuntu, kernel 2.6.15-51-server
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-51-server root=/dev/hda1 ro quiet splash elevator=deadline
initrd		/boot/initrd.img-2.6.15-51-server

Modify /etc/fstab to increase the size of tmpfs and to set noatime,nodiratime:

/dev/hda1       /               ext3    rw,async,noatime,nodiratime,errors=remount-ro 0       1
tmpfs		/dev/shm        tmpfs   size=900M   0 0

Modify /etc/sysctl.conf to set up the shared memory and virtual memory settings:


OPTIONAL: Install samba and winbind so you want to connect to your vm by name but don’t want to set up dns:

sudo apt-get install samba winbind

Modify /etc/nsswitch.conf:

# /etc/nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns mdns wins
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

OPTIONAL (needed for samba/winbind) Modify /etc/samba/smb.conf:

# add netbios name
netbios name = sybase-11033
# modify name resolve order
   name resolve order = bcast lmhosts host wins


Convert the Sybase RPMs to debian packages (dpkg):

sudo alien -d *.rpm

Install Sybase SQL Server:

sudo dpkg -i *.deb

This will install the software into /opt/sybase.

Add a sybase os user and change the owner of /opt/sybase to the sybase user:

sudo adduser --home /opt/sybase --shell /bin/bash --no-create-home sybase
sudo chown -R sybase:sybase /opt/sybase

I created a /opt/sybase/.bash_profile script but you can also put this in /etc/profile if you wish:

export SYBASE=/opt/sybase

export SYBPLATFORM=linux
export LC_ALL=default
unset LANG

export PATH=$SYBASE/bin:$PATH

Start the Sybase configuration by running as the sybase user:


I would recommend a 100MB or larger master device and sybsystemprocs device for It will install just fine but if you try to start Sybase with more the 32MB of memory, it will fail. If you want to increase it you need to do two things:

  1. Increase max shared memory (kernel.shmmax and kernel.shmall) in /etc/sysctl.conf – which we already did
  2. Set the stack size to unlimited

Setting the stack size to unlimited is easy so in your RUN_server file:

# Adaptive Server Information:
#  name:                          SYBASE_11033
#  master device:                 /opt/sybase/master.dat
#  master device size:            76800
#  errorlog:                      /opt/sybase/install/errorlog
#  interfaces:                    /opt/sybase

ulimit -s unlimited

/opt/sybase/bin/dataserver -d/opt/sybase/master.dat -sSYBASE_11033 \
-e/opt/sybase/install/errorlog -i/opt/sybase -c/opt/sybase/SYBASE_11033.cfg 

Since this is SQL Server, we don’t have to mess with LD_POINTER_GUARD.

Screenshot from 2013-03-10 16:05:31

Why you would use such an old DBMS version? You might have software that requires this version and the software vendor went out of business or discontinued the software with no upgrade path. In any case, Sybase’s SQL Server is still useful.

Share Button

HowTo: Windows 7 32bit AND 64bit Sound with KVM / libvirt and the Spice client

UPDATE: Fixed and signed qxl video drivers

Hi all,

Yesterday I promised to post how I was able to get sound working with KVM / libvirt and the Spice client with Windows 7 32bit and 64bit. Here you go 🙂

First, get your spice client set up wherever you are going to run virt-manager.

On the server, I’m going to assume you set up kvm / libvirt already.

Install the spice server packages:

sudo apt-get update
sudo apt-get install qemu-kvm-extras qemu-kvm-spice kvm kvm-ipxe qemu-user

Modify /etc/libvirtd/qemu.conf to run the QEMU processes under the libvirtd group. You did add your user to the libvirtd group right? 😉

# The group ID for QEMU processes run by the system instance.
group = "libvirtd"

Reboot your server.

Create a new Windows 7 virtual machine but we will need to customize the settings:
Screenshot from 2013-02-10 14:19:07

Choose Spice as the Display adaptor:
Screenshot from 2013-02-10 14:21:04

Change Video hardware to QXL:
Screenshot from 2013-02-10 14:22:51

For sound, choose the appropriate hardware:

  • Windows 7 (32bit): ac97
  • Windows 7 (64bit): ich6
  • Windows Server 2008: ich6
  • Windows Vista (64bit): ich6
  • Windows Vista (32bit): ac97
  • Windows XP (32bit) ac97

For the hard disk and network cards, choose libvirt. You will need to download the libvirt iso image from Fedora. When you get to the point of choosing a drive to install Windows 7 onto, you will need to insert the image using virt-manager
Screenshot from 2013-02-10 14:34:06
Screenshot from 2013-02-10 14:36:00
When it finds the libvirt drivers, choose the one for Windows 7 32bit or 64bit as appropriate. Reinsert the Windows 7 image into virt-manager.

Log into your server and change the xml for your virtual machine replacing the graphics and video sections.

$ virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit
virsh # edit Win7-test
<graphics type='spice' autoport='yes'>
      <image compression='auto_glz'></image>
      <streaming mode='filter'></streaming>
      <mouse mode='client'></mouse>
      <clipboard copypaste='yes'></clipboard>
      <model type='qxl' vram='65536' heads='1'>
        <acceleration accel3d='yes' accel2d='yes'></acceleration>

After installing Windows, open up device manager (right click on my computer -> Properties -> Hardware -> Device Manager). Right click on any devices that are found and don’t have device drivers installed (yellow exclamation mark on them) and update the drivers. Choose the drivers on the libvirt iso image.

Okay. Almost done. If you try to play any audio, it will play but you won’t hear anything. Why? It seems that the QXL video driver is needed for sound to play remotely on the Spice client.

I’ve had trouble with the WIN32 QXL driver qxl_unstable.zip starting correctly in Windows XP and Vista although I haven’t had a problem with Windows 7 (32bit). With Windows 7 64bit, no binary drivers are provided. I can only suspect that because Windows 7 64bit requires properly signed drivers, the developers opted not to manage the signing themselves. So, I built the drivers for Windows XP (32bit), Windows 2008 (64bit), Windows 7 (32bit) and Windows 7 (64bit) yesterday.

QXL Drivers for Windows XP (32bit), Windows 2008 (64bit), Windows 7 (32bit) and Windows 7 (64bit)qxl video drivers

Right click on “SpiceTestCert.cer” and install it to accept the driver. Next update the VGA driver with the corresponding driver.

Note that since these were signed by me and not an actual company, you may need to force Windows 7 (64bit) to allow the driver to be loaded. See Installing Unsigned Drivers in Windows 7 by Trish Perry for three different methods. When you restart the vm, you should now hear sound if you’re using Spice.

The same method will work for Windows XP, Windows Vista and Windows Server 2008. I haven’t tried with Windows 8 yet.

Share Button

HowTo: Getting the Spice client up and working on Ubuntu 12.10 with libvirt / virt-manager

Unfortunately, when you install the Spice client on Ubuntu 12.x, it doesn’t include everything you need to get it to workUbuntu

sudo apt-get update
sudo apt-get install spice-client-gtk qemu-kvm-spice python-spice-client-gtk

If you’re up to date on your 12.10 patches, you shouldn’t need to modify the libvirt-qemu file for Apparmor but if you have troubles, add it in to /etc/apparmor.d/abstractions/libvirt-qemu:

/usr/bin/qemu-system-i386-spice rmix,
/usr/bin/qemu-system-x86_64-spice rmix,
/run/shm/spice.* rwixm,
/run/shm rw,

As I’m running virt-manager on my laptop and connecting to a server, I created an ssh key so I don’t have to add my password over and over again. See ssh-keygen.

Adding a remote server to virt-manager is very easy. File -> Add Connection
Screenshot from 2013-02-10 13:56:27

Share Button

Tomorrow: Howto Windows 7 32bit AND 64bit Sound with KVM / libvirt and the Spice client

Finally got sound working in a Windows 7 64bit KVM virtual machine with Spice. There are a few conditions for it to work:

  1. ICH6 audio
  2. Spice guest drivers installed NOT VNC
  3. QXL video
  4. QXL driver (64bit)

Since I’m using Windows 7 Enterprise 64bit, I had to build and digitally sign the driver. Not difficult at all but PITA. I’ll write a howto blog post tomorrow.

Share Button

Cat a number of files and want to know which file it is working on?

In the following example, I have 21 files that came from a raw partition that I split at 10GB intervals. I am piping that to parallel bzip2 (pbzip2) and writing it to a raw partition (logical volume).

cat /mnt/DBADEV1/DBADEV1.disk.bz2.00 /mnt/DBADEV1/DBADEV1.disk.bz2.01 \
/mnt/DBADEV1/DBADEV1.disk.bz2.02 /mnt/DBADEV1/DBADEV1.disk.bz2.03 \
/mnt/DBADEV1/DBADEV1.disk.bz2.04 /mnt/DBADEV1/DBADEV1.disk.bz2.05 \
/mnt/DBADEV1/DBADEV1.disk.bz2.06 /mnt/DBADEV1/DBADEV1.disk.bz2.07 \
/mnt/DBADEV1/DBADEV1.disk.bz2.08 /mnt/DBADEV1/DBADEV1.disk.bz2.09 \
/mnt/DBADEV1/DBADEV1.disk.bz2.10 /mnt/DBADEV1/DBADEV1.disk.bz2.11 \
/mnt/DBADEV1/DBADEV1.disk.bz2.12 /mnt/DBADEV1/DBADEV1.disk.bz2.13 \
/mnt/DBADEV1/DBADEV1.disk.bz2.14 /mnt/DBADEV1/DBADEV1.disk.bz2.15 \
/mnt/DBADEV1/DBADEV1.disk.bz2.16 /mnt/DBADEV1/DBADEV1.disk.bz2.17 \
/mnt/DBADEV1/DBADEV1.disk.bz2.18 /mnt/DBADEV1/DBADEV1.disk.bz2.19 \
/mnt/DBADEV1/DBADEV1.disk.bz2.20 | pbzip2 -dcv -p4 > /dev/mapper/VG_VMH1-LV_DBADEV1


Parallel BZIP2 v1.0.5 - by: Jeff Gilchrist [http://compression.ca]
[Jan. 08, 2009]  (uses libbzip2 by Julian Seward)

         # CPUs: 4
         File #: 1 of 1
     Input Name: 
    Output Name: 

 BWT Block Size: 900k
Decompressing data (no threads)...

This will take a while, so let’s determine which file it is currently working on:

lsof|grep DBADEV1
cat 24137 root 3r REG 8,1 10737418240 80 /mnt/DBADEV1/DBADEV1.disk.bz2.07

Oh boy, it’s only on file #8. oh well, we can watch it a little easier with the “watch” command set to run the lsof command every 5 seconds:

watch -n5 'lsof|grep DBADEV1'
Share Button

Libvirt/KVM best practices

For those of you that are thinking about using using libvirt/kvm on Linux… here is a discussion on proposed best practices

Share Button