Fully operable build post

2020-05-27 Thread Chris Hoy
Hello all,

I am proud to see that I have my barebones implementation of qemu finally
working. After starting earlier this year, I have slowly made progress to
fully integrate my kernel hardware into a gpu-passthrough vm. I went
through many settings and templates from various sources and finally have
something that works for me for a start and would be really interested in
lining out my experiences. It is my observation that the documentation may
be a bit unevenly distributed on the official page as far as templates go
and so if I could help I would like to send my template through the
official forum. Any help or advice with this would be greatly appreciated.

Best Regards


[Bug 1862887] Re: qemu does not load pulseaudio modules properly

2020-02-12 Thread Chris Hoy
EDIT: This is for Arch 2020.02.01

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1862887

Title:
  qemu does not load pulseaudio modules properly

Status in QEMU:
  New

Bug description:
  Hello,

  This is on Arch-linux(latest) and the qemu 4.2.0 version made from git clone 
https://github.com/spheenik/qemu.git
  with:
   ./configure --prefix=/opt/qemu-test --python=/usr/bin/python2 
--target-list=x86_64-softmmu 
  --audio-drv-list=pa --disable-werror
  added to the build.

  I've been workin on a passthrough Windows 10 vm this month and have been 
steadily seeing some promising progress. My block/issue at the moment is 
integrating the audio now that the GPU has been succesfully passed through. 
  I've been going back and forth between the audio options for Pulseaudio and 
cannot change the following issue:
  pulseaudio: pa_context_connect() failed
  pulseaudio: Reason: Connection refused
  pulseaudio: Failed to initialize PA contextlibusb: error [udev_hotplug_event] 
ignoring udev action bind
  I leave my current operable build followed by some of the options that I have 
tried using to correct this despite the following errors not changing

  This is my current operable build:

  #!/bin/bash

  vmname="windows10vm"

  if ps -ef | grep /opt/qemu-test/bin/qemu-system-x86_64 | grep -q 
multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1

  else

  /opt/qemu-test/bin/qemu-system-x86_64 \
  -m 12G \
  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../win2.img \
  -drive file=.../Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../virtio-win-0.1.171.iso,index=2,media=cdrom \
  -boot order=dc \
  -bios /usr/share/ovmf/x64/OVMF_CODE.fd \
  -name $vmname,process=$vmname \
  -machine type=q35,accel=kvm,vmport=off \
  -cpu host,kvm=off \
  -smp 3,sockets=1,cores=3,threads=1 \
  -device virtio-balloon \
  -rtc clock=host,base=localtime \
  -vga none \
  -nographic \
  -serial none \
  -parallel none \
  -soundhw hda \
  -usb \
  -device usb-host,vendorid=...,productid=... \
  -device usb-host,vendorid=...,productid=... \
  -device usb-host,vendorid=...,productid=... \
  -device vfio-pci,host=...,multifunction=on \
  -device vfio-pci,host=... \
  -device e1000,netdev=net0 \
  -netdev user,id=net0,hostfwd=tcp::...-:22 \

  Here's a list of setting combinations I had tried to resolve this:

  #export QEMU_AUDIO_DRV=pa
  #QEMU_ALSA_DAC_BUFFER_SIZE=512 QEMU_ALSA_DAC_PERIOD_SIZE=170
  #export QEMU_PA_SAMPLES=8192 
  #export QEMU_AUDIO_TIMER_PERIOD=99
  #export QEMU_PA_SERVER=/run/user/1000/pulse/native
  #export 
QEMU_PA_SINK=alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo
  #export QEMU_PA_SOURCE=input

  -audiodev pa,id=pa1,server=server=/run/user/1000/pulse/native

  At best I have removed an XDG_RUNTIME_DIR error but other than that
  this build has no audio compatability.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1862887/+subscriptions



[Bug 1862887] [NEW] qemu does not load pulseaudio modules properly

2020-02-11 Thread Chris Hoy
Public bug reported:

Hello,

