Running VisualKernel inside a QEMU Windows VM

Sysprogs forums Forums VisualKernel Running VisualKernel inside a QEMU Windows VM

Tagged: 

This topic contains 8 replies, has 2 voices, and was last updated by  subvert 1 month, 1 week ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #32991

    subvert
    Participant

    I Get the following error when i try to create a new linux kernel module project, at the build step:

     

    VisualKernel version: 4.0.0.2309
    —————— System.Exception ——————
    System.Exception: Cannot complete the smart archive without closing the ‘source’ area
    at aa1.i()
    at sf3.Dispose()
    at if1.v(uu2 a, String c, l1 b, Int64& d)
    at if1.f1(KernelVersion b, Boolean c, String a, Boolean& d)
    at mx2.a(KnownKernelTarget b, c a)
    at VisualGDB.WPF.Wizards.Linux.Kernel.LinuxKernelTargetPage.ControllerImpl.CommitPage(l1 commitMode)
    at VisualGDB.WPF.Wizards.WPFWizardWindow.ControllerImpl.TryPrepareAndCommitPagesUntil(Int32 pageIndex)
    trace=[aa1.i:532, sf3.Dispose:11, if1.v:679, if1.f1:151, mx2.a:321, VisualGDB.WPF.Wizards.Linux.Kernel.LinuxKernelTargetPage+ControllerImpl.CommitPage:270, VisualGDB.WPF.Wizards.WPFWizardWindow+ControllerImpl.TryPrepareAndCommitPagesUntil:122]

     

     

    Tried both the Ubuntu 18 and 22 as the target, both give this error at the build setting step when i try to click next.

    Unchecking the download kernel symbols fixes the error.

     

    What should i do? I’m using the visual kernel 4.0, as the version 3 couldn’t find my visual studio 2022.

    I also tried to install both visualkernel 4 and 3 on visual studio 2019, but either way the linux kernel module didn’t show up in the project templates..

    #32992

    subvert
    Participant

    Also tried to give the gdb to it manually, no luck.

     

    And even without the symbols, i cannot debug the target as i get the following error when i press 5:

     

    Cannot build kgdboe

    Run “make -C “/lib/modules/$(uname -r)/build” M=”/tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8″ modules” in directory “” on local computer
    ————————–
    make: Entering directory ‘/usr/src/linux-headers-5.15.0-46-generic’
    CC [M] /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/irqsync.o
    CC [M] /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_main.o
    CC [M] /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.o
    make: Leaving directory ‘/usr/src/linux-headers-5.15.0-46-generic’
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_main.c: In function ‘kgdboe_init’:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_main.c:71:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    71 | int err = kgdboe_io_init(device_name, udp_port, local_ip, force_single_core != 0);
    | ^~~
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c: In function ‘kgdboe_rx_handler’:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:40:17: error: implicit declaration of function ‘kgdb_schedule_breakpoint’; did you mean ‘kgdb_arch_remove_breakpoint’? [-Werror=implicit-function-declaration]
    40 | kgdb_schedule_breakpoint();
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    | kgdb_arch_remove_breakpoint
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c: In function ‘kgdboe_read_char’:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:76:5: warning: this ‘while’ clause does not guard… [-Wmisleading-indentation]
    76 | while (s_IncomingRingBufferReadPosition == s_IncomingRingBufferWritePosition)
    | ^~~~~
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:79:9: note: …this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
    79 | result = s_IncomingRingBuffer[s_IncomingRingBufferReadPosition++];
    | ^~~~~~
    In file included from /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:8:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c: In function ‘kgdboe_io_init’:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/tracewrapper.h:8:30: warning: initialization of ‘int *’ from ‘long unsigned int’ makes pointer from integer without a cast [-Wint-conversion]
    8 | #define kallsyms_lookup_name ((unsigned long(*)(const char *))kallsyms_lookup_name_address)
    | ^
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:163:30: note: in expansion of macro ‘kallsyms_lookup_name’
    163 | int *_gro_normal_batch = kallsyms_lookup_name(“gro_normal_batch”);
    | ^~~~~~~~~~~~~~~~~~~~
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:163:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    163 | int *_gro_normal_batch = kallsyms_lookup_name(“gro_normal_batch”);
    | ^~~
    In file included from /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.c:8:
    At top level:
    /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/tracewrapper.h:23:27: warning: ‘do_lookup_tracepoint’ defined but not used [-Wunused-function]
    23 | static struct tracepoint *do_lookup_tracepoint(const char *tracepointName, const char *tracepointPtrName)
    | ^~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[1]: *** [scripts/Makefile.build:297: /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8/kgdboe_io.o] Error 1
    make: *** [Makefile:1881: /tmp/kgdboe-b02afbe5-399e-4642-9ee8-71900ab73bb8] Error 2
    ————————–
    Command exited with code 2

    • This reply was modified 1 month, 2 weeks ago by  subvert.
    #33000

    subvert
    Participant

    So i tried the pre built fedora 36 ready for debugging VM that you guys have (QEMU version), And it got me through the symbol problem, and i used COM port this time instead of network to get around the building error i shared above, but still got the following GDB error……..

     

     

    Failed to start GDB session

    VisualKernel version: 4.0.0.2309
    (gdb begin)
    — GDB Session —
    Your VisualKernel trial expires in 30 days!
    C:\Program Files (x86)\Sysprogs\VisualKernel\KernelTools\gdb-multiarch.exe –interpreter mi
    -gdb-set breakpoint always-inserted on
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 12.1\n”
    ~”Copyright (C) 2022 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    ~”\nType \”show copying\” and \”show warranty\” for details.\n”
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=x86_64-linux-gnu\”.\n”
    ~”Type \”show configuration\” for configuration details.\n”
    ~”For bug reporting instructions, please see:\n”
    ~”<https://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/software/gdb/documentation/&gt;.”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”\n\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -file-exec-and-symbols “C:\\Program\ Files\ \(x86\)\\Sysprogs\\VisualKernel\\KernelTools\\amd64\\dummy\.elf”
    ^done
    add-symbol-file c:/KernelCache/5.18.10-200.fc36.x86_64.kernel/vmlinux 0xffffffff88000000 -s .rodata 0xffffffff89200000 -s .pci_fixup 0xffffffff8977d7a0 -s .tracedata 0xffffffff89780e40 -s __ksymtab 0xffffffff89780eb8 -s __ksymtab_gpl 0xffffffff89793134 -s __ksymtab_strings 0xffffffff897a5ec0 -s __init_rodata 0xffffffff897e2ca0 -s __param 0xffffffff897e2ed0 -s __modver 0xffffffff897e7698 -s __ex_table 0xffffffff897e76e0 -s .notes 0xffffffff897e8f64 -s .BTF 0xffffffff897e917c -s .BTF_ids 0xffffffff89d007fc -s .data 0xffffffff89e00000 -s __bug_table 0xffffffff8a1a3a80 -s .orc_unwind_ip 0xffffffff8a1c7d14 -s .orc_unwind 0xffffffff8a3e89f4 -s .orc_lookup 0xffffffff8a719d44 -s .vvar 0xffffffff8a75a000 -s .data..percpu 0x0 -s .init.text 0xffffffff8a78f000 -s .init.data 0xffffffff8a806000 -s .x86_cpu_dev.init 0xffffffff8a9d7210 -s .parainstructions 0xffffffff8a9d7238 -s .retpoline_sites 0xffffffff8a9e5d68 -s .altinstructions 0xffffffff8a9f0610 -s .iommu_table 0xffffffff8a9fff98 -s .apicdrivers 0xffffffff8aa00060 -s .exit.text 0xffffffff8aa000a0 -s .smp_locks 0xffffffff8aa02000 -s .data_nosave 0xffffffff8aa0d000 -s .bss 0xffffffff8aa0e000 -s .brk 0xffffffff8b000000 -s .init.scratch 0xffffffff8b200000
    &”add-symbol-file c:/KernelCache/5.18.10-200.fc36.x86_64.kernel/vmlinux 0xffffffff88000000 -s .rodata 0xffffffff89200000 -s .pci_fixup 0xffffffff8977d7a0 -s .tracedata 0xffffffff89780e40 -s __ksymtab 0xffffffff89780eb8 -s __ksymtab_gpl 0xffffffff89793134 -s __ksymtab_strings 0xffffffff897a5ec0 -s __init_rodata 0xffffffff897e2ca0 -s __param 0xffffffff897e2ed0 -s __modver 0xffffffff897e7698 -s __ex_table 0xffffffff897e76e0 -s .notes 0xffffffff897e8f64 -s .BTF 0xffffffff897e917c -s .BTF_ids 0xffffffff89d007fc -s .data 0xffffffff89e00000 -s __bug_table 0xffffffff8a1a3a80 -s .orc_unwind_ip 0xffffffff8a1c7d14 -s .orc_unwind 0xffffffff8a3e89f4 -s .orc_lookup 0xffffffff8a719d44 -s .vvar 0xffffffff8a75a000 -s .data..percpu 0x0 -s .init.text 0xffffffff8a78f000 -s .init.data 0xffffffff8a806000 -s .x86_cpu_dev.init 0xffffffff8a9d7210 -s .parainstructions 0xffffffff8a9d7238 -s .retpoline_sites 0xffffffff8a9e5d68 -s .altinstructions 0xffffffff8a9f0610 -s .iommu_table 0xffffffff8a9fff98 -s .apicdrivers 0xffffffff8aa00060 -s .exit.text 0xffffffff8aa000a0 -s .smp_locks 0xffffffff8aa02000 -s .data_nosave 0xffffffff8aa0d000 -s .bss 0xffffffff8aa0e000 -s .brk 0xffffffff8b000000 -s .init.scratch 0xffffffff8b200000\n”
    ~”add symbol table from file \”c:/KernelCache/5.18.10-200.fc36.x86_64.kernel/vmlinux\” at\n”
    ~”\t.text_addr = 0xffffffff88000000\n”
    ~”\t.rodata_addr = 0xffffffff89200000\n”
    ~”\t.pci_fixup_addr = 0xffffffff8977d7a0\n”
    ~”\t.tracedata_addr = 0xffffffff89780e40\n”
    ~”\t__ksymtab_addr = 0xffffffff89780eb8\n”
    ~”\t__ksymtab_gpl_addr = 0xffffffff89793134\n”
    ~”\t__ksymtab_strings_addr = 0xffffffff897a5ec0\n”
    ~”\t__init_rodata_addr = 0xffffffff897e2ca0\n”
    ~”\t__param_addr = 0xffffffff897e2ed0\n”
    ~”\t__modver_addr = 0xffffffff897e7698\n”
    ~”\t__ex_table_addr = 0xffffffff897e76e0\n”
    ~”\t.notes_addr = 0xffffffff897e8f64\n”
    ~”\t.BTF_addr = 0xffffffff897e917c\n”
    ~”\t.BTF_ids_addr = 0xffffffff89d007fc\n”
    ~”\t.data_addr = 0xffffffff89e00000\n”
    ~”\t__bug_table_addr = 0xffffffff8a1a3a80\n”
    ~”\t.orc_unwind_ip_addr = 0xffffffff8a1c7d14\n”
    ~”\t.orc_unwind_addr = 0xffffffff8a3e89f4\n”
    ~”\t.orc_lookup_addr = 0xffffffff8a719d44\n”
    ~”\t.vvar_addr = 0xffffffff8a75a000\n”
    ~”\t.data..percpu_addr = 0x0\n”
    ~”\t.init.text_addr = 0xffffffff8a78f000\n”
    ~”\t.init.data_addr = 0xffffffff8a806000\n”
    ~”\t.x86_cpu_dev.init_addr = 0xffffffff8a9d7210\n”
    ~”\t.parainstructions_addr = 0xffffffff8a9d7238\n”
    ~”\t.retpoline_sites_addr = 0xffffffff8a9e5d68\n”
    ~”\t.altinstructions_addr = 0xffffffff8a9f0610\n”
    ~”\t.iommu_table_addr = 0xffffffff8a9fff98\n”
    ~”\t.apicdrivers_addr = 0xffffffff8aa00060\n”
    ~”\t.exit.text_addr = 0xffffffff8aa000a0\n”
    ~”\t.smp_locks_addr = 0xffffffff8aa02000\n”
    ~”\t.data_nosave_addr = 0xffffffff8aa0d000\n”
    ~”\t.bss_addr = 0xffffffff8aa0e000\n”
    ~”\t.brk_addr = 0xffffffff8b000000\n”
    ~”\t.init.scratch_addr = 0xffffffff8b200000\n”
    ~”(y or n) [answered Y; input not from terminal]\n”
    ~”Reading symbols from c:/KernelCache/5.18.10-200.fc36.x86_64.kernel/vmlinux…\n”
    ^done
    -gdb-version
    ~”GNU gdb (GDB) 12.1\n”
    ~”Copyright (C) 2022 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    ~”\nType \”show copying\” and \”show warranty\” for details.\n”
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=x86_64-linux-gnu\”.\n”
    ~”Type \”show configuration\” for configuration details.\n”
    ~”For bug reporting instructions, please see:\n”
    ~”<https://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/software/gdb/documentation/&gt;.”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”\n\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”,”data-disassemble-a-option”]
    -gdb-set verbose on
    ^done
    -gdb-set disassembly-flavor intel
    ^done
    -gdb-set print demangle off
    ^done
    -gdb-set architecture i386:x86-64
    ~”The target architecture is set to \”i386:x86-64\”.\n”
    ^done
    info target
    &”info target\n”
    ~”Symbols from \”C:\\Program Files (x86)\\Sysprogs\\VisualKernel\\KernelTools\\amd64\\dummy.elf\”.\n”
    ^done
    -break-insert -f /tmp/VisualKernel/c/Dev/Linux/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36_main.c:8
    &”warning: could not convert ‘/tmp/VisualKernel/c/Dev/Linux/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36_main.c’ from the host encoding (CP1252) to UTF-32.\nThis normally should not happen, please file a bug report.”
    &”\n”
    &”No source file named /tmp/VisualKernel/c/Dev/Linux/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36_main.c.\n”
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”/tmp/VisualKernel/c/Dev/Linux/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36_main.c:8″,times=”0″,original-location=”/tmp/VisualKernel/c/Dev/Linux/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36/LinuxKernelModuleFedora36_main.c:8″}
    -break-delete 1
    ^done
    -break-insert -f LinuxKernelModuleFedora36_main.c:8
    &”No source file named LinuxKernelModuleFedora36_main.c.\n”
    ^done,bkpt={number=”2″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”LinuxKernelModuleFedora36_main.c:8″,times=”0″,original-location=”LinuxKernelModuleFedora36_main.c:8″}
    -target-select remote :55572
    ^error,msg=”Remote communication error. Target disconnected.: (undocumented errno 10061).”

    — Linux 5.18.10-200.fc36.x86_64 —
    VisualGDB has hooked printk() and will display its output in this window.
    You can disable this in VisualGDB Project Properties.

     

    I really wanted your product to work, But I’m struggling to get it to work no matter what setting i use…..

    • This reply was modified 1 month, 2 weeks ago by  subvert.
    #33002

    support
    Keymaster

    Unfortunately, it is hard to suggest anything specific based on the description you provided.
    In order for us to provide any help with this, we need to be able to reproduce the problem on our side.
    Please provide complete and detailed steps to reproduce the issue as described below:

    1. The steps should begin with launching Visual Studio. They should include every step necessary to create the project from scratch and reproduce the issue.
    2. Please make sure the steps do not involve any 3rd-party code as we will not be able to review it. If the problem only happens with a specific project, please make sure you can reproduce it on a clean project created from scratch.
    3. The steps should include uncropped screenshots of all wizard pages, VisualKernel Project Properties pages and any other GUI involved in reproducing the problem. This is critical for us to be able to reproduce the problem on our side.

    You can read more about the best way to report VisualGDB/VisualKernel issues in our problem reporting guidelines, If you do not wish to document the repro steps and save the screenshots, please consider recording a screen video instead and sending us a link to it.

    Please note that many VisualKernel issues are caused by selecting an incompatible combination of settings at some point. We are generally not able to review specific projects and find the specific settings that were set incorrectly. We recommend checking the projects into source control and keeping a track of all changed settings to avoid breaking the projects.

    You can also try checking various diagnostic output from various parts of VisualGDB/VisualKernel as described on this page. Although we won’t be able to review it for a specific project unless the we can reproduce the problem from scratch, checking it might provide some clues on what is causing the unexpected behavior.

    #33003

    subvert
    Participant

     

     

    Steps to reproduce:

    1. Download the latest Ubuntu (22.04) or Ubuntu 18.04, and install it as a VM in virt-manager, and install a Windows 10 as a VM in virt-manager.
    2. Install VS2019 and VisualKernel 4.0 or 3.1r9, to reproduce the problem of ” Linux Kernel Module Wizard” not showing up as a template when trying to create a new project in VS2019
    3. Install VS2022 and VisualKernel 3.1r9, to reproduce the problem of ” Linux Kernel Module Wizard” not showing up as a template when trying to create a new project in VS2022
    4. Install VS2022 and VisualKernel 4.0 in Windows 10 to finally be able to create a linux kernel module project
    5. Create new Linux Kernel Module Wizard project in VS2022
    6. Select Hello World
    7. Setup a new target for running kernels -> Target a physical x86/x64 -> Create a new ssh connection (And obviously check beforehand that you can actually ssh to target)
    8. Build settings:
    9. Selecting next will now reproduce the problem of smart device error:
    10. Now uncheck the download symbol box to pass this stage, or use the debug ready Fedora 36 that you guys provide as a debug ready VM instead of Ubuntu, and give it to virt-manager and do the steps again, doing this will not give the smart device error at this stage
    11. Keep the default settings in source code access (store source files on windows computer)
    12. In Debug Settings, if you select  “Debug a physical machine over network”, you cannot debug it as it gives the “Cannot build kgdboe”, this happened in fedora 36, Ubuntu 18, 22, cannot build it anywhere, even after installing the build essentials.
    13. Selecting “Debug a physical machine over a COM port” and selecting any COM port on Linux and Windows machine and any named pipe, will give the “Failed to start GDB session” error i mentioned above.
    • This reply was modified 1 month, 1 week ago by  subvert.
    • This reply was modified 1 month, 1 week ago by  subvert.
    • This reply was modified 1 month, 1 week ago by  subvert.
    #33007

    subvert
    Participant

    Note that I’m not sure whether or not installing the Ubuntu/Windows as a VM in virt-manager vs actually having two separate computers will make any difference or not, but i mentioned it just to be clear what my current situation is.

    One thing i suspect is the COM ports, can i just select any available COM port that is presented to my in VisualKernel, both in the target Linux and the Windows machine? Tried selecting the first and second COM port for both the machines, but no luck. When i use COM port for communication, do i need to do anything in my host machine, which is a fedora 36 silverblue? This part really confuses me because aren’t i already connected to the target using ssh? why do i need COM communication if i already selected ssh as a connection method before?

    • This reply was modified 1 month, 1 week ago by  subvert.
    #33009

    support
    Keymaster

    Yes, installing VisualKernel inside a QEMU Windows VM running in a Linux machine very likely interferes with the target connection.

    Such setup will require non-trivial QEMU configuration to ensure that the debug transport you would like to use works reliably between the Windows VM and the target. It is something for you figure out – VisualKernel cannot automatically do it from within a VM. In general, please make sure you can manually debug the target kernel by running gdb on the Windows machine manually (without loading the symbols for the kernel/modules). If not, please resolve your target communication issues before attempting to use VisualKernel.

    Also, the “Cannot complete the smart archive without closing the ‘source’ area” error could be shown incorrectly if a different error prevents VisualKernel from downloading the kernel sources. We have fixed it internally: VisualKernel will display the correct error message starting from the next build. In Beta 1, you can find out the actual error via View->Other Windows->VisualKernel Diagnostics Console.

    #33010

    subvert
    Participant

    But considering that VisualKernel has an option to debug a remote physical machine (selecting  Target a physical x86/x64 machine in Target Type section), then isn’t that exactly the same thing that i am doing? These two VMs in virt-manager are basically two separate machines, so how is this different? I basically need to debug a remote machine from my windows 10 VM..

    #33025

    subvert
    Participant

    Update:

     

    Alright, just in case someone comes upon this thread, this is my final setting which worked:

    I Uninstalled VisualKernel 4.0 and installed 3.1r9 just for one last try, and somehow this time it did install completely on VS2019 and i was able to create a Linux kernel module project. I’m not sure why Linux kernel module template didn’t appear last time i installed 3.1r9.

    Now this time i selected the hello world, and then used KGDBoE with the default setting, and used Ubuntu 16.04 VM as the target machine.

    This time, KGDBoE worked and i was able to debug the code without any issues so far.

    As to why all of the sudden everything works, and how is KGDBoE working even tho when i try to insmod it manually it gives me “invalid parameters” error, i really don’t know, i guess it was the combination of using VS2022 with VisualKernel 4, which both are farily new and one is still in Beta.

     

     

    Another side note:

    Coming from a Windows driver development world, I’m fairly impressed with this project, because compared to debugging windows drivers, the experience so far has been much more efficient in terms of performance (knock on wood). For example, single stepping through source code when using visual studio with a target windows machine is much more slower compared to when i use VisualKernel on a target Linux machine.

    • This reply was modified 1 month, 1 week ago by  subvert.
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.