大网数据广告活动
Linux 与通用命令

virt-install · 常用命令示例

· 52CE 我爱测

Create virtual machines with libvirt and begin OS installation. > Note: You may need to pass `--connect URI` to the commands or set up the URI in `$XDG_CONFIG_HOME/libvirt/libvirt.conf`. > More information: <https://manned.org/virt-install>.

virt-install

Create virtual machines with libvirt and begin OS installation. Note: You may need to pass --connect URI to the commands or set up the URI in $XDG_CONFIG_HOME/libvirt/libvirt.conf. More information: https://manned.org/virt-install.

  • Create a virtual machine with 1 GB RAM and 12 GB storage and start a Debian installation:

virt-install --memory --disk path=,size=

  • Create a x86-64, KVM-accelerated, UEFI-based virtual machine with the Q35 chipset, 4 GiB RAM, 16 GiB RAW storage, and start a Fedora installation:

virt-install --arch --virt-type --machine --boot --memory --disk path=,size=

  • Create a diskless live virtual machine without an emulated sound device or a USB controller. Don't start an installation and don't autoconnect to console but attach a cdrom to it (might be useful for when using a live CD like tails):

virt-install --memory --disk --controller --sound --autoconsole --install

  • Create a virtual machine with 16 GiB RAM, 250 GiB storage, 8 cores with hyperthreading, a specific CPU topology, and a CPU model that shares most features with the host CPU:

virt-install --cpu ,topology.sockets=,topology.cores=,topology.threads= --memory --disk path=,size=

  • Create a virtual machine and kickstart an automated deployment based on Fedora 43 using only remote resources (no ISO required):

virt-install --memory --disk path=,size= ""

来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
tldr-pages contributors
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。