* [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file
@ 2016-12-21 17:11 Weiwei Jia
2016-12-21 17:19 ` Weiwei Jia
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Weiwei Jia @ 2016-12-21 17:11 UTC (permalink / raw)
To: libvir-list; +Cc: eblake, qemu-devel, Stefan Hajnoczi
Hi,
I cannot add iothreads
(https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
the libvirt xml configuration file. Once I add
"<iothreads>4</iothreads>" and other related config for IOthreads into
the libvirt xml configuration file with virsh command and save it,
these iothreads related configuration will disappear after I open
libvirt xml configuration file again for double-check.
The current libvirt xml configuration file is like following.
# virsh dumpxml kvm1
<domain type='kvm'>
<name>kvm1</name>
<uuid>20811918-9057-4496-aa03-0fe9d1bcaf78</uuid>
<memory unit='KiB'>8194304</memory>
<currentMemory unit='KiB'>8194304</currentMemory>
<vcpu placement='static'>6</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<vcpupin vcpu='2' cpuset='2'/>
<vcpupin vcpu='3' cpuset='3'/>
<vcpupin vcpu='4' cpuset='4'/>
<vcpupin vcpu='5' cpuset='5'/>
<emulatorpin cpuset='12-15'/>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source file='/var/lib/libvirt/images/kvm1.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' 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='scsi' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</controller>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:a7:67:eb'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
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'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>
I want to config above xml file to be like following but once I save
it, the iothreads related configuration will disappear (like above)
after I re-open the libvirt xml for double-check.
<domain type='kvm' id='1'
xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>kvm1</name>
<memory unit='KiB'>8194304</memory>
<currentMemory unit='KiB'>8194304</currentMemory>
<vcpu placement='static'>6</vcpu>
<iothreads>4</iothreads>
<iothreadids>
<iothread id="2"/>
<iothread id="4"/>
<iothread id="6"/>
<iothread id="8"/>
</iothreadids>
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<vcpupin vcpu='2' cpuset='2'/>
<vcpupin vcpu='3' cpuset='3'/>
<vcpupin vcpu='4' cpuset='4'/>
<vcpupin vcpu='5' cpuset='5'/>
<emulatorpin cpuset="12-15"/>
<iothreadpin iothread="2" cpuset="7"/>
<iothreadpin iothread="4" cpuset="8"/>
<iothreadpin iothread="6" cpuset="9"/>
<iothreadpin iothread="8" cpuset="10"/>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native' iothread='2-8'/>
<source file='/home/wj47/ssd1/kvm1.img'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='scsi' index='0'>
<alias name='scsi0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='network'>
<source network='default'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/11'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/11'>
<source path='/dev/pts/11'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>
Another concern is like this: can I config 4 dedicated IOthreads for
one drive. Just like above, I want to start 4 IOthreads for
virtio-disk0. If true, is my config like above correct? Thank you.
Best,
Weiwei Jia
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file
2016-12-21 17:11 [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file Weiwei Jia
@ 2016-12-21 17:19 ` Weiwei Jia
2016-12-22 9:33 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2016-12-22 22:01 ` John Ferlan
2 siblings, 0 replies; 6+ messages in thread
From: Weiwei Jia @ 2016-12-21 17:19 UTC (permalink / raw)
To: libvir-list; +Cc: eblake, qemu-devel, Stefan Hajnoczi
Sorry to add my libvirt and qemu version.
Libvirt version: 2.4.0
QEMU version: 2.3.0
Thanks,
Weiwei Jia
On Wed, Dec 21, 2016 at 12:11 PM, Weiwei Jia <harrynjit@gmail.com> wrote:
> Hi,
>
> I cannot add iothreads
> (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
> the libvirt xml configuration file. Once I add
> "<iothreads>4</iothreads>" and other related config for IOthreads into
> the libvirt xml configuration file with virsh command and save it,
> these iothreads related configuration will disappear after I open
> libvirt xml configuration file again for double-check.
>
> The current libvirt xml configuration file is like following.
>
> # virsh dumpxml kvm1
> <domain type='kvm'>
> <name>kvm1</name>
> <uuid>20811918-9057-4496-aa03-0fe9d1bcaf78</uuid>
> <memory unit='KiB'>8194304</memory>
> <currentMemory unit='KiB'>8194304</currentMemory>
> <vcpu placement='static'>6</vcpu>
> <cputune>
> <vcpupin vcpu='0' cpuset='0'/>
> <vcpupin vcpu='1' cpuset='1'/>
> <vcpupin vcpu='2' cpuset='2'/>
> <vcpupin vcpu='3' cpuset='3'/>
> <vcpupin vcpu='4' cpuset='4'/>
> <vcpupin vcpu='5' cpuset='5'/>
> <emulatorpin cpuset='12-15'/>
> </cputune>
> <resource>
> <partition>/machine</partition>
> </resource>
> <os>
> <type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <emulator>/usr/bin/kvm-spice</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='none' io='native'/>
> <source file='/var/lib/libvirt/images/kvm1.img'/>
> <target dev='vda' bus='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
> </disk>
> <disk type='block' device='cdrom'>
> <driver name='qemu' type='raw'/>
> <target dev='hdc' bus='ide'/>
> <readonly/>
> <address type='drive' controller='0' bus='1' 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='scsi' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
> </controller>
> <controller type='ide' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
> </controller>
> <interface type='network'>
> <mac address='52:54:00:a7:67:eb'/>
> <source network='default'/>
> <model type='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> 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'/>
> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
> <listen type='address' address='127.0.0.1'/>
> </graphics>
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
> </video>
> <memballoon model='virtio'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
> </memballoon>
> </devices>
> <seclabel type='none'/>
> </domain>
>
>
>
>
>
> I want to config above xml file to be like following but once I save
> it, the iothreads related configuration will disappear (like above)
> after I re-open the libvirt xml for double-check.
>
> <domain type='kvm' id='1'
> xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> <name>kvm1</name>
> <memory unit='KiB'>8194304</memory>
> <currentMemory unit='KiB'>8194304</currentMemory>
> <vcpu placement='static'>6</vcpu>
> <iothreads>4</iothreads>
> <iothreadids>
> <iothread id="2"/>
> <iothread id="4"/>
> <iothread id="6"/>
> <iothread id="8"/>
> </iothreadids>
> <cputune>
> <vcpupin vcpu='0' cpuset='0'/>
> <vcpupin vcpu='1' cpuset='1'/>
> <vcpupin vcpu='2' cpuset='2'/>
> <vcpupin vcpu='3' cpuset='3'/>
> <vcpupin vcpu='4' cpuset='4'/>
> <vcpupin vcpu='5' cpuset='5'/>
> <emulatorpin cpuset="12-15"/>
> <iothreadpin iothread="2" cpuset="7"/>
> <iothreadpin iothread="4" cpuset="8"/>
> <iothreadpin iothread="6" cpuset="9"/>
> <iothreadpin iothread="8" cpuset="10"/>
> </cputune>
> <resource>
> <partition>/machine</partition>
> </resource>
> <os>
> <type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <emulator>/usr/bin/kvm-spice</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='none' io='native' iothread='2-8'/>
> <source file='/home/wj47/ssd1/kvm1.img'/>
> <target dev='vda' bus='virtio'/>
> <alias name='virtio-disk0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
> </disk>
> <disk type='block' device='cdrom'>
> <driver name='qemu' type='raw'/>
> <target dev='hdc' bus='ide'/>
> <readonly/>
> <alias name='ide0-1-0'/>
> <address type='drive' controller='0' bus='1' target='0' unit='0'/>
> </disk>
> <controller type='usb' index='0'>
> <alias name='usb0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
> </controller>
> <controller type='pci' index='0' model='pci-root'>
> <alias name='pci.0'/>
> </controller>
> <controller type='scsi' index='0'>
> <alias name='scsi0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
> </controller>
> <controller type='ide' index='0'>
> <alias name='ide0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
> </controller>
> <interface type='network'>
> <source network='default'/>
> <target dev='vnet0'/>
> <model type='virtio'/>
> <alias name='net0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
> </interface>
> <serial type='pty'>
> <source path='/dev/pts/11'/>
> <target port='0'/>
> <alias name='serial0'/>
> </serial>
> <console type='pty' tty='/dev/pts/11'>
> <source path='/dev/pts/11'/>
> <target type='serial' port='0'/>
> <alias name='serial0'/>
> </console>
> <input type='mouse' bus='ps2'/>
> <input type='keyboard' bus='ps2'/>
> <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
> <listen type='address' address='127.0.0.1'/>
> </graphics>
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <alias name='video0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
> </video>
> <memballoon model='virtio'>
> <alias name='balloon0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
> </memballoon>
> </devices>
> <seclabel type='none'/>
> </domain>
>
>
>
>
>
> Another concern is like this: can I config 4 dedicated IOthreads for
> one drive. Just like above, I want to start 4 IOthreads for
> virtio-disk0. If true, is my config like above correct? Thank you.
>
> Best,
> Weiwei Jia
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [libvirt] Cannot add iothreads label in libvirt xml configuration file
2016-12-21 17:11 [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file Weiwei Jia
2016-12-21 17:19 ` Weiwei Jia
@ 2016-12-22 9:33 ` Daniel P. Berrange
2016-12-22 19:55 ` Weiwei Jia
2016-12-22 22:01 ` John Ferlan
2 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2016-12-22 9:33 UTC (permalink / raw)
To: Weiwei Jia; +Cc: libvir-list, qemu-devel
On Wed, Dec 21, 2016 at 12:11:51PM -0500, Weiwei Jia wrote:
> Hi,
>
> I cannot add iothreads
> (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
> the libvirt xml configuration file. Once I add
> "<iothreads>4</iothreads>" and other related config for IOthreads into
> the libvirt xml configuration file with virsh command and save it,
> these iothreads related configuration will disappear after I open
> libvirt xml configuration file again for double-check.
If XML disappears after saving it, this usually indicates that either you
made a mistake and used the wrong XML element or in the wrong place, or
that your libvirt version is too old to support it. You can use the
virt-xml-validate too to verify your XML file against the schema for
your installed version of libvirt, which will report any errrors.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [libvirt] Cannot add iothreads label in libvirt xml configuration file
2016-12-22 9:33 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
@ 2016-12-22 19:55 ` Weiwei Jia
0 siblings, 0 replies; 6+ messages in thread
From: Weiwei Jia @ 2016-12-22 19:55 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: libvir-list, qemu-devel
On Thu, Dec 22, 2016 at 4:33 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Wed, Dec 21, 2016 at 12:11:51PM -0500, Weiwei Jia wrote:
>> Hi,
>>
>> I cannot add iothreads
>> (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
>> the libvirt xml configuration file. Once I add
>> "<iothreads>4</iothreads>" and other related config for IOthreads into
>> the libvirt xml configuration file with virsh command and save it,
>> these iothreads related configuration will disappear after I open
>> libvirt xml configuration file again for double-check.
>
> If XML disappears after saving it, this usually indicates that either you
> made a mistake and used the wrong XML element or in the wrong place, or
> that your libvirt version is too old to support it. You can use the
> virt-xml-validate too to verify your XML file against the schema for
> your installed version of libvirt, which will report any errrors.
virt-xml-validate has no help. Let me try libvirt 2.5.0 and QEMU
2.7.0. Thank you.
Best,
Weiwei Jia
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [libvirt] Cannot add iothreads label in libvirt xml configuration file
2016-12-21 17:11 [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file Weiwei Jia
2016-12-21 17:19 ` Weiwei Jia
2016-12-22 9:33 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
@ 2016-12-22 22:01 ` John Ferlan
2016-12-23 23:12 ` Weiwei Jia
2 siblings, 1 reply; 6+ messages in thread
From: John Ferlan @ 2016-12-22 22:01 UTC (permalink / raw)
To: Weiwei Jia, libvir-list; +Cc: qemu-devel
On 12/21/2016 12:11 PM, Weiwei Jia wrote:
> Hi,
>
> I cannot add iothreads
> (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
> the libvirt xml configuration file. Once I add
> "<iothreads>4</iothreads>" and other related config for IOthreads into
> the libvirt xml configuration file with virsh command and save it,
> these iothreads related configuration will disappear after I open
> libvirt xml configuration file again for double-check.
>
> The current libvirt xml configuration file is like following.
>
If I try to just cut-n-paste the following xml into a buffer, then run
virsh define kvm1.xml, I get:
error: Failed to define domain from kvm1.xml
error: Cannot check QEMU binary /usr/bin/kvm-spice: No such file or
directory
In order to support iothreads, it requires an "-object iothread"... The
"shortest" command line using qemu-kvm would be "qemu-kvm -object
iothread,id=xxx1", so you could try the same with that
/usr/bin/kvm-spice image and see what you get.
You could try to figure out from the
/var/cach/libvirt/qemu/capabilities/*.xml files whether or not the
"iothread" object exists... I would think though that the reason why
this is failing for you is that the kvm-spice emulator doesn't have the
required capability (I forget if there's a magic incantation to ask the
emulator image what it supports, especially for objects).
John
> # virsh dumpxml kvm1
> <domain type='kvm'>
> <name>kvm1</name>
> <uuid>20811918-9057-4496-aa03-0fe9d1bcaf78</uuid>
> <memory unit='KiB'>8194304</memory>
> <currentMemory unit='KiB'>8194304</currentMemory>
> <vcpu placement='static'>6</vcpu>
> <cputune>
> <vcpupin vcpu='0' cpuset='0'/>
> <vcpupin vcpu='1' cpuset='1'/>
> <vcpupin vcpu='2' cpuset='2'/>
> <vcpupin vcpu='3' cpuset='3'/>
> <vcpupin vcpu='4' cpuset='4'/>
> <vcpupin vcpu='5' cpuset='5'/>
> <emulatorpin cpuset='12-15'/>
> </cputune>
> <resource>
> <partition>/machine</partition>
> </resource>
> <os>
> <type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <emulator>/usr/bin/kvm-spice</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='none' io='native'/>
> <source file='/var/lib/libvirt/images/kvm1.img'/>
> <target dev='vda' bus='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
> </disk>
> <disk type='block' device='cdrom'>
> <driver name='qemu' type='raw'/>
> <target dev='hdc' bus='ide'/>
> <readonly/>
> <address type='drive' controller='0' bus='1' 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='scsi' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
> </controller>
> <controller type='ide' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
> </controller>
> <interface type='network'>
> <mac address='52:54:00:a7:67:eb'/>
> <source network='default'/>
> <model type='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> 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'/>
> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
> <listen type='address' address='127.0.0.1'/>
> </graphics>
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
> </video>
> <memballoon model='virtio'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
> </memballoon>
> </devices>
> <seclabel type='none'/>
> </domain>
>
>
>
>
>
> I want to config above xml file to be like following but once I save
> it, the iothreads related configuration will disappear (like above)
> after I re-open the libvirt xml for double-check.
>
> <domain type='kvm' id='1'
> xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> <name>kvm1</name>
> <memory unit='KiB'>8194304</memory>
> <currentMemory unit='KiB'>8194304</currentMemory>
> <vcpu placement='static'>6</vcpu>
> <iothreads>4</iothreads>
> <iothreadids>
> <iothread id="2"/>
> <iothread id="4"/>
> <iothread id="6"/>
> <iothread id="8"/>
> </iothreadids>
> <cputune>
> <vcpupin vcpu='0' cpuset='0'/>
> <vcpupin vcpu='1' cpuset='1'/>
> <vcpupin vcpu='2' cpuset='2'/>
> <vcpupin vcpu='3' cpuset='3'/>
> <vcpupin vcpu='4' cpuset='4'/>
> <vcpupin vcpu='5' cpuset='5'/>
> <emulatorpin cpuset="12-15"/>
> <iothreadpin iothread="2" cpuset="7"/>
> <iothreadpin iothread="4" cpuset="8"/>
> <iothreadpin iothread="6" cpuset="9"/>
> <iothreadpin iothread="8" cpuset="10"/>
> </cputune>
> <resource>
> <partition>/machine</partition>
> </resource>
> <os>
> <type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <emulator>/usr/bin/kvm-spice</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='none' io='native' iothread='2-8'/>
> <source file='/home/wj47/ssd1/kvm1.img'/>
> <target dev='vda' bus='virtio'/>
> <alias name='virtio-disk0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
> </disk>
> <disk type='block' device='cdrom'>
> <driver name='qemu' type='raw'/>
> <target dev='hdc' bus='ide'/>
> <readonly/>
> <alias name='ide0-1-0'/>
> <address type='drive' controller='0' bus='1' target='0' unit='0'/>
> </disk>
> <controller type='usb' index='0'>
> <alias name='usb0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
> </controller>
> <controller type='pci' index='0' model='pci-root'>
> <alias name='pci.0'/>
> </controller>
> <controller type='scsi' index='0'>
> <alias name='scsi0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
> </controller>
> <controller type='ide' index='0'>
> <alias name='ide0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
> </controller>
> <interface type='network'>
> <source network='default'/>
> <target dev='vnet0'/>
> <model type='virtio'/>
> <alias name='net0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
> </interface>
> <serial type='pty'>
> <source path='/dev/pts/11'/>
> <target port='0'/>
> <alias name='serial0'/>
> </serial>
> <console type='pty' tty='/dev/pts/11'>
> <source path='/dev/pts/11'/>
> <target type='serial' port='0'/>
> <alias name='serial0'/>
> </console>
> <input type='mouse' bus='ps2'/>
> <input type='keyboard' bus='ps2'/>
> <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
> <listen type='address' address='127.0.0.1'/>
> </graphics>
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <alias name='video0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
> </video>
> <memballoon model='virtio'>
> <alias name='balloon0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
> </memballoon>
> </devices>
> <seclabel type='none'/>
> </domain>
>
>
>
>
>
> Another concern is like this: can I config 4 dedicated IOthreads for
> one drive. Just like above, I want to start 4 IOthreads for
> virtio-disk0. If true, is my config like above correct? Thank you.
>
> Best,
> Weiwei Jia
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [libvirt] Cannot add iothreads label in libvirt xml configuration file
2016-12-22 22:01 ` John Ferlan
@ 2016-12-23 23:12 ` Weiwei Jia
0 siblings, 0 replies; 6+ messages in thread
From: Weiwei Jia @ 2016-12-23 23:12 UTC (permalink / raw)
To: John Ferlan; +Cc: libvir-list, qemu-devel
On Thu, Dec 22, 2016 at 5:01 PM, John Ferlan <jferlan@redhat.com> wrote:
>
>
> On 12/21/2016 12:11 PM, Weiwei Jia wrote:
>> Hi,
>>
>> I cannot add iothreads
>> (https://libvirt.org/formatdomain.html#elementsIOThreadsAllocation) in
>> the libvirt xml configuration file. Once I add
>> "<iothreads>4</iothreads>" and other related config for IOthreads into
>> the libvirt xml configuration file with virsh command and save it,
>> these iothreads related configuration will disappear after I open
>> libvirt xml configuration file again for double-check.
>>
>> The current libvirt xml configuration file is like following.
>>
>
> If I try to just cut-n-paste the following xml into a buffer, then run
> virsh define kvm1.xml, I get:
>
> error: Failed to define domain from kvm1.xml
> error: Cannot check QEMU binary /usr/bin/kvm-spice: No such file or
> directory
>
> In order to support iothreads, it requires an "-object iothread"... The
> "shortest" command line using qemu-kvm would be "qemu-kvm -object
> iothread,id=xxx1", so you could try the same with that
> /usr/bin/kvm-spice image and see what you get.
>
> You could try to figure out from the
> /var/cach/libvirt/qemu/capabilities/*.xml files whether or not the
> "iothread" object exists... I would think though that the reason why
> this is failing for you is that the kvm-spice emulator doesn't have the
> required capability (I forget if there's a magic incantation to ask the
> emulator image what it supports, especially for objects).
Thanks for your suggestions. I have tried your way and the results
tell me there are some problems with my libvirt xml configuration
file. I think I need to fix it with correct libvirt xml configuration
file.
Thanks,
Weiwei Jia
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-23 23:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 17:11 [Qemu-devel] Cannot add iothreads label in libvirt xml configuration file Weiwei Jia
2016-12-21 17:19 ` Weiwei Jia
2016-12-22 9:33 ` [Qemu-devel] [libvirt] " Daniel P. Berrange
2016-12-22 19:55 ` Weiwei Jia
2016-12-22 22:01 ` John Ferlan
2016-12-23 23:12 ` Weiwei Jia
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.