manifest icon indicating copy to clipboard operation
manifest copied to clipboard

Following Wiki for X86_64 build LinuxVM

Open lonnietc opened this issue 2 years ago • 7 comments

Hello,

I have been following the LinuxVM build at:

https://github.com/kernkonzept/manifest/wiki/LinuxVM

and making changes to see if I can get a x86_64 build working.

It seems that all of the configurations are "good" from as far as I can tell:

--- MakeConf.Boot  ADDED ---
 # Add fiasco build directory to MODULE_SEARCH_PATH
SOMEDIR = /home/lonnie/L4Re/test
MODULE_SEARCH_PATH = $(SOMEDIR)/build-fiasco-amd64:$(SOMEDIR)/ramdisk:$(SOMEDIR)/conf:$(SOMEDIR)/build-linux-amd64/arch/x86/boot/

Added to Modules.list

entry uvmm-basic
kernel fiasco -serial_esc
roottask moe rom/uvmm-basic.ned
module uvmm
module l4re
module ned
module virt-pc.dtb
module ramdisk-amd64.cpio.gz
module uvmm-basic.ned
module[uncompress] bzImage

and created the NED file "conf/uvmm-basic.ned"

local L4 = require "L4";

L4.default_loader:startv({
  log = L4.Env.log,
  caps = {
    ram  = L4.Env.user_factory:create(
      L4.Proto.Dataspace,
      128 * 1024 * 1024,                   -- size in MB
      L4.Mem_alloc_flags.Continuous |
        L4.Mem_alloc_flags.Pinned |
        L4.Mem_alloc_flags.Super_pages,
      21                                   -- alignment
    ):m("rws");
  }
}, "rom/uvmm",
  "-i",  -- place guest RAM using the host-physical addresses of the backing memory
  "--dtb", "rom/virt-arm_virt-64.dtb",
  "--ramdisk", "rom/ramdisk-amd64.cpio.gz", "--kernel", "rom/bzImage",
  "--cmdline", "console=hvc0 earlyprintk=1 rdinit=/bin/sh");

I grabbed the local L4 = require "L4";

L4.default_loader:startv({
  log = L4.Env.log,
  caps = {
    ram  = L4.Env.user_factory:create(
      L4.Proto.Dataspace,
      128 * 1024 * 1024,                   -- size in MB
      L4.Mem_alloc_flags.Continuous |
        L4.Mem_alloc_flags.Pinned |
        L4.Mem_alloc_flags.Super_pages,
      21                                   -- alignment
    ):m("rws");
  }
}, "rom/uvmm",
  "-i",  -- place guest RAM using the host-physical addresses of the backing memory
  "--dtb", "rom/virt-pc.dtb",
  "--ramdisk", "rom/ramdisk-amd64.cpio.gz", "--kernel", "rom/bzImage",
  "--cmdline", "console=hvc0 earlyprintk=1 rdinit=/bin/sh");

To get I had to use "bzImage" since it was generated and "Image.gz was not as well a located "virt-pc.dtb" since there was a "arm" file in that place.

The result is that QEMU starts up and just hangs with the message "Booting from ROM" which makes me think that it does not like the bzImage file for some reason that was generated in the "build-linux-amd64" process that went smoothly.

Can you please help build me through some of the x86_64 builds from the WIKI since I would like to replicate that part before moving into trying to work with the framebuffer builds that are currently giving errors and was reported in another Git Issue (#15 ).

UPDATE: I forgot to add the info from the QEMU boot for reference. (Attached) test.txt

Any help would be greatly appreciated. Thanks in advance and have a good day

lonnietc avatar Jun 18 '22 16:06 lonnietc

Hello,

Is there any update to this as I cannot find a work around at the moment for the x86_64 platform?

Any help would be greatly appreciated. Thanks

lonnietc avatar Jun 22 '22 09:06 lonnietc

This may be a long shot, but can you make sure there is something like "-m 512" in your QEMU command line?

jermar avatar Jun 22 '22 09:06 jermar

@jermar thanks for your comment in this.

My QEMU statement is:

$ qemu-system-x86_64 -m 512 -serial stdio -cdrom uvmm-basic.iso

In the above "test.txt" file that I attached about the only thing that I can see is the last statements with:

.
.
.

Ned: loading file: 'rom/uvmm-basic.ned'
terminate called after throwing an instance of 'N2L413Runtime_errorE'
  what: Invalid request: Unsupported HW virtualization type.

but I do not know what this signifies.

My hope is that someone at @kernkonzept can assist with the process to build the examples like in the multiple LinuxVM but for x86_64 (amd64) since that one is current for the ARM system and all of my efforts are initially for the x86_64 platforms to get started.

Any help would be greatly appreciated.

lonnietc avatar Jun 23 '22 12:06 lonnietc

I think the error means that you are trying to use uvmm with AMD's SVM virtualization, which is currently not supported by uvmm. Could you confirm you are running this on an AMD cpu?

jermar avatar Jun 23 '22 12:06 jermar

I actually have Intel CPU's here.

My 2 test systems are:

  1. Intel NUC (NUC7i7DNHE)
  2. Dell PowerEdge C6220 SFF 4 Node Server 8x Xeon E5-2650 256GB RAM 4x 2TB 2.5" HD system

lonnietc avatar Jun 23 '22 12:06 lonnietc

Hi, you have to use KVM's nested virtualization feature. To enable this you can provide -cpu host -M q35,accel=kvm on the qemu cmdline.

icedieler avatar Jun 24 '22 08:06 icedieler

@icedieler Sorry but that did not work either.

I would suspect that the MultipleVM's in the WIKI should be able to be built just like the ones that were build by Kernkonzept:

https://l4re.org/download/snapshots/pre-built-images/amd64/

which seem to partially work, except for the framebuffer related ISO's which give an error when booting due to some Framebuffer driver problem that I am seeing.

None of those (above) ISO's need kvm in the QEMU invocation.

lonnietc avatar Jun 26 '22 13:06 lonnietc