File: virt-sandbox-mkinitrd.py

package info (click to toggle)
libvirt-sandbox 0.5.1%2Bgit20160404-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,104 kB
  • ctags: 1,964
  • sloc: ansic: 12,696; python: 2,110; makefile: 447; sh: 302; xml: 151; perl: 110
file content (14 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python

from gi.repository import LibvirtGObject
from gi.repository import LibvirtSandbox

LibvirtGObject.init_object_check(None)

cfg = LibvirtSandbox.ConfigInitrd.new()
cfg.set_init("/sbin/busybox")
cfg.add_module("virtio-rng.ko")
cfg.add_module("virtio_net.ko")

bld = LibvirtSandbox.BuilderInitrd.new()
bld.construct(cfg, "/tmp/demo.initrd")