mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Move virtio module list into "system". Fixes #5
This commit is contained in:
parent
ff968c3869
commit
6c18bca05a
3 changed files with 18 additions and 17 deletions
|
@ -2,8 +2,7 @@
|
||||||
"provider": "kvm",
|
"provider": "kvm",
|
||||||
"bootstrapper": {
|
"bootstrapper": {
|
||||||
"workspace": "/target",
|
"workspace": "/target",
|
||||||
"mirror": "http://ftp.fr.debian.org/debian/",
|
"mirror": "http://ftp.fr.debian.org/debian/"
|
||||||
"virtio" : [ "virtio_pci", "virtio_blk" ]
|
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}",
|
"name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}",
|
||||||
|
@ -15,7 +14,8 @@
|
||||||
"bootloader": "grub",
|
"bootloader": "grub",
|
||||||
"timezone": "UTC",
|
"timezone": "UTC",
|
||||||
"locale": "en_US",
|
"locale": "en_US",
|
||||||
"charmap": "UTF-8"
|
"charmap": "UTF-8",
|
||||||
|
"virtio_modules": [ "virtio_pci", "virtio_blk" ]
|
||||||
},
|
},
|
||||||
"packages": {},
|
"packages": {},
|
||||||
"volume": {
|
"volume": {
|
||||||
|
|
|
@ -3,21 +3,22 @@
|
||||||
"title": "KVM manifest",
|
"title": "KVM manifest",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"bootstrapper": {
|
"system": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"virtio": {
|
"virtio": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"enum": ["virtio",
|
||||||
|
"virtio_pci",
|
||||||
|
"virtio_balloon",
|
||||||
|
"virtio_blk",
|
||||||
|
"virtio_net",
|
||||||
|
"virtio_ring"]
|
||||||
},
|
},
|
||||||
"minItems": 1
|
"minItems": 1
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"system": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"bootloader": {
|
"bootloader": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["grub", "extlinux"]
|
"enum": ["grub", "extlinux"]
|
||||||
|
|
|
@ -12,5 +12,5 @@ class VirtIO(Task):
|
||||||
modules = os.path.join(info.root, '/etc/initramfs-tools/modules')
|
modules = os.path.join(info.root, '/etc/initramfs-tools/modules')
|
||||||
with open(modules, "a") as modules_file:
|
with open(modules, "a") as modules_file:
|
||||||
modules_file.write("\n")
|
modules_file.write("\n")
|
||||||
for module in info.manifest.bootstrapper.get('virtio', []):
|
for module in info.manifest.system.get('virtio', []):
|
||||||
modules_file.write(module + "\n")
|
modules_file.write(module + "\n")
|
||||||
|
|
Loading…
Add table
Reference in a new issue