This is on Arch-linux(latest) and the qemu 4.2.0 version made from git clone 
https://github.com/spheenik/qemu.git
with:
 ./configure --prefix=/opt/qemu-test --python=/usr/bin/python2 
--target-list=x86_64-softmmu 
--audio-drv-list=pa --disable-werror
added to the build.

I've been workin on a passthrough Windows 10 vm this month and have been 
steadily seeing some promising progress. My block/issue at the moment is 
integrating the audio now that the GPU has been succesfully passed through. 
I've been going back and forth between the audio options for Pulseaudio and 
cannot change the following issue:
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextlibusb: error [udev_hotplug_event] 
ignoring udev action bind
I leave my current operable build followed by some of the options that I have 
tried using to correct this despite the following errors not changing

This is my current operable build:

#!/bin/bash

vmname="windows10vm"

if ps -ef | grep /opt/qemu-test/bin/qemu-system-x86_64 | grep -q 
multifunction=on; then
echo "A passthrough VM is already running." &
exit 1

else

/opt/qemu-test/bin/qemu-system-x86_64 \
-m 12G \
-drive id=disk0,if=virtio,cache=none,format=raw,file=.../win2.img \
-drive file=.../Win10_1909_English_x64.iso,index=1,media=cdrom \
-drive file=.../virtio-win-0.1.171.iso,index=2,media=cdrom \
-boot order=dc \
-bios /usr/share/ovmf/x64/OVMF_CODE.fd \
-name $vmname,process=$vmname \
-machine type=q35,accel=kvm,vmport=off \
-cpu host,kvm=off \
-smp 3,sockets=1,cores=3,threads=1 \
-device virtio-balloon \
-rtc clock=host,base=localtime \
-vga none \
-nographic \
-serial none \
-parallel none \
-soundhw hda \
-usb \
-device usb-host,vendorid=...,productid=... \
-device usb-host,vendorid=...,productid=... \
-device usb-host,vendorid=...,productid=... \
-device vfio-pci,host=...,multifunction=on \
-device vfio-pci,host=... \
-device e1000,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::...-:22 \

Here's a list of setting combinations I had tried to resolve this:

#export QEMU_AUDIO_DRV=pa
#QEMU_ALSA_DAC_BUFFER_SIZE=512 QEMU_ALSA_DAC_PERIOD_SIZE=170
#export QEMU_PA_SAMPLES=8192 
#export QEMU_AUDIO_TIMER_PERIOD=99
#export QEMU_PA_SERVER=/run/user/1000/pulse/native
#export 
QEMU_PA_SINK=alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo
#export QEMU_PA_SOURCE=input

-audiodev pa,id=pa1,server=server=/run/user/1000/pulse/native

At best I have removed an XDG_RUNTIME_DIR error but other than that this
build has no audio compatability.

** Affects: qemu
 Importance: Undecided
 Status: New


** Tags: builds

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1862887

Title:
  qemu does not load pulseaudio modules properly

Status in QEMU:
  New

Bug description:
  Hello,

  This is on Arch-linux(latest) and the qemu 4.2.0 version made from git clone 
https://github.com/spheenik/qemu.git
  with:
   ./configure --prefix=/opt/qemu-test --python=/usr/bin/python2 
--target-list=x86_64-softmmu 
  --audio-drv-list=pa --disable-werror
  added to the build.

  I've been workin on a passthrough Windows 10 vm this month and have been 
steadily seeing some promising progress. My block/issue at the moment is 
integrating the audio now that the GPU has been succesfully passed through. 
  I've been going back and forth between the audio options for Pulseaudio and 
cannot change the following issue:
  pulseaudio: pa_context_connect() failed
  pulseaudio: Reason: Connection refused
  pulseaudio: Failed to initialize PA contextlibusb: error [udev_hotplug_event] 
ignoring udev action bind
  I leave my current operable build followed by some of the options that I have 
tried using to correct this despite the following errors not changing

  This is my current operable build:

  #!/bin/bash

  vmname="windows10vm"

  if ps -ef | grep /opt/qemu-test/bin/qemu-system-x86_64 | grep -q 
multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1

  else

  /opt/qemu-test/bin/qemu-system-x86_64 \
  -m 12G \
  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../win2.img \
  -drive file=.../Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../virtio-win-0.1.171.iso,index=2,media=cdrom \
  -boot order=dc \
  -bios /usr/share/ovmf/x64/OVMF_CODE.fd \
  -name $vmname,process=$vmname \
  -machine type=q35,accel=kvm,vmport=off \
  -cpu host,kvm=off \
  -smp 3,sockets=1,cores=3,threads=1 \
  -device virtio-balloon \
  -rtc clock=host,base=localtime \
  -vga none \
  -nographic \
  -serial none \
  -parallel none \
  -soundhw hda \
  -usb \
  -device usb-host,vendorid=...,productid=... \
  -device usb-host,vendorid=...,productid=... \
  -device usb-host,vendorid=...,productid=... \
  -device vfio-pci,host=...,multifunction=on \
  -device vfio-pci,host=... \
  -device 

[Bug 1862110] Re: qemu in script is not parsing properly

2020-02-06 Thread Chris Hoy
** Description changed:

- Bug Report: 
+ Bug Report:
  >>qemu-system-x86_64 --version: QEMU emulator version 4.2.0
  >>Arch-linux version 2020.02.01
  I was following a tutorial on how to make a windows vm and i have encountered 
and issue in the settings of my script I have listed below.
  
  The commented code directly above the uncommented qemu instance would
  boot the Windows screen but the issue arises when I try to reach the
  same code block under the commented setting lines which takes me to the
  default SeaBIOS loader.
  
-  
  #!/bin/bash
  
  vmname="windows10vm"
  
  if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1
  
  else
  
  # use pulseaudio
  
  export QEMU_AUDIO_DRV=pa
  export QEMU_PA_SAMPLES=8192
  export QEMU_AUDIO_TIMER_PERIOD=99
  export QEMU_PA_SERVER=/run/user/1000/pulse/native
  
  cp /usr/share/ovmf/x64/OVMF_VARS.fd /tmp/my_vars.fd
  
  #qemu-system-x86_64 \
  #-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  #-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
  
  qemu-system-x86_64 \
  
  #-name $vmname,process=$vmname \
  #-machine type=q35,accel=kvm \
  #-cpu host,kvm=off \
  #-smp 4,sockets=1,cores=3,threads=1 \
  #-m 8G \
  #-balloon none \
  #-rtc clock=host,base=localtime \
  #-vga none \
  #-nographic \
  #-serial none \
  #-parallel none \
  #-soundhw hda \
  #-usb \
  #-device usb-host,vendorid=...,productid=... \
  #-device usb-host,vendorid=...,productid=... \
  #-device vfio-pci,host=...,multifunction=on \
  #-device vfio-pci,host=... \
  #-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
  #-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  #-boot order= dc \
  
  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  -drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../ISOs/virtio-0.1.171.iso,index=2,media=cdrom \
  
  #-netdev type=tap,id=net0,ifname=vmtap0,vhost=on \
  #-device virtio-net-pci,netdev=net0,mac=... \
  
  exit 0
  
  fi

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1862110

Title:
  qemu in script is not parsing properly

Status in QEMU:
  New

Bug description:
  Bug Report:
  >>qemu-system-x86_64 --version: QEMU emulator version 4.2.0
  >>Arch-linux version 2020.02.01
  I was following a tutorial on how to make a windows vm and i have encountered 
