You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Copy file name to clipboardexpand all lines: mantle/cmd/kola/qemuexec.go
+10-3
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,9 @@ var (
70
70
sshCommandstring
71
71
72
72
additionalNicsint
73
+
74
+
netbootstring
75
+
netbootDirstring
73
76
)
74
77
75
78
constmaxAdditionalNics=16
@@ -97,7 +100,8 @@ func init() {
97
100
cmdQemuExec.Flags().StringVarP(&consoleFile, "console-to-file", "", "", "Filepath in which to save serial console logs")
98
101
cmdQemuExec.Flags().IntVarP(&additionalNics, "additional-nics", "", 0, "Number of additional NICs to add")
99
102
cmdQemuExec.Flags().StringVarP(&sshCommand, "ssh-command", "x", "", "Command to execute instead of spawning a shell")
100
-
103
+
cmdQemuExec.Flags().StringVarP(&netboot, "netboot", "", "", "Filepath to BOOTP program (e.g. PXELINUX/GRUB binary or iPXE script")
104
+
cmdQemuExec.Flags().StringVarP(&netbootDir, "netboot-dir", "", "", "Directory to serve over TFTP (default: BOOTP parent dir). If specified, --netboot is relative to this dir.")
0 commit comments