virtme-ng
raw JSON → 1.41 verified Mon Apr 27 auth: no python
Build and run a kernel inside a virtualized snapshot of your live system. Current version: 1.41. Released approximately weekly.
pip install virtme-ng Common errors
error ImportError: cannot import name 'VirtmeNGConfig' from 'virtme_ng' ↓
cause Trying to import VirtmeNGConfig from the top-level virtme_ng package instead of virtme_ng.run.
fix
Use 'from virtme_ng.run import VirtmeNGConfig'.
error vng: error:argument --exec: not allowed with positional arguments ↓
cause Using --exec together with a command string after vng, which became mutually exclusive in v1.36.
fix
Use the -- syntax: vng -- uname -r instead of vng --exec uname -r.
error virtme-ng: error: --console and --exec are mutually exclusive ↓
cause Trying to use both --console and --exec options at the same time.
fix
Choose either interactive console or exec command, not both.
Warnings
breaking In v1.36, --exec and positional arguments became mutually exclusive. Using both will raise an error. ↓
fix Separate command and arguments using -- syntax: vng -- uname -r instead of vng --exec uname -r
deprecated The virtme-ng-init repository has been merged into main project as of v1.33. Old git submodule references are obsolete. ↓
fix Run `git submodule deinit virtme-ng-init` and `git rm virtme-ng-init` to clean up old submodule.
gotcha Default SSH transport uses vsock; if guest lacks vsock support, SSH will fail. ↓
fix Use `--ssh` option to force legacy TCP SSH, or ensure kernel has vsock support.
gotcha Stale file handle errors (ESTALE) were common with virtiofsd before v1.38. If you see this, upgrade. ↓
fix Upgrade to v1.38 or later.
Install
pip install virtme-ng[full] Imports
- VirtmeNGConfig wrong
from virtme_ng import VirtmeNGConfigcorrectfrom virtme_ng.run import VirtmeNGConfig
Quickstart
from virtme_ng.run import VirtmeNGConfig, VirtmeNGRunner
config = VirtmeNGConfig(kernel_path='/path/to/bzImage', rootfs='/path/to/rootfs', memory='512M', cpus=2)
runner = VirtmeNGRunner(config)
runner.run()