and issue in the settings of my script I have listed below.

  The commented code directly above the uncommented qemu instance would
  boot the Windows screen but the issue arises when I try to reach the
  same code block under the commented setting lines which takes me to
  the default SeaBIOS loader.

  #!/bin/bash

  vmname="windows10vm"

  if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1

  else

  # use pulseaudio

  export QEMU_AUDIO_DRV=pa
  export QEMU_PA_SAMPLES=8192
  export QEMU_AUDIO_TIMER_PERIOD=99
  export QEMU_PA_SERVER=/run/user/1000/pulse/native

  cp /usr/share/ovmf/x64/OVMF_VARS.fd /tmp/my_vars.fd

  #qemu-system-x86_64 \
  #-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  #-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \

  qemu-system-x86_64 \

  #-name $vmname,process=$vmname \
  #-machine type=q35,accel=kvm \
  #-cpu host,kvm=off \
  #-smp 4,sockets=1,cores=3,threads=1 \
  #-m 8G \
  #-balloon none \
  #-rtc clock=host,base=localtime \
  #-vga none \
  #-nographic \
  #-serial none \
  #-parallel none \
  #-soundhw hda \
  #-usb \
  #-device usb-host,vendorid=...,productid=... \
  #-device usb-host,vendorid=...,productid=... \
  #-device vfio-pci,host=...,multifunction=on \
  #-device vfio-pci,host=... \
  #-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
  #-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  #-boot order= dc \

  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  -drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../ISOs/virtio-0.1.171.iso,index=2,media=cdrom \

  #-netdev type=tap,id=net0,ifname=vmtap0,vhost=on \
  #-device virtio-net-pci,netdev=net0,mac=... \

  exit 0

  fi

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1862110/+subscriptions



[Bug 1862110] Re: qemu in script is not parsing properly

2020-02-05 Thread Chris Hoy
EDIT: The backslash under the ovmf setting was commented

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1862110

Title:
  qemu in script is not parsing properly

Status in QEMU:
  New

Bug description:
  Bug Report: 
  >>qemu-system-x86_64 --version: QEMU emulator version 4.2.0
  >>Arch-linux version 2020.02.01
  I was following a tutorial on how to make a windows vm and i have encountered 
and issue in the settings of my script I have listed below.

  The commented code directly above the uncommented qemu instance would
  boot the Windows screen but the issue arises when I try to reach the
  same code block under the commented setting lines which takes me to
  the default SeaBIOS loader.

   
  #!/bin/bash

  vmname="windows10vm"

  if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1

  else

  # use pulseaudio

  export QEMU_AUDIO_DRV=pa
  export QEMU_PA_SAMPLES=8192
  export QEMU_AUDIO_TIMER_PERIOD=99
  export QEMU_PA_SERVER=/run/user/1000/pulse/native

  cp /usr/share/ovmf/x64/OVMF_VARS.fd /tmp/my_vars.fd

  #qemu-system-x86_64 \
  #-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  #-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \

  qemu-system-x86_64 \

  #-name $vmname,process=$vmname \
  #-machine type=q35,accel=kvm \
  #-cpu host,kvm=off \
  #-smp 4,sockets=1,cores=3,threads=1 \
  #-m 8G \
  #-balloon none \
  #-rtc clock=host,base=localtime \
  #-vga none \
  #-nographic \
  #-serial none \
  #-parallel none \
  #-soundhw hda \
  #-usb \
  #-device usb-host,vendorid=...,productid=... \
  #-device usb-host,vendorid=...,productid=... \
  #-device vfio-pci,host=...,multifunction=on \
  #-device vfio-pci,host=... \
  #-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
  #-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  #-boot order= dc \

  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  -drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../ISOs/virtio-0.1.171.iso,index=2,media=cdrom \

  #-netdev type=tap,id=net0,ifname=vmtap0,vhost=on \
  #-device virtio-net-pci,netdev=net0,mac=... \

  exit 0

  fi

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1862110/+subscriptions



[Bug 1862110] [NEW] qemu in script is not parsing properly

2020-02-05 Thread Chris Hoy
Public bug reported:

Bug Report: 
>>qemu-system-x86_64 --version: QEMU emulator version 4.2.0
>>Arch-linux version 2020.02.01
I was following a tutorial on how to make a windows vm and i have encountered 
and issue in the settings of my script I have listed below.

