mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
os-posix: Allow 'chroot' via '-run-with' and deprecate the old '-chroot' option
We recently introduced "-run-with" for options that influence the runtime behavior of QEMU. This option has the big advantage that it can group related options (so that it is easier for the users to spot them) and that the options become introspectable via QMP this way. So let's start moving more switches into this option group, starting with "-chroot" now. Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Ján Tomko <jtomko@redhat.com> Message-Id: <20230703074447.17044-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
@ -4677,11 +4677,12 @@ ERST
|
||||
|
||||
#ifndef _WIN32
|
||||
DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
|
||||
"-chroot dir chroot to dir just before starting the VM\n",
|
||||
"-chroot dir chroot to dir just before starting the VM (deprecated)\n",
|
||||
QEMU_ARCH_ALL)
|
||||
#endif
|
||||
SRST
|
||||
``-chroot dir``
|
||||
Deprecated, use '-run-with chroot=...' instead.
|
||||
Immediately before starting guest execution, chroot to the specified
|
||||
directory. Especially useful in combination with -runas.
|
||||
ERST
|
||||
@ -4868,13 +4869,16 @@ SRST
|
||||
This option is deprecated and should no longer be used. The new option
|
||||
``-run-with async-teardown=on`` is a replacement.
|
||||
ERST
|
||||
#endif
|
||||
#ifdef CONFIG_POSIX
|
||||
DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
|
||||
"-run-with async-teardown[=on|off]\n"
|
||||
" misc QEMU process lifecycle options\n"
|
||||
" async-teardown=on enables asynchronous teardown\n",
|
||||
"-run-with [async-teardown=on|off][,chroot=dir]\n"
|
||||
" Set miscellaneous QEMU process lifecycle options:\n"
|
||||
" async-teardown=on enables asynchronous teardown (Linux only)\n"
|
||||
" chroot=dir chroot to dir just before starting the VM\n",
|
||||
QEMU_ARCH_ALL)
|
||||
SRST
|
||||
``-run-with``
|
||||
``-run-with [async-teardown=on|off][,chroot=dir]``
|
||||
Set QEMU process lifecycle options.
|
||||
|
||||
``async-teardown=on`` enables asynchronous teardown. A new process called
|
||||
@ -4887,6 +4891,10 @@ SRST
|
||||
performed correctly. This only works if the cleanup process is not
|
||||
forcefully killed with SIGKILL before the main QEMU process has
|
||||
terminated completely.
|
||||
|
||||
``chroot=dir`` can be used for doing a chroot to the specified directory
|
||||
immediately before starting the guest execution. This is especially useful
|
||||
in combination with -runas.
|
||||
ERST
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user