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>
    </graphics>
    <video>
      <model type='qxl' vram='65536' heads='1'>
        <acceleration accel3d='yes' accel2d='yes'></acceleration>
      </model>
    </video>

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

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

Playing videos on the XBox 360 through Media Center (My Movies) stored on an Ubuntu Samba Share (linux)

We watch movies and TV shows upstairs primarily streamed from a Windows 7 Media Center machine through an XBox 360.  When I we ran out of room on the Drobo, I moved the movies to an Ubuntu Server 12.04.1 (Linux) stored on a RAID5 array (samba share).

Since I’m using My Movies for media management, I updated the MYMOVIES database (SQL Server 2005) with the new location.  I used the host name of the Ubuntu server.  After verifying that the guest user on the Ubuntu server was set up correctly in the /etc/samba/smb.conf, I was able to watch the videos in local playback via Media Center. 

[Multimedia]
   path = /mnt/multimedia
   read only = no
   guest ok = yes
   writable = yes
   create mask = 0665
   directory mask = 0775
   write list = jason,tv
   read list = jason,tv,guest

What did not work was the XBox 360.

After a bit of trial and error, I was able to determine that the XBox 360 didn’t quite like the netbios broadcast from the Ubuntu server (samba).  Making it use a static ip made it work when I updated the nvcLocation from “ultra” to “192.168.0.133” in the tblDiscs table (MYMOVIES database).  It should be noted direct manipulation of the tables is unsupported by the My Movies software but it worked just fine.

update dbo.tblDiscs set nvcLocation = replace(nvcLocation, 'Ultra', '192.168.0.133')
Share Button

Get it here! Perl DBD::Sybase 1.09.01 for Active State Perl 5.10 and 5.8 on Windows XP/Vista/7 32bit

Assuming that you installed Sybase OpenClient 15.5 from the 15.5 PC Client:

Install ActiveState Perl from http://www.activestate.com (free) and install DBI if it isn’t already installed.  It should be but you never know…

  1. Start -> ActiveState Perl -> Perl Package Manager
  2. install DBI
  3. exit

Now, the easy part.  Install the DBD::Sybase 1.09.01 PPM:

  1. download DBD::Sybase 1.09.01 PPM
  2. extract zip file to temporary directory (e.g. c:\test)
  3. Start -> Run -> cmd.exe (as Administrator if Vista or Windows 7)
  4. cd \test
  5. ppm install DBD-Sybase.ppd
  6. exit

That’s it 🙂

It should automatically install the DBD::Sybase for Perl 5.8 or 5.10 depending on which version of Active State Perl you have installed.

Share Button

Get it here! Perl DBD::Sybase 1.09 for Active State Perl 5.10 on Windows XP/Vista/7 32bit

Assuming that you installed Sybase OpenClient 15.5 from the 15.5 PC Client:

Install ActiveState Perl from http://www.activestate.com (free) and install DBI if it isn’t already installed.  It should be but you never know…

  1. Start -> ActiveState Perl -> Perl Package Manager
  2. install DBI
  3. exit

Now, the easy part.  Install the DBD::Sybase 1.09 PPM:

  1. download DBD::Sybase 1.09 PPM
  2. extract zip file to temporary directory (e.g. c:\test)
  3. Start -> Run -> cmd.exe (as Administrator if Vista or Windows 7)
  4. cd \test
  5. ppm install DBD-Sybase.ppd
  6. exit

That’s it :)

Sybase

Share Button