<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _gen_vol_xml(vmname,
                 diskname,
                 disktype,
                 size,
                 pool):
    '''
    Generate the XML string to define a libvirt storage volume
    '''
    size = int(size) * 1024  # MB
    context = {
        'name': vmname,
        'filename': '{0}.{1}'.format(diskname, disktype),
        'volname': diskname,
        'disktype': disktype,
        'size': six.text_type(size),
        'pool': pool,
    }
    fn_ = 'libvirt_volume.jinja'
    try:
        template = JINJA.get_template(fn_)
    except jinja2.exceptions.TemplateNotFound:
        log.error('Could not load template %s', fn_)
        return ''
    return template.render(**context)