LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-30-2016, 04:23 PM   #1
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Rep: Reputation: 54
Please help with qemu and pulseaudio


I want to start a qemu machine,i use this xml

Code:
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>name</name>
  <uuid>1111111111111</uuid>
  <memory unit='KiB'>2264064</memory>
  <currentMemory unit='KiB'>2264064</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.6'>hvm</type>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Opteron_G3</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback' io='threads'/>
      <source file='/var/libvirt/images/slackware.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/linux/slackware-14.2-dvd.iso'/>
      <target dev='sda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='00:00:00:00'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <input type='keyboard' bus='usb'/>
    <input type='tablet' bus='usb'/>
    <graphics type='sdl' display=':0' xauth='/home/user/.Xauthority'/>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='none'/>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.video0.driver=virtio-vga'/>
    <qemu:arg value='-display'/>
    <qemu:arg value='gtk,gl=on'/>
    <qemu:arg value='-enable-kvm'/>
    <qemu:arg value='-soundhw'/>
    <qemu:arg value='ac97,pcspk'/>
    <qemu:env name='SDL_AUDIODRIVER' value='alsa'/>
    <qemu:env name='AUDIODEV' value='hw'/>
    <qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
    <qemu:env name='QEMU_SDL_SAMPLES' value='2048'/>
  </qemu:commandline>
</domain>
But if i run it give me this error

Code:
errore: internal error: process exited while connecting to monitor: ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: Connection refused
audio: Failed to create voice `pcspk'
pcspk: Could not open voice
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: Connection refused
audio: Failed to create voice `ac97.pi'
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

alsa: Could not initialize DAC
alsa: Failed to o
Any suggestion?
If i remove soundhw works but no audio,even if i add audiocard
with virt-manager
 
Old 06-30-2016, 04:24 PM   #2
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Original Poster
Rep: Reputation: 54
I'm on slackware current/14.2
 
Old 06-30-2016, 04:26 PM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
I don't use virt manager, but I'll take a guess: Is the qemu or libvert user a member of the audio group?
 
Old 06-30-2016, 04:44 PM   #4
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Original Poster
Rep: Reputation: 54
Yes,using the qemu app pure without libvirt
works fine,audio and video.
The problem is libvirt.
 
Old 06-30-2016, 05:00 PM   #5
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 916

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by camerabambai View Post
Yes,using the qemu app pure without libvirt
works fine,audio and video.
The problem is libvirt.
In your xml, try manually removing the reference to pcspk. I don't use libvirt either and in my "pure" qemu script I have '-soundhw ac97' for audio which works fine.

chris
 
Old 07-01-2016, 12:15 PM   #6
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Original Poster
Rep: Reputation: 54
Without Libvirt works fine also for me
Fast and nice.
Solution: for this machine i use pure qemu without libvirt.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Install QEMU on ubuntu 15.04 and mange QEMU with Virt Manager LXer Syndicated Linux News 0 05-29-2015 04:41 PM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
qemu: hardware error: qemu: could not load PowerPC bios 'openbios-ppc' Skaperen Linux - Virtualization and Cloud 8 06-09-2011 07:15 AM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration