XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    /dev/xvda not appearing in guest

    Scheduled Pinned Locked Moved Compute
    21 Posts 3 Posters 4.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      keeely @r1
      last edited by

      @r1 The default distro does work, however I had to compile in support for rtl8139 C+ to get networking to work because the usual rtl 8139 driver did not work.

      <*>     RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support.    # <==== needed this one
      <*>     RealTek RTL-8129/8130/8139 PCI Fast Ethernet Adapter support  
      

      My VM is I believe HVM, however this is not all that easy to determine. I'm using XCP-ng Center and the only page that comes close to giving me an option is this one (General -> Properties):

      a15395f4-ca09-4c06-8809-70864b6a0870-image.png

      I don't believe the virtual machine is presenting to me anything other than straight HVM hardware, because I'm sure I would have seen something in dmesg about the detection of the Xen bus at least.

      The only guide to kernel configs that I've seen is here:
      https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs

      I'm broadly following that, however it seems to be a little out of date.

      I would like to find a page like that, but with one page per virtualisation mode, e.g. kernel options for each of the following cases:

      HVM
      HVM + PV Drivers
      PVHVM
      PVH
      PV
      

      After searching for some time I've been unable to find that information.

      R 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by olivierlambert

        This information is available in Xen Orchestra (current VM virt mode)

        K 2 Replies Last reply Reply Quote 0
        • R Offline
          r1 XCP-ng Team @keeely
          last edited by

          @keeely said in /dev/xvda not appearing in guest:

          I had to compile in support for rtl8139 C+ to get networking to work because the usual rtl 8139 driver did not work.

          Is this for Host or VM?

          1 Reply Last reply Reply Quote 0
          • K Offline
            keeely @olivierlambert
            last edited by

            That was for VM.

            1 Reply Last reply Reply Quote 0
            • K Offline
              keeely @olivierlambert
              last edited by

              @olivierlambert I found only this under advanced:

              f7eb4f1b-7c04-4d31-aa58-6d5d390c47b6-image.png

              Also under general section for the VM:

              93ede9ad-b089-43fa-ba0b-5774633efc29-image.png

              So what does that mean? HVM? If so where is the PVHVM option?

              Interestingly under disks, I see this:

              69614458-39a0-42e8-b7e1-ecd885fa3c57-image.png

              So the device is listed as xvda, however dmesg in the guest shows sda has been detected.

              62a2fba1-a229-4ea4-b508-1b4714be6748-image.png

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                keeely @keeely
                last edited by

                @keeely Looking at the XOA appliance, it does seem to have the right mode:

                a88b6518-ff45-4b90-823c-45fad63ca8fd-image.png

                Shame there is no /proc/config.gz on that VM so I can lift the kernel config.

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  So it means there's no emulated PV drivers installed (or they aren't loaded) 😕

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    r1 XCP-ng Team
                    last edited by

                    Can you try and compile it with "M" and push them in initrd?

                    Without PV drivers (Pure emulation mode) it generally detects as /dev/hda, seems it can also do /dev/sda.

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      keeely @r1
                      last edited by

                      @r1 said in /dev/xvda not appearing in guest:

                      Can you try and compile it with "M" and push them in initrd?

                      I have been avoiding this due to the insane amount of time it takes to do the full module compile using nested virtualisation (Slackware under XCP-ng under VMWare Fusion). But assuming that I do do it, why do I need initrd? Can't I just boot using /dev/sda1, and load the vbd frontend driver after boot? Won't both those devices still be present?

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        r1 XCP-ng Team @keeely
                        last edited by

                        @keeely Once the disk is opened by a program (emulated driver), and OS runs from it, I don't think it will allow Xen blkdev to take over. Thus the new module would render useless.

                        By putting in initrd, the kernel will load it at boot time and then disk is opened to continue boot.

                        CONFIG_XEN_BLKDEV_FRONTEND=y should have worked too but I guess that's another troubleshooting.

                        K 1 Reply Last reply Reply Quote 0
                        • K Offline
                          keeely @r1
                          last edited by

                          @r1 That's very useful info. I will try to make initrd.

                          K 1 Reply Last reply Reply Quote 0
                          • K Offline
                            keeely @keeely
                            last edited by

                            There is no need to use initrd, and I finally have this booting with kernel 4.4.14 and optimised IO.

                            Here are the kernel options I used:

                            # cat .config | grep XEN
                            CONFIG_XEN=y
                            CONFIG_XEN_DOM0=y
                            CONFIG_XEN_PVHVM=y
                            CONFIG_XEN_512GB=y
                            CONFIG_XEN_SAVE_RESTORE=y
                            # CONFIG_XEN_DEBUG_FS is not set
                            # CONFIG_XEN_PVH is not set
                            CONFIG_PCI_XEN=y
                            CONFIG_XEN_PCIDEV_FRONTEND=y
                            CONFIG_XEN_BLKDEV_FRONTEND=y
                            # CONFIG_XEN_BLKDEV_BACKEND is not set
                            CONFIG_XEN_SCSI_FRONTEND=y
                            CONFIG_NETXEN_NIC=m
                            CONFIG_XEN_NETDEV_FRONTEND=y
                            # CONFIG_XEN_NETDEV_BACKEND is not set
                            CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
                            CONFIG_HVC_XEN=y
                            CONFIG_HVC_XEN_FRONTEND=y
                            # CONFIG_TCG_XEN is not set
                            # CONFIG_XEN_WDT is not set
                            CONFIG_XEN_FBDEV_FRONTEND=y
                            CONFIG_XEN_BALLOON=y
                            # CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set
                            CONFIG_XEN_SCRUB_PAGES=y
                            CONFIG_XEN_DEV_EVTCHN=y
                            CONFIG_XEN_BACKEND=y
                            CONFIG_XENFS=y
                            CONFIG_XEN_COMPAT_XENFS=y
                            CONFIG_XEN_SYS_HYPERVISOR=y
                            CONFIG_XEN_XENBUS_FRONTEND=y
                            CONFIG_XEN_GNTDEV=m
                            CONFIG_XEN_GRANT_DEV_ALLOC=m
                            CONFIG_SWIOTLB_XEN=y
                            CONFIG_XEN_PCIDEV_BACKEND=m
                            # CONFIG_XEN_SCSI_BACKEND is not set
                            CONFIG_XEN_PRIVCMD=y
                            CONFIG_XEN_ACPI_PROCESSOR=m
                            # CONFIG_XEN_MCE_LOG is not set
                            CONFIG_XEN_HAVE_PVMMU=y
                            CONFIG_XEN_EFI=y
                            CONFIG_XEN_AUTO_XLATE=y
                            CONFIG_XEN_ACPI=y
                            CONFIG_XEN_SYMS=y
                            CONFIG_XEN_HAVE_VPMU=y
                            

                            XCP-ng Center reports IO Optimised.
                            XOA still reports the VM as HVM.

                            I can finally see the /dev/xvda device inside the guest however.

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              r1 XCP-ng Team
                              last edited by

                              So some issue in between 4.4.14 (why not 4.4.229?) vs 5.4.21 (or 5.4.50?).

                              K 1 Reply Last reply Reply Quote 0
                              • K Offline
                                keeely @r1
                                last edited by keeely

                                @r1 I haven't done a 'make oldconfig' using the 4.4.14 kernel config, which would obviously be the next step. There's a long time-period between those two kernels unfortunately, a lot could have changed. The config options in the kernel are somewhat different.

                                1 Reply Last reply Reply Quote 0
                                • K Offline
                                  keeely
                                  last edited by

                                  It seems I got a kernel panic for some other reason with 5.4.21. It's all working now, thanks.

                                  1 Reply Last reply Reply Quote 0
                                  • D Don.Gould.NZ referenced this topic on
                                  • First post
                                    Last post