<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy" -->

---
title: Setting up QEMU-KVM for kernel development | daily.dev
description: A practical guide to setting up QEMU-KVM for Linux kernel development, covering the limitations of native and VirtualBox-based workflows, creating a Debian...
canonical: https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Setting up QEMU-KVM for kernel development | daily.dev
og:description: A practical guide to setting up QEMU-KVM for Linux kernel development, covering the limitations of native and VirtualBox-based workflows, creating a Debian...
og:url: https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy
og:image: https://api.daily.dev/og/posts/8r6eOMSIY.png
og:image:alt: Setting up QEMU-KVM for kernel development
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting up QEMU-KVM for kernel development

**[Collabora Blog](https://daily.dev/sources/collabora)** · 5 min read · 0 upvotes · 0 comments

## Summary

A practical guide to setting up QEMU-KVM for Linux kernel development, covering the limitations of native and VirtualBox-based workflows, creating a Debian rootfs with debootstrap, building a kernel with KVM-optimized config, and enabling KVM acceleration for fast boot times. Key steps include using the -kernel flag to boot custom kernels, enabling --enable-kvm for 3x faster boot (systemd starts in 1.7s vs 5.9s), and using --nographic mode for terminal-friendly operation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2017/01/16/setting-up-qemu-kvm-for-kernel-development>

## Questions this post answers

### How do I boot a custom Linux kernel in QEMU without installing a full OS?

Use the QEMU -kernel flag to pass a kernel binary directly: `qemu-system-x86_64 -kernel arch/x86/boot/bzImage -hda qemu-image.img -append "root=/dev/sda"`. You need a rootfs image, which can be created with debootstrap. Build the kernel using `make x86_64_defconfig && make kvm_guest.config && make -j 8` to get a KVM-optimized build.

_Developers iterating on kernel patches track environment tips like these on daily.dev._

### How much faster does --enable-kvm make QEMU boot compared to without it?

Enabling KVM cuts boot time by more than 3x. Without KVM, systemd starts 5.9 seconds after boot; with --enable-kvm, it starts after 1.7 seconds. The flag is added simply as `--enable-kvm` to the qemu-system-x86_64 command line and only accelerates x86 platforms.

_Engineers benchmarking virtualization setups for kernel work find relevant comparisons on daily.dev._

## Similar posts on daily.dev

- [On Ditching Vagrant](https://daily.dev/posts/on-ditching-vagrant-j0ekatxsa) · Lobsters · 1 upvotes · 0 comments
- [Latest VirtualBox Code Begins Supporting KVM Backend](https://daily.dev/posts/latest-virtualbox-code-begins-supporting-kvm-backend-mjgfnby5m) · Phoronix · 2 upvotes · 0 comments
- [Making a micro Linux distro](https://daily.dev/posts/making-a-micro-linux-distro-opv8lmaob) · Hacker News · 21 upvotes · 3 comments
- [Building Your Own Operating System From Scratch \(A Practical Getting-Started Guide\)](https://daily.dev/posts/building-your-own-operating-system-from-scratch-a-practical-getting-started-guide--bcelcqpq7) · Medium · 0 upvotes · 0 comments
- [Forget VMware and VirtualBox: This should be your new VM manager](https://daily.dev/posts/forget-vmware-and-virtualbox-this-should-be-your-new-vm-manager-8xtnbghdz) · The New Stack · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#infrastructure](https://daily.dev/tags/infrastructure)

[View this post on daily.dev](https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Setting up QEMU-KVM for kernel development","url":"https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy"},"datePublished":"2026-08-11T08:56:56.620Z","dateModified":"2026-08-11T09:34:51.999Z","description":"A practical guide to setting up QEMU-KVM for Linux kernel development, covering the limitations of native and VirtualBox-based workflows, creating a Debian...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5dbaf59c26c4d7355d25e35025cc40e8?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5dbaf59c26c4d7355d25e35025cc40e8?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,infrastructure","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Setting up QEMU-KVM for kernel development"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/setting-up-qemu-kvm-for-kernel-development-8r6eomsiy#faq","mainEntity":[{"@type":"Question","name":"How do I boot a custom Linux kernel in QEMU without installing a full OS?","acceptedAnswer":{"@type":"Answer","text":"Use the QEMU -kernel flag to pass a kernel binary directly: `qemu-system-x86_64 -kernel arch/x86/boot/bzImage -hda qemu-image.img -append \"root=/dev/sda\"`. You need a rootfs image, which can be created with debootstrap. Build the kernel using `make x86_64_defconfig && make kvm_guest.config && make -j 8` to get a KVM-optimized build. Developers iterating on kernel patches track environment tips like these on daily.dev."}},{"@type":"Question","name":"How much faster does --enable-kvm make QEMU boot compared to without it?","acceptedAnswer":{"@type":"Answer","text":"Enabling KVM cuts boot time by more than 3x. Without KVM, systemd starts 5.9 seconds after boot; with --enable-kvm, it starts after 1.7 seconds. The flag is added simply as `--enable-kvm` to the qemu-system-x86_64 command line and only accelerates x86 platforms. Engineers benchmarking virtualization setups for kernel work find relevant comparisons on daily.dev."}}]}
```