The commented code directly above the uncommented qemu instance would
boot the Windows screen but the issue arises when I try to reach the
same code block under the commented setting lines which takes me to the
default SeaBIOS loader.

 
#!/bin/bash

vmname="windows10vm"

if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then
echo "A passthrough VM is already running." &
exit 1

else

# use pulseaudio

export QEMU_AUDIO_DRV=pa
export QEMU_PA_SAMPLES=8192
export QEMU_AUDIO_TIMER_PERIOD=99
export QEMU_PA_SERVER=/run/user/1000/pulse/native

cp /usr/share/ovmf/x64/OVMF_VARS.fd /tmp/my_vars.fd

#qemu-system-x86_64 \
#-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
#-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \

qemu-system-x86_64 \

#-name $vmname,process=$vmname \
#-machine type=q35,accel=kvm \
#-cpu host,kvm=off \
#-smp 4,sockets=1,cores=3,threads=1 \
#-m 8G \
#-balloon none \
#-rtc clock=host,base=localtime \
#-vga none \
#-nographic \
#-serial none \
#-parallel none \
#-soundhw hda \
#-usb \
#-device usb-host,vendorid=...,productid=... \
#-device usb-host,vendorid=...,productid=... \
#-device vfio-pci,host=...,multifunction=on \
#-device vfio-pci,host=... \
#-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
#-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
#-boot order= dc \

-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
-drive file=.../ISOs/virtio-0.1.171.iso,index=2,media=cdrom \

#-netdev type=tap,id=net0,ifname=vmtap0,vhost=on \
#-device virtio-net-pci,netdev=net0,mac=... \

exit 0

fi

** Affects: qemu
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1862110

Title:
  qemu in script is not parsing properly

Status in QEMU:
  New

Bug description:
  Bug Report: 
  >>qemu-system-x86_64 --version: QEMU emulator version 4.2.0
  >>Arch-linux version 2020.02.01
  I was following a tutorial on how to make a windows vm and i have encountered 
and issue in the settings of my script I have listed below.

  The commented code directly above the uncommented qemu instance would
  boot the Windows screen but the issue arises when I try to reach the
  same code block under the commented setting lines which takes me to
  the default SeaBIOS loader.

   
  #!/bin/bash

  vmname="windows10vm"

  if ps -ef | grep qemu-system-x86_64 | grep -q multifunction=on; then
  echo "A passthrough VM is already running." &
  exit 1

  else

  # use pulseaudio

  export QEMU_AUDIO_DRV=pa
  export QEMU_PA_SAMPLES=8192
  export QEMU_AUDIO_TIMER_PERIOD=99
  export QEMU_PA_SERVER=/run/user/1000/pulse/native

  cp /usr/share/ovmf/x64/OVMF_VARS.fd /tmp/my_vars.fd

  #qemu-system-x86_64 \
  #-drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  #-drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \

  qemu-system-x86_64 \

  #-name $vmname,process=$vmname \
  #-machine type=q35,accel=kvm \
  #-cpu host,kvm=off \
  #-smp 4,sockets=1,cores=3,threads=1 \
  #-m 8G \
  #-balloon none \
  #-rtc clock=host,base=localtime \
  #-vga none \
  #-nographic \
  #-serial none \
  #-parallel none \
  #-soundhw hda \
  #-usb \
  #-device usb-host,vendorid=...,productid=... \
  #-device usb-host,vendorid=...,productid=... \
  #-device vfio-pci,host=...,multifunction=on \
  #-device vfio-pci,host=... \
  #-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_VARS.fd \
  #-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  #-boot order= dc \

  -drive id=disk0,if=virtio,cache=none,format=raw,file=.../IMGs/win.img \
  -drive file=.../ISOs/Win10_1909_English_x64.iso,index=1,media=cdrom \
  -drive file=.../ISOs/virtio-0.1.171.iso,index=2,media=cdrom \

  #-netdev type=tap,id=net0,ifname=vmtap0,vhost=on \
  #-device virtio-net-pci,netdev=net0,mac=... \

  exit 0

  fi

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1862110/+subscriptions