Re: qemu arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pavel, 
Thank you! I did not see that page before, I must admit. It's going to be of a great help!
Have a good day, 
Pierre

----- Mail original -----
> De: "Pavel Hrdina" <phrdina@xxxxxxxxxx>
> À: "Pierre Clouzet" <pierre.clouzet@xxxxxxxx>
> Cc: "users" <users@xxxxxxxxxxxxxxxxx>
> Envoyé: Mardi 6 Février 2024 15:58:35
> Objet: Re: qemu arguments

> On Tue, Feb 06, 2024 at 01:57:39PM +0100, Pierre Clouzet wrote:
>> Hello,
>> I've recently tried libvirt api to manage virtual machine.
>> The point of my work is to modify the topology of a virtual machine and test
>> performances (add numa nodes, change number of cpu per numa, nvm devices, cxl,
>> etc)
>> As far as understand, when using virt-manager, qemu arguments stored in xml
>> files can only be like the one that page:
>> [ https://wiki.libvirt.org/QEMUSwitchToLibvirt.html |
>> https://wiki.libvirt.org/QEMUSwitchToLibvirt.html ]
>> 
>> But maybe I misundertood?
>> 
>> For example, when I directly run qemu with arguments, I can add an arguments
>> like this:
>> qemu [...] -object memory-backend-ram,size=4G,id=ram0
>> -object memory-backend-ram,size=2G,id=ram1
>> -numa node,nodeid=0,memdev=ram0,cpus=0-3
>> -numa node,nodeid=1,memdev=ram1,cpus=4-7
>> 
>> To have 2 numa nodes with 4 cpus each.
>> Is there an equivalent of -objet, -numa, -device; qemu arguments when using
>> libvirt? Or arguments are restricted to the one described on wiki page?
> 
> Hi,
> 
> I see that the wiki page doesn't cover memory-backend-ram but it is
> implemented in libvirt and doable with XML. That wiki page will most
> likely miss other QEMU commands but you can always check the Domain XML
> format documentation [1] to see if libvirt supports what you want to
> achieve.
> 
> For your case you want to use something like this:
> 
>    <domain>
>      <currentMemory unit='GiB'>6</currentMemory>
>      <vcpu>8</vcpu>
>      ...
>      <cpu>
>        ...
>        <numa>
>          <cell id='0' cpus='0-3' memory='4' unit='GiB'/>
>          <cell id='1' cpus='4-7' memory='2' unit='GiB'/>
>        </numa>
>      ...
>    </domain>
> 
> More details here [2].
> 
> Note: one defined libvirt will show the memory in `KiB` so that
> behavior is expected.
> 
> Pavel
> 
> [1] <https://libvirt.org/formatdomain.html>
> [2] <https://libvirt.org/formatdomain.html#cpu-model-and-topology>
_______________________________________________
Users mailing list -- users@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux