Hi everyone, I have searched a lot before asking this question, wouldn't bother you with it if I wasn't completely stumped...
I've been experimenting with I/O throttling on our OpenNebula servers, so that a couple of VMs needing very high I/O don't completely hog the bandwidth and slow everything to a crawl. I Found out how to add raw data to my template, like <blkiotune> option. This is a domain option, so dropping it in the template ("Other" tab, type "raw", "<blkiotune>stuff</blkiotune>", done) is quite easy. The generated template would result in ------------------------------------- <domain> ... <blkiotune> <weight>800</weight> <device> <path>/dev/sda</path> <weight>1000</weight> </device> <device> <path>/dev/sdb</path> <weight>500</weight> </device> </blkiotune> ... </domain> ------------------------------------- Blkiotune is a global option, and I need to be more granular in my settings. Enter iotune. I need to add <iotune> for all disks defined in the template, but inserting the code on the same section as <blkiotune> doesn't work, even if I nest it in the proper tags, e.g. <devices><disk><iotune>iotune stuff</iotune></disk></devices>, hoping it would merge with every <disk> declaration (blkiotune is a "top level" domain parameter, <iotune> is for every disk declaration in the template). It just ends up in the end of the template, just like blkiotune example above. Example of how it turned out (doesn't work, VM doesn't boot, of course!): ------------------------------------- <domain> ... <devices> <disk type='file' snapshot='external'> <driver name="tap" type="aio" cache="default"/> <source file='/var/lib/xen/images/fv0' startupPolicy='optional'> <seclabel relabel='no'/> </source> <target dev='hda' bus='ide'/> </disk> <disk type='file' device='disk'>#another disk <source file='/var/lib/one//datastores/109/973/disk.0'/> <target dev='vda'/> <driver name='qemu' type='qcow2' cache='none'/> </disk> ... </devices> <devices> <disk> <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> </disk> <devices> ... </domain> ------------------------------------- How it needs to be to work correctly: ------------------------------------- <domain> ... <devices> <disk type='file' snapshot='external'> <driver name="tap" type="aio" cache="default"/> <source file='/var/lib/xen/images/fv0' startupPolicy='optional'> <seclabel relabel='no'/> </source> <target dev='hda' bus='ide'/> <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> </disk> <disk type='file' device='disk'>#another disk <source file='/var/lib/one//datastores/109/999/disk.0'/> <target dev='vda'/> <driver name='qemu' type='qcow2' cache='none'/> <iotune> <total_bytes_sec>10000000</total_bytes_sec> <read_iops_sec>400000</read_iops_sec> <write_iops_sec>100000</write_iops_sec> </iotune> </disk> ... </devices> </domain> ------------------------------------- Don't pay attention to the type of disks in the template, it's just a mashup from samples and what I'd like it to be. Sample code extracted from https://libvirt.org/formatdomain.html#elementsBlockTuningandhttps://libvirt.org/formatdomain.html#elementsDisks, and modified to fit my needs. Sorry for the long post, I hope someone can help me out here. Thanks, Pedro Pereira
0x9483169C.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org