Skip to content

Instantly share code, notes, and snippets.

@GongT
Created September 3, 2020 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GongT/4fd26ba5bffae6c15895350e33f5fc8f to your computer and use it in GitHub Desktop.
Save GongT/4fd26ba5bffae6c15895350e33f5fc8f to your computer and use it in GitHub Desktop.
libvirtd direct kernel boot
#!/usr/bin/env bash
mkinitrd \
--with fuse \
--with virtio_scsi \
--with virtio_mmio \
--with virtio_console \
--with virtio_blk \
-f initrd.img \
"$(uname -r)"
#!/bin/bash
qemu-nbd -f qcow2 --connect=/dev/nbd0 disk.QCOW2
mount /dev/nbd0 /var/lib/machines/temp
bash --login -i
umount /dev/nbd0
qemu-nbd --disconnect /dev/nbd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment