<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pierro78</id>
	<title>KVM - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://linux-kvm.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pierro78"/>
	<link rel="alternate" type="text/html" href="https://linux-kvm.org/page/Special:Contributions/Pierro78"/>
	<updated>2026-04-26T16:02:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2317</id>
		<title>Boot from virtio block device</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2317"/>
		<updated>2009-05-24T12:12:35Z</updated>

		<summary type="html">&lt;p&gt;Pierro78: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Virtio block device is a para-virtualized device for kvm guest. It is different from normal emulated hard drive, because it is simply faster. This small how-to is about how to make a disk para-virtualized and boot from it.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
# create a disk and install os to it by appending &amp;quot;-hda &amp;lt;your_disk_image&amp;gt;&amp;quot; to your virtual machine&lt;br /&gt;
# in your guest os, upgrade kernel to 2.6.25 which contains virtio_* drivers. or ubuntu 8.04 also has it.&lt;br /&gt;
# in guest os, change /boot/grub/device.map from &amp;quot;(hd0) /dev/sda&amp;quot; to &amp;quot;(hd0) /dev/vda&amp;quot;&lt;br /&gt;
# in guest os, change /boot/grub/menu.list from &amp;quot;root=/dev/sda1&amp;quot; to &amp;quot;root=/dev/vda1&amp;quot;, if you are using UUID, then no need to do this step.&lt;br /&gt;
# enable para-virtualization by changing &amp;quot;-hda &amp;lt;your_disk_image&amp;quot; to &amp;quot;-drive file=&amp;lt;your_disk_image&amp;gt;,if=virtio,boot=on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Error 18 ==&lt;br /&gt;
&lt;br /&gt;
you may experience this error while grub is booting. I solved it by making the /boot the first partition and make it 32MB.&lt;br /&gt;
&lt;br /&gt;
== qcow2 ==&lt;br /&gt;
&lt;br /&gt;
I have problem to boot from qcow2 format image, it will hang while kernel booting. you may convert your disk image to raw format by &amp;quot;qemu-img convert -f qcow2 &amp;lt;your_disk_image&amp;gt; -O raw &amp;lt;a_new_location&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Booting with lilo ==&lt;br /&gt;
&lt;br /&gt;
You must add this to your lilo.conf:&lt;br /&gt;
&lt;br /&gt;
 boot=/dev/vda&lt;br /&gt;
 disk=/dev/vda bios=0x80 max-partitions=7&lt;br /&gt;
&lt;br /&gt;
and after your image clausule change:&lt;br /&gt;
 &lt;br /&gt;
 root=/dev/vda1&lt;br /&gt;
&lt;br /&gt;
where vda1 is your boot partition&lt;br /&gt;
&lt;br /&gt;
== Updating the guest initramfs with the virtio driver ==&lt;br /&gt;
If you are hosting a debian guest then you may want to update its initramfs with the virtio driver as explained in [[Using VirtIO NIC]]&lt;/div&gt;</summary>
		<author><name>Pierro78</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2316</id>
		<title>Boot from virtio block device</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2316"/>
		<updated>2009-05-24T11:17:55Z</updated>

		<summary type="html">&lt;p&gt;Pierro78: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Virtio block device is a para-virtualized device for kvm guest. It is different from normal emulated hard drive, because it is simply faster. This small how-to is about how to make a disk para-virtualized and boot from it.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
