Gentoo Archives: gentoo-user

From: hw <hw@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] SOLVED: Gentoo as kvm guest with virtio not detecting vda device (Gentoo as kvm guest with virtio)
Date: Thu, 10 Mar 2016 13:37:53
Message-Id: 56E178A3.7040209@gc-24.de
In Reply to: Re: [gentoo-user] Gentoo as kvm guest with virtio by hw
1 Hi,
2
3 I found that I needed to enable VIRTIO_PCI_LEGACY for the guest kernel.
4 I've also set 'virtio_pci.force_legacy=1' as kernel command line option.
5
6 This was suggested here: https://bugs.archlinux.org/task/44573
7
8
9 hw wrote:
10 > Bill Kenworthy wrote:
11 >> On 10/03/16 01:56, Rich Freeman wrote:
12 >>> On Wed, Mar 9, 2016 at 12:41 PM, hw <hw@×××××.de> wrote:
13 >>>>
14 >>>> I'm stuck with 'Could not find the root block device
15 >>>> in UUID= ...' when trying to boot the guest.
16 >>>>
17 >>>> Is grub2 unable to work with virtio devices?
18 >>>>
19 >>>
20 >>> Are you sure that is a grub2 message? It seems more likely that this
21 >>> is a message from the kernel (unless it is referring to the grub2 root
22 >>> - posting the entire error would probably help here, and I didn't
23 >>> realize grub2 even can find its root with a UUID assuming it actually
24 >>> can). Does your kernel have virtio support enabled? What initramfs
25 >>> are you using? The problem could lie with either. See if you can get
26 >>> the initramfs to give you a shell (usually this can be done with a
27 >>> kernel command line option) and see what block devices it can see (run
28 >>> blkid or such).
29 >>>
30 >>> If you're not using an initramfs then that is your problem. You can't
31 >>> use UUID to reference your root if you aren't using an initramfs.
32 >>>
33 >>
34 >> I had to use this on grub install:
35 >>
36 >> grub2-install --target=i386-pc /dev/vda && \
37 >> grub2-mkconfig -o /boot/grub/grub.cfg
38 >>
39 >> It couldn't find the right module without the hint.
40 >
41 > That seems to work just fine:
42 >
43 >
44 > livecd linux # grub2-install /dev/vda
45 > Installing for i386-pc platform.
46 > installation beendet. Keine Fehler aufgetreten.
47 >
48 >
49 > Do you think it claims to have worked but actually didn't?
50 >
51 >