On Wed, Jan 21, 2009 at 12:19:31PM +0000, Richard W.M. Jones wrote:
On Wed, Jan 21, 2009 at 01:12:52PM +0100, Jan ONDREJ (SAL) wrote:
You have to tell the host to give the guest a virtio network card - change the NIC <model type='virtio'/> as described here:
Many thanks. Works well.
There is nothing interesant on this URL. Part elementsNICS is not found, but also thanks.
On Wed, Jan 21, 2009 at 01:23:06PM +0100, Emre Erenoglu wrote:
you need to read the KVM virtio wiki pages, you need to disable that 8139 emulated card driver (blacklist), then change some line in guest configuration file, and probe virtio driver at boot.
http://wiki.libvirt.org/page/Virtio
http://kvm.qumranet.com/kvmwiki?action=fullsearch&context=180&value=...
find /lib/modules | grep virtio will give you the list of modules (if they are compiled as modules)
You also need to have a recent kernel such as 2.6.25 which has built-in virtio support.
Thanks. I have it.
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk. When using sedond disk, everything works well. When booting via grub, this is on console:
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3 Setting up hotplug. Creating block device nodes. Creating character device nodes. Loading pata_acpi module Loading ata_generic module Loading virtio_blk module Creating root device. Mounting root filesystem. mount: error mounting /dev/root on /sysroot as ext3: No such file or directory Setting up hotplug. Creating block device nodes. Creating character device nodes. Loading pata_acpi module Loading ata_generic module Loading virtio_blk module Creating root device. Mounting root filesystem. mount: error mounting /dev/root on /sysroot as ext3: No such file or directory
I am using UUID in GRUB, my initrd has been regenerated with virtio_blk module. I think, nash can't create /dev/vda* devices or something similar. Any ideas, how to debug this or how to fix this?
SAL
On Wed, Jan 21, 2009 at 02:28:36PM +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk. When using sedond disk, everything works well. When booting via grub, this is on console:
Upgrading to using virtio_blk is very complicated. You have to rebuild initrd, and there's a difficult circular dependency to be resolved when doing this because you need to be using virtio_blk in order for mkinitrd to believe that you need it, although possibly mkinitrd supports some command line argument to override this. I actually gave up at this point.
For newly installed guests, recent anaconda just works everything out for you and puts the correct drivers into initrd.
Rich.
On Wed, Jan 21, 2009 at 01:45:52PM +0000, Richard W.M. Jones wrote:
On Wed, Jan 21, 2009 at 02:28:36PM +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk. When using sedond disk, everything works well. When booting via grub, this is on console:
Upgrading to using virtio_blk is very complicated. You have to rebuild initrd, and there's a difficult circular dependency to be resolved when doing this because you need to be using virtio_blk in order for mkinitrd to believe that you need it, although possibly mkinitrd supports some command line argument to override this. I actually gave up at this point.
Just tell it to include virtio_blk module explicitly eg
mkinitrd --with=virtio_blk .....other option...
Daniel
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
Cheers, Mark.
On Wed, Jan 21, 2009 at 2:48 PM, Mark McLoughlin markmc@redhat.com wrote:
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
You will also need to specify /dev/vdX on the kernel root= line and make sure your init script inside your initrd triggers the virtio drivers at boot so that the /dev/vdX are created.
On Wed, Jan 21, 2009 at 03:06:43PM +0100, Emre Erenoglu wrote:
On Wed, Jan 21, 2009 at 2:48 PM, Mark McLoughlin markmc@redhat.com wrote:
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
You will also need to specify /dev/vdX on the kernel root= line and make sure your init script inside your initrd triggers the virtio drivers at boot so that the /dev/vdX are created.
Yes I have to agree with Emre here - I don't think it's as simple as just rebuilding mkinitrd. I got that far but gave up later on.
/me checks notes ...
Yup, I got as far as working out that you would have to edit fstab and possibly /boot/grub/device.map and /boot/grub/menu.lst, before giving up.
If anyone would like to fill in the wiki page here on the subject:
http://wiki.libvirt.org/page/Virtio
I'd like to reiterate that _none_ of this complexity is required when installing a new guest. Anaconda sets up everything for you.
Rich.
On Wed, Jan 21, 2009 at 3:45 PM, Richard W.M. Jones rjones@redhat.comwrote:
On Wed, Jan 21, 2009 at 03:06:43PM +0100, Emre Erenoglu wrote:
On Wed, Jan 21, 2009 at 2:48 PM, Mark McLoughlin markmc@redhat.com
wrote:
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
You will also need to specify /dev/vdX on the kernel root= line and make sure your init script inside your initrd triggers the virtio drivers at
boot
so that the /dev/vdX are created.
Yes I have to agree with Emre here - I don't think it's as simple as just rebuilding mkinitrd. I got that far but gave up later on.
Well what I did was that I created a special initramfs, with virtio-net and virtio-blk drivers, as well as all of their dependencies (virtio-pci, virti-baloon and possibly one more), edited the init script going inside the initrd image so that it triggers the virtio drivers, then booted up on that ROOT filesystem using the kernel command line.
on system side, it's better to edit fstab but root is anyway mounted.
You may need to boot to shell at your initrd to see what's going on, or probe by hand to see the devices are created etc.
You also need to use the correct guest configuration file so that virtio-type devices are created instead of emulated ones.
On Wed, 2009-01-21 at 14:45 +0000, Richard W.M. Jones wrote:
On Wed, Jan 21, 2009 at 03:06:43PM +0100, Emre Erenoglu wrote:
On Wed, Jan 21, 2009 at 2:48 PM, Mark McLoughlin markmc@redhat.com wrote:
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
You will also need to specify /dev/vdX on the kernel root= line and make sure your init script inside your initrd triggers the virtio drivers at boot so that the /dev/vdX are created.
Yes I have to agree with Emre here - I don't think it's as simple as just rebuilding mkinitrd. I got that far but gave up later on.
/me checks notes ...
Yup, I got as far as working out that you would have to edit fstab and possibly /boot/grub/device.map and /boot/grub/menu.lst, before giving up.
Could this have been an x86_64 Fedora 9 xen guest? If so, you probably hit a nasty special case - the F9 x86_64 xen kernel didn't have support for running 32 bit binaries like grub, so the bootloader would never have been installed into the MBR. That works fine for pygrub, but not with KVM's real BIOS.
If anyone would like to fill in the wiki page here on the subject:
Okay, added some bits.
Cheers, Mark.
It is probably worth noting that if someone were to run a kernel update with a package manager after getting this working (using information from later posts in this thread), they would need to do a manual mkinitrd. At least that was my experience some time ago when switching from hda to sda in CentOS, future kernel-xen versions installed via yum tried to boot to hda and failed. However, I think I actually recompiled originally, though, as opposed to adding the new drivers to initrd, so I could be wrong. Dustin
-----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Mark McLoughlin Sent: Wednesday, January 21, 2009 08:49 To: Jan ONDREJ (SAL) Cc: Fedora Xen Subject: Switching from IDE to virtio_blk [qas Re: [Fedora-xen] Goodbye Xen on RH/Fedora?]
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
Cheers, Mark.
-- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
You missed, that I am migrating not only my packages, but my whole virtual machine from paravirtualized Xen to paravirt. driver KVM. This mkinitrd magic is only required for disk driver change (xenblk_front to virtio_blk). So it's something different, like your upgrade of CentOS.
SAL
On Wed, Jan 21, 2009 at 01:47:34PM -0500, Dustin Henning wrote:
It is probably worth noting that if someone were to run a kernel update with a package manager after getting this working (using information from later posts in this thread), they would need to do a manual mkinitrd. At least that was my experience some time ago when switching from hda to sda in CentOS, future kernel-xen versions installed via yum tried to boot to hda and failed. However, I think I actually recompiled originally, though, as opposed to adding the new drivers to initrd, so I could be wrong. Dustin
-----Original Message----- From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Mark McLoughlin Sent: Wednesday, January 21, 2009 08:49 To: Jan ONDREJ (SAL) Cc: Fedora Xen Subject: Switching from IDE to virtio_blk [qas Re: [Fedora-xen] Goodbye Xen on RH/Fedora?]
(This is all getting offtopic for fedora-xen, we should really move to fedora-virt)
On Wed, 2009-01-21 at 14:28 +0100, Jan ONDREJ (SAL) wrote:
virtio_net works well, but I have trouble to boot from virtio_blk.
I can add second disk as virto block device, but I can't boot from first disk.
When switching from IDE to virtio, you need to first build a new initrd in the guest with e.g.:
$> mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(kernelversion) $(kernelversion)
You only need to do this once. After that, if a new kernel is installed while you're booted off a virtio disk, then mkinitrd will include the modules automatically.
Cheers, Mark.
-- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
On Wed, 2009-01-21 at 13:47 -0500, Dustin Henning wrote:
It is probably worth noting that if someone were to run a kernel update with a package manager after getting this working (using information from later posts in this thread), they would need to do a manual mkinitrd.
No. If you boot off /dev/vda and update the kernel, mkinitrd will build an initrd containing the virtio modules.
Cheers, Mark.
On Thu, Jan 22, 2009 at 10:20 AM, Mark McLoughlin markmc@redhat.com wrote:
On Wed, 2009-01-21 at 13:47 -0500, Dustin Henning wrote:
It is probably worth noting that if someone were to run a kernel update with a package manager after getting this working (using information from later posts in this thread), they would need to do a manual mkinitrd.
No. If you boot off /dev/vda and update the kernel, mkinitrd will build an initrd containing the virtio modules.
Well, that may depend if you use mkinitrd or mkinitramfs, and your distribution mkinitramfs or mkinitrd may not be checking which device type he's working on.
Emre
On Thu, 2009-01-22 at 11:06 +0100, Emre Erenoglu wrote:
On Thu, Jan 22, 2009 at 10:20 AM, Mark McLoughlin markmc@redhat.com wrote: On Wed, 2009-01-21 at 13:47 -0500, Dustin Henning wrote: > It is probably worth noting that if someone were to run a kernel > update with a package manager after getting this working (using > information > from later posts in this thread), they would need to do a manual > mkinitrd.
No. If you boot off /dev/vda and update the kernel, mkinitrd will build an initrd containing the virtio modules.
Well, that may depend if you use mkinitrd or mkinitramfs, and your distribution mkinitramfs or mkinitrd may not be checking which device type he's working on.
Yes, since we're on a Fedora mailing list, I'm assuming Fedora mkinitrd :-)
Cheers, Mark.
On Thu, Jan 22, 2009 at 10:21:50AM +0000, Mark McLoughlin wrote:
On Thu, 2009-01-22 at 11:06 +0100, Emre Erenoglu wrote:
On Thu, Jan 22, 2009 at 10:20 AM, Mark McLoughlin markmc@redhat.com wrote: On Wed, 2009-01-21 at 13:47 -0500, Dustin Henning wrote: > It is probably worth noting that if someone were to run a kernel > update with a package manager after getting this working (using > information > from later posts in this thread), they would need to do a manual > mkinitrd.
No. If you boot off /dev/vda and update the kernel, mkinitrd will build an initrd containing the virtio modules.
Well, that may depend if you use mkinitrd or mkinitramfs, and your distribution mkinitramfs or mkinitrd may not be checking which device type he's working on.
May be adding virtio disk drivers to initrd files always may help all users. I don't know, if there is anything, why initrd have to be small.
SAL
xen@lists.stg.fedoraproject.org