[libvirt] specifying cirrus ram size

Eric Blake eblake at redhat.com
Tue Mar 18 22:08:37 UTC 2014


On 03/18/2014 03:59 PM, Serge Hallyn wrote:
> Hi,
> 
> In order to migrate a VM from an older system with qemu-kvm to a newer
> one with qemu, the newer qemu needs to be told to use the same vga
> ram size as qemu-kvm used, 8M.
> 
> virsh domxml-from-native suggests that the way to specify a
> 8mb cirrus vga ram size would be to add
> 
> <qemu:commandline>
>  <qemu:arg value='-global'/>
>  <qemu:arg value='cirrus-vga.vgamem_mb=8'/>
> </qemu:commandline>

This points out a weakness in our code - <qemu:commandline> is
intentionally unsupported, which means our XML needs an actual parameter
for this, rather than forcing you back to qemu:commandline.  Or maybe we
already have the parameter, in which case the bug is in the
domxml-from-native code for not recognizing this particular usage of
command line arguments.  But a quick grep for vgamem_mb doesn't have any
hits in current src/qemu/qemu_command.c, so it looks like we don't
support it yet.

> 
> However whenever I edit a .xml to add this, it disappears.

When outputting <qemu:commandline> in domxml-from-native, you must also
output the xmlns directive that enables its use.  domxml-from-native is
correctly doing it, but doing it at the very first <domain> which is
quite some distance away, so you probably missed that key point.  See
http://libvirt.org/drvqemu.html#qemucommand

> Am I doing something silly?

You're forgetting <domain type='qemu'
xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140318/368f3b3d/attachment-0001.sig>


More information about the libvir-list mailing list