HOWTO: Linux Samba protocol negotiation failed: NT_STATUS_INSUFFICIENT_RESOURCES – SOLVED! Windows XP 2k8 Win7 Win8 Win2012

The issue is the LanmanServer service runs out of memory. We need to boost that up:

On your Windows machine, fire up regedit (Start -> regedit) modify the following registry keys:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” from 0 to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” from 1 to 3

The problem seems to manifest itself more frequently if you use your Windows box as a file server or a media server. If you can, restart the Windows box. If for some reason you can’t (e.g. your significant other is watching a video on the tv streaming from your Windows box), then you can do effectively the same by restarting the following services:

(Start -> cmd.exe) as administrator
>net stop LanmanServer /y
> net start LanmanServer
> net start Browser
> net start HomeGroupListener

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

Proxmox VE 1.8 and KVM: Adding sound to your virtual machines!

This assumes that your host machine has a sound card! 🙂

Add the args line in your /etc/qemu-server/<vm id>.conf file should give you sound:

args: -soundhw

On my Proxmox VE 1.8, I have several virtual audio devices available.   I’ve had the best luck with ac97 with Windows XP/Vista and Win7.

red:/etc/qemu-server# kvm -soundhw ‘?’
Valid sound card names (comma separated):
pcspk       PC speaker
sb16        Creative Sound Blaster 16
ac97        Intel 82801AA AC97 Audio
es1370      ENSONIQ AudioPCI ES1370
hda         Intel HD Audio

-soundhw all will enable all of the above

Share Button

How to disable the “uninstall password” to uninstall Symantec Antivirus

I was trying to install Oracle 11g client on to a WinXP box but Symantec Antivirus wouldn’t let me because it thought it was infected with over 800 viruses.  Same file was marked clean on another box.  So, I picked several of the viruses it said was infected with and looked for any evidence of them on the WinXP box.  No dice.  This led me to believe that Symantec Antivirus itself was somehow mucked up.

When I tried to uninstall Symantec Antivirus, it asked for a password.  When I put in the correct password, it refused it.  So how to uninstall it with a messed up password?  Easy..

Open up regedit (as an administrator) and change HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\AdministratorOnly\Security\UseVPUninstallPassword to “0” (zero).

I was able to uninstall and reinstall Symantec Antivirus.

Share Button

How to convert a laptop running Microsoft Windows 7 to a VirtualBox virtual machine

I was very much surprised just how easy it is to convert a Microsoft Windows 7 laptop into a virtual machine running within Sun’s VirtualBox.  This is what I did:

  • Pull the hard drive from the laptop.  On my Dell Latitude, it was simply unscrewing the two screws on the bottom of the laptop marked with the hard drive simble
  • Attach the drive to a SATA to USB connector and plug it in to your Linux box
  • If you don’t have VirtualBox installed, do so now using apt-get, rpm, or whatever you use to install software
  • Follow How to migrate existing Windows installations to VirtualBox but make sure you specify the entire drive (i.e. /dev/sdh) and not individual partitions else you will miss the hidden partitions that Vista and Windows 7 create

You should have a working Windows 7 Virtual Machine.  You’ll notice that you probably have a huge vdi file.  Let’s shrink that down:

  • Within Windows
    • download and install sdelete from Microsoft
    • download and install PowerDefragmenter
    • Run PowerDefragmenter on your c: drive (as administrator)
    • Run “sdelete -c c:” from a cmd window (as administrator)
    • shutdown windows
  • On the host
    • run “VBoxManage modifyvdi my_disk.vdi compact” replacing “my_disk.vdi” with the name of your vdi file you created earlier
    • Note that if you get a “Shrink hard disk operation is not implemented” error, then you’ve hit bug #2833 and you will want to download the latest VirtualBox to fix it.
Share Button

How to start DBArtisan when you have Sybase Openclient 15 installed

It may not be commonly known, but Embarcadero’s DBArtisan (a database management tool) will NOT work with Openclient 15.  Did you know that there is a way for you to enjoy Openclient v15 and DBArtisan?  This will allow you to retain the system wide settings for v15 of Sybase Openclient:

  • You need to install v12.5 Openclient (or just copy the %SYBASE% directory from a machine with Openclient v12.5 installed). 
  • Create a text file called DBArtisan.cmd , replacing the paths and the name of the dbartisan executable as necessary:


@echo off
set SYBASE=C:\Sybase12.5
set SYBROOT=C:\Sybase12.5
set SYBASE_JS=JS-12_5
set SYBASE_JRE=C:\sybase12.5\Shared\Sun\jre142

start "C:\Program Files\Embarcadero\DBA813" DBArt813.exe
  • Create a short cut to the DBArtisan.cmd file with the right clicking on the file and choosing "Create Shortcut"
  • If you want the shortcut to use the same icon as DBArtisan:
  • right click on the file, choose "Properties"
  • "Change Icon"
  • Replace text with "%ProgramFiles%\Embarcadero\DBA813\DBArt813.exe" or wherever your DBArtisan executable is
  • Choose the icon and hit "OK"


Share Button