[libvirt-users] ballooning option xml

udo1 udo1 at udo.hu
Mon May 31 07:52:58 UTC 2010


Hi Mattias,

Thanks, I will check if there any new package is available for Ubuntu 
Lucid, and if not I will open a problem ticket on Ubuntus Launchpad for it.
In a mean time I will use the wrapper, or I have written a control 
script to control kvm hosts.

Best Regards
Udo Attila Fischer





on 2010.05.30. 13:27, Matthias Bolte wrote:
> 2010/5/30 udo1<udo1 at udo.hu>:
>    
>> Hi Matthias,
>>
>> In Ubuntu lucid using kvm, the balloning is disabled by default, so I would
>> need to enable it.
>>      
> How do you detect that it's disabled by default, because I cannot
> reproduce that here with Ubuntu 10.04.
>
> libvirt enables ballooning by default. Okay, it only does this when it
> detects that your QEMU/KVM version supports it, but Ubuntu 10.04 has
> QEMU 0.12.3 and that version has balloon support.
>
> If libvirt detects that your QEMU supports the -device flag then it adds
>
>    -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
>
> to the command line in order to enable ballooning. This what's added
> to the command line for me here.
>
> If your QEMU doesn't supports the -device flag, but supports the
> -balloon flag then
>
>    -balloon virtio
>
> is added to the command line in order to enable ballooning.
>
> If your QEMU doesn't support non of these flags that you don't get ballooning.
>
> You can check the used command line in
> /var/log/libvirt/qemu/<guest>.log for qemu:///system connections or in
> ~/.libvirt/log/qemu/<guest>.log for qemu:///session connections.
>
> ....
>
> At this point I realize that Ubuntu 10.04 comes with libvirt 0.7.5 and
> now I understand your problem.
>
> A comment in the current QEMU driver code says (since libvirt 0.7.6,
> git commit 7a90f216):
>
>      /* QEMU changed its default behavior to not include the virtio balloon
>       * device.  Explicitly request it to ensure it will be present. */
>
> So, libvirt 0.7.5 still assumes that QEMU automatically adds the
> virtio balloon device. The comment and commit message don't say in
> which QEMU version this was changed, but I assume that QEMU 0.12.3 (as
> in Ubuntu 10.04) doesn't enable ballooing by default anymore.
>
> So you're suffering from a version mismatch between your libvirt and
> QEMU version: your libvirt is too old for your QEMU, or QEMU is too
> new for libvirt.
>
> I couldn't reproduce your problem at first because I don't have the
> Ubuntu libvirt packages installed, but compile bleeding-edge libvirt
> from source.
>
>    
>> (I currently have written a wrapper named as kvm adding this kvm option but
>> this should not be the right way)
>>      
> So you can fix this version mismatch with that script, or upgrade
> libvirt to a version>= 0.7.6. There is a PPA on Launchpad that offers
> more up-to-date libvirt packages for Ubuntu.
>
>    https://launchpad.net/~dnjl/+archive/virtualization
>
> Matthias
>
>    
>> br
>> Udo Attila Fischer
>>
>>
>> on 2010.05.26. 14:21, Matthias Bolte wrote:
>>      
>>> 2010/5/13 udo1<udo1 at udo.hu>:
>>>
>>>        
>>>> Hi everybody,
>>>>
>>>> I need the ballooning option with kvm using libvirt xml file and virsh
>>>> (virsh create domain.xml)
>>>> kvm line must be appended with the -balloon virtio switch to enable
>>>> ballooning. (can be disabled if there no option or with -balloon none )
>>>>
>>>> I currently using Ubuntu Lucid
>>>>
>>>> How can I define this in the domain xml file, or what need I to do to get
>>>> this option?
>>>> is there any option like
>>>> enabling with
>>>> <balloon>virtio</balloon>
>>>> or
>>>> disabling with
>>>> <balloon>none</balloon>
>>>>
>>>>
>>>> Thanks in Advance
>>>> Udo Attila Fischer
>>>>
>>>>
>>>>          
>>> Ballooning is enabled by default and cannot be disabled via the domain
>>> XML.
>>>
>>> Do you have any specific problem that makes you think there is a
>>> problem with ballooning?
>>>
>>> Matthias
>>>
>>>
>>>        
>>
>>      
>    




More information about the libvirt-users mailing list