# create a disk and install os to it by appending &amp;quot;-hda &amp;lt;your_disk_image&amp;gt;&amp;quot; to your virtual machine&lt;br /&gt;
# in your guest os, upgrade kernel to 2.6.25 which contains virtio_* drivers. or ubuntu 8.04 also has it.&lt;br /&gt;
# in guest os, change /boot/grub/device.map from &amp;quot;(hd0) /dev/sda&amp;quot; to &amp;quot;(hd0) /dev/vda&amp;quot;&lt;br /&gt;
# in guest os, change /boot/grub/menu.list from &amp;quot;root=/dev/sda1&amp;quot; to &amp;quot;root=/dev/vda1&amp;quot;, if you are using UUID, then no need to do this step.&lt;br /&gt;
# enable para-virtualization by changing &amp;quot;-hda &amp;lt;your_disk_image&amp;quot; to &amp;quot;-drive file=&amp;lt;your_disk_image&amp;gt;,if=virtio,boot=on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Error 18 ==&lt;br /&gt;
&lt;br /&gt;
you may experience this error while grub is booting. I solved it by making the /boot the first partition and make it 32MB.&lt;br /&gt;
&lt;br /&gt;
== qcow2 ==&lt;br /&gt;
&lt;br /&gt;
I have problem to boot from qcow2 format image, it will hang while kernel booting. you may convert your disk image to raw format by &amp;quot;qemu-img convert -f qcow2 &amp;lt;your_disk_image&amp;gt; -O raw &amp;lt;a_new_location&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Booting with lilo ==&lt;br /&gt;
&lt;br /&gt;
You must add this to your lilo.conf:&lt;br /&gt;
&lt;br /&gt;
 boot=/dev/vda&lt;br /&gt;
 disk=/dev/vda bios=0x80 max-partitions=7&lt;br /&gt;
&lt;br /&gt;
and after your image clausule change:&lt;br /&gt;
 &lt;br /&gt;
 root=/dev/vda1&lt;br /&gt;
&lt;br /&gt;
where vda1 is your boot partition&lt;br /&gt;
&lt;br /&gt;
== Updating the initramfs with the virtio driver ==&lt;br /&gt;
If you are using debian then you may want to update your initramfs with the virtio driver as explained in [[Using VirtIO NIC]]&lt;/div&gt;</summary>
		<author><name>Pierro78</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2315</id>
		<title>Boot from virtio block device</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=Boot_from_virtio_block_device&amp;diff=2315"/>
		<updated>2009-05-24T11:17:26Z</updated>

		<summary type="html">&lt;p&gt;Pierro78: initramfs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Virtio block device is a para-virtualized device for kvm guest. It is different from normal emulated hard drive, because it is simply faster. This small how-to is about how to make a disk para-virtualized and boot from it.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
# create a disk and install os to it by appending &amp;quot;-hda &amp;lt;your_disk_image&amp;gt;&amp;quot; to your virtual machine&lt;br /&gt;
# in your guest os, upgrade kernel to 2.6.25 which contains virtio_* drivers. or ubuntu 8.04 also has it.&lt;br /&gt;
# in guest os, change /boot/grub/device.map from &amp;quot;(hd0) /dev/sda&amp;quot; to &amp;quot;(hd0) /dev/vda&amp;quot;&lt;br /&gt;
# in guest os, change /boot/grub/menu.list from &amp;quot;root=/dev/sda1&amp;quot; to &amp;quot;root=/dev/vda1&amp;quot;, if you are using UUID, then no need to do this step.&lt;br /&gt;
# enable para-virtualization by changing &amp;quot;-hda &amp;lt;your_disk_image&amp;quot; to &amp;quot;-drive file=&amp;lt;your_disk_image&amp;gt;,if=virtio,boot=on&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Error 18 ==&lt;br /&gt;
&lt;br /&gt;
you may experience this error while grub is booting. I solved it by making the /boot the first partition and make it 32MB.&lt;br /&gt;
&lt;br /&gt;
== qcow2 ==&lt;br /&gt;
&lt;br /&gt;
I have problem to boot from qcow2 format image, it will hang while kernel booting. you may convert your disk image to raw format by &amp;quot;qemu-img convert -f qcow2 &amp;lt;your_disk_image&amp;gt; -O raw &amp;lt;a_new_location&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Booting with lilo ==&lt;br /&gt;
&lt;br /&gt;
You must add this to your lilo.conf:&lt;br /&gt;
&lt;br /&gt;
 boot=/dev/vda&lt;br /&gt;
 disk=/dev/vda bios=0x80 max-partitions=7&lt;br /&gt;
&lt;br /&gt;
and after your image clausule change:&lt;br /&gt;
 &lt;br /&gt;
 root=/dev/vda1&lt;br /&gt;
&lt;br /&gt;
where vda1 is your boot partition&lt;br /&gt;
&lt;br /&gt;
== updating the initramfs with the virtio driver ==&lt;br /&gt;
If you are using debian then you may want to update your initramfs with the virtio driver as explained in [[Using VirtIO NIC]]&lt;/div&gt;</summary>
		<author><name>Pierro78</name></author>
	</entry>
</feed>