bootstrap-vz/bootstrapvz/providers/kvm/tasks/virtio.py
Anders Ingemann ebba39f59b Convert "provider" into provider specific section
This is where all provider specific settings belong
like waagent on azure, guest additions iso path on vbox and virtualization type on ec2
2014-07-09 23:17:04 +02:00

16 lines
452 B
Python

from bootstrapvz.base import Task
from bootstrapvz.common import phases
import os
class VirtIO(Task):
description = 'Install virtio modules'
phase = phases.system_modification
@classmethod
def run(cls, info):
modules = os.path.join(info.root, '/etc/initramfs-tools/modules')
with open(modules, "a") as modules_file:
modules_file.write("\n")
for module in info.manifest.provider.get('virtio', []):
modules_file.write(module + "\n")