Issues starting VM's in KVM. - blkio device weight is valid only for bfq or cfq scheduler

EDIT by Patrick:

See KVM troubleshooting: Request operation not valid: blkio device weight is valid only for bfq or cfq scheduler


Original post:

I’m new to KVM and I was trying to set it up. After following the instructions, I get this error message. I did extract the qcow images on an external drive since my host machine doesn’t have much space. Not sure if that would effect anything since I moved them as in the instructions for KVM. Any idea?

Error starting domain: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1279, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1234, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

https://www.oilandfish.com/posts/practical-anonymity-political-religious-dissidents.html#10-7

EDIT by Patrick:
https://web.archive.org/web/20221219151033/https://www.oilandfish.com/posts/practical-anonymity-political-religious-dissidents.html#10-7

1 Like

Thank you! This may be a dumb question, but what is the command to edit the xml files? Everything I’ve tried just shows the file as empty and no lines to remove. I tried sudo edit /etc/apt/Whonix-Gateway-XFCE-15.0.1.3.9.xml for example.

sudo virsh edit Whonix-Workstation

or Whonix-Gateway

Srarting Whonix-Gateway or Whonix-Workstation VMs produces the following error.:

Error starting domain: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 111, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/libvirtobject.py”, line 66, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/domain.py”, line 1279, in startup
self._backend.create()
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1234, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirt.libvirtError: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

Following these steps seems to fix the issue.
Notice that ParrotOS is a Debian-based distribution.Does the documentation need updating or is this in fact a bug?

Is parrot on stable or testing? I guess we’ll soon find out if this is a problem on 11 and I will just have to throw this setting out, but I’d rather not because it provides resource restrictions against DoS attacks.

ParrotOS is based on Testing. Can you share your sources about Dos attacks?

Don’t have it on hand, but by the rationale of putting 2 and 2 together, limiting a common resource on a machine (whether RAM, CPU or iops in this case) would limit potential for abuse by a compromised VM and also help security by not affecting other processes in visible ways - which can act as a sidechannel.

I see.Maybe setting and flags might he4lp the issue.As mentioned here and here.

Ok. If I run into this problem on Bullseye I will remove it.

1 Like

4 posts were split to a new topic: Tor Browser Globe Icon Missing

3 posts were split to a new topic: RIP: 0010:switch_mm_irqs_off+0x2a5/0x4f0

Hello I installed KVM Whonix on a new machine and for some reason I can’t edit the files using virsh. It won’t let me remove the lines so I can start the vms. Any idea why? My host is Kali.

Are you starting the virsh command with sudo/su? It needs privileges to work.

What error do you see when you save the modified file? Maybe you forget to save it and so it doesn’t take effect? I need more details.

1 Like

Tried to install in KVM VirtManager. imported .xml files and it’s all in the images folder. Got this error trying to start Gateway:

Error starting domain: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 111, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/libvirtobject.py”, line 66, in newfn
ret = fn(self, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/object/domain.py”, line 1279, in startup
self._backend.create()
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1234, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirt.libvirtError: Requested operation is not valid: blkio device weight is valid only for bfq or cfq scheduler

See KVM troubleshooting: Request operation not valid: blkio device weight is valid only for bfq or cfq scheduler