Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kola/qemuexec: allow changing guest network #3645

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Commits on Oct 13, 2023

  1. kola/qemuexec: add --netboot option

    For local testing, it's useful to have an easy way to netboot a system.
    Enable this by exposing QEMU's builtin support for TFTP serving and
    BOOTP option.
    
    For iPXE, one can just directly pass the iPXE script. For PXELINUX/GRUB,
    you'll likely want to prepare a netboot directory with your artifacts.
    
    Probably this should be streamlined more in the future, and also deduped
    more with the related bits in `metal.go`. But anyway, for now this is
    immediately useful in helping to test root on iSCSI locally (via iPXE's
    `sanboot` option).
    jlebon committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    a70833e View commit details
    Browse the repository at this point in the history
  2. kola/qemuexec: allow changing guest network

    This is useful when you're nesting VMs and you want the first VM to
    be able to access the host. The default host address that QEMU assigns
    (e.g. 10.0.2.2, modifiable via the `host=...` netdev knob) doesn't
    always work because it's not actually an IP address owned by the host,
    but proxied by QEMU itself.
    
    So the source appears to come from localhost, but in some contexts (e.g.
    iSCSI), we need the host and the guest to agree that the same IP refers
    to the host.
    
    With this, one can start the first VM as usual (e.g. `cosa run`) and the
    second VM within with e.g. `cosa run --usernet-addr 10.0.3.0/24` and be
    able to talk back to the outer VM via the valid address 10.0.2.15.
    
    To be clear, this can all be done with passthrough QEMU args, so this is
    just about making it more convenient.
    jlebon committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    412fa2d View commit details
    Browse the repository at this point in the history