[root@kvm-91 kvm]# virt-install --help
Options:
--version show program’s version number and exit
-h, --help show this help message and exit
--connect=URI Connect to hypervisor with libvirt URI
##使用libvirt URI连接到虚拟机监控程序
*************************************************************************************
General Options: ##基本选项
-n NAME, --name=NAME
Name of the guest instance
--name=NAME ##虚拟机实例名称
-r MEMORY, --ram=MEMORY
Memory to allocate for guest instance in megabytes
##--ram=MEMORY 为虚拟机实例分配的内存(兆字节)
--vcpus=VCPUS Number of vcpus to configure for your guest. Ex:
--vcpus 5
--vcpus 5,maxcpus=10
--vcpus sockets=2,cores=4,threads=2
## 为虚拟机分配cpu个数
--cpuset=CPUSET Set which physical CPUs domain can use.
##设置可以使用的物理CPU域
--cpu=CPU CPU model and features. Ex: --cpu coreduo,+x2apic
## CPU型号和特点。示例:--cpu Coredou,+x2apic
--description=DESCRIPTION
Human readable description of the VM to store in the
generated XML.
##要存储在生成的XML中的VM的可读描述
--security=SECURITY
Set domain security driver configuration.
##设置域安全驱动程序配置。
--numatune=NUMATUNE
Tune NUMA policy for the domain process.
##调整域进程的NUMA策略。
************************************************************************************************************
Installation Method Options: ##安装方法选项:
-c CDROM, --cdrom=CDROM
CD-ROM installation media
## CD-ROM安装介质
-l LOCATION, --location=LOCATION
Installation source (eg, nfs:host:/path,
http://host/path, ftp://host/path)
--pxe Boot from the network using the PXE protocol
##使用PXE协议从网络引导
--import Build guest around an existing disk image
##在现有的磁盘映像周围构建客户机:--init/path/to/app(包含应用程序)
--init=INIT Path to init binary for container guest. Ex:
--init /path/to/app (to contain an application)
--init /sbin/init (for a full OS container)
##容器来宾的初始化二进制文件的路径。前任:--init/path/to/app(包含应用程序)
--init/sbin/init(对于完整的操作系统容器)
--livecd Treat the CD-ROM media as a Live CD
##将CD-ROM介质视为实时CD
-x EXTRA, --extra-args=EXTRA
Additional arguments to pass to the install kernel
booted from –location
##要传递到从-location引导的安装内核的其他参数
--initrd-inject=INITRD_INJECTIONS
Add given file to root of initrd from --location
--os-type=DISTRO_TYPE
The OS type being installed, e.g. 'linux', 'unix',
'windows'
##正在安装的操作系统类型,
--os-variant=DISTRO_VARIANT
The OS variant being installed guests, e.g. 'fedora6',
'rhel5', 'solaris10', 'win2k'
##正在安装的操作系统变体来宾
--boot=BOOTOPTS Optionally configure post-install boot order, menu,
permanent kernel boot, etc.
****************************************************************************************************************
Storage Configuration: 存储配置:
--disk=DISKOPTS Specify storage with various options. Ex.
--disk path=/my/existing/disk
--disk path=/my/new/disk,size=5 (in gigabytes)
--disk vol=poolname:volname,device=cdrom,bus=scsi,...
##使用各种选项指定存储。
--nodisks Don‘t set up any disks for the guest.
##不要为客人设置任何磁盘
--filesystem=FILESYSTEMS
Pass host directory to the guest. Ex:
--filesystem /my/source/dir,/dir/in/guest
--filesystem template_name,/,type=template
Networking Configuration: ##网络配置
-w NETWORK, --network=NETWORK
Configure a guest network interface. Ex:
--network bridge=mybr0 ##指定网卡
--network network=my_libvirt_virtual_net
--network network=mynet,model=virtio,mac=00:11...
--nonetworks Don’t create network interfaces for the guest.
****************************************************************************************************************
Graphics Configuration: ##图形配置
--graphics=GRAPHICS
Configure guest display settings. Ex:
--graphics vnc
--graphics spice,port=5901,tlsport=5902
--graphics none
--graphics vnc,password=foobar,port=5910,keymap=ja
--noautoconsole Don’t automatically try to connect to the guest
console
##不要自动尝试连接到来宾控制台
*************************************************************************************************************
Device Options: ##设备选项
--serial=SERIALS Configure a guest serial device
##配置来宾串行设备
--parallel=PARALLELS
Configure a guest parallel device
##配置来宾并行设备
--channel=CHANNELS Configure a guest communication channel
##配置来宾通信通道
--console=CONSOLES Configure a text console connection between the guest
and host
##配置来宾和主机之间的文本控制台连接
--host-device=HOSTDEVS
Configure physical host devices attached to the guest
##配置连接到来宾的物理主机设备
--soundhw=SOUNDHW Configure guest sound device emulation
--watchdog=WATCHDOG
Configure a guest watchdog device
--video=VIDEO Configure guest video hardware.
--smartcard=SMARTCARD
Configure a guest smartcard device. Ex:
--smartcard mode=passthrough
--redirdev=REDIRDEV
Configure a guest redirection device. Ex:
--redirdev usb,type=tcp,server=192.168.1.1:4000
--panic=PANIC Configure a guest panic device. Ex:
--panic default
***************************************************************************************************
Virtualization Platform Options: ##虚拟化平台选项
-v, --hvm This guest should be a fully virtualized guest
##此来宾应该是完全虚拟化的来宾
-p, --paravirt This guest should be a paravirtualized guest
--container This guest should be a container guest
--virt-type=HV_TYPE
Hypervisor name to use (kvm, qemu, xen, ...)
##要使用的虚拟机监控程序名称
--arch=ARCH The CPU architecture to simulate
--machine=MACHINE The machine type to emulate
--noapic Disables APIC for fully virtualized guest (overrides
value in os-type/os-variant db)
--noacpi Disables ACPI for fully virtualized guest (overrides
value in os-type/os-variant db)
-u UUID, --uuid=UUID
UUID for the guest.
***************************************************************************************************************
Miscellaneous Options: ##其他选项
--autostart Have domain autostart on host boot up.
##启动主机时让域自动启动
--print-xml Print the generated domain XML rather than define the
guest.
--print-step=XMLSTEP
Print XML of a specific install step (1, 2, 3, all)
rather than define the guest.
--noreboot Don’t boot guest after completing install.
--wait=WAIT Time to wait (in minutes)
--dry-run Run through install process, but do not create devices
or define the guest.
##运行整个安装过程,但不要创建设备或定义来宾
--force Forces 'yes' for any applicable prompts, terminates
for all others
-q, --quiet Suppress non-error output
--prompt Request user input for ambiguous situations or
required options.
-d, --debug Print debugging information
##打印调试信息
KVM虚拟机--virt-install选项解释
最新推荐文章于 2024-04-04 17:13:46 发布
本文详细介绍了virt-install命令的使用方法,包括基本选项、安装方法选项、存储配置、网络配置、图形配置、设备选项、虚拟化平台选项和其他选项。涵盖了如何通过libvirt URI连接虚拟机监控程序,以及如何配置内存、CPU、磁盘、网络接口和图形显示等。
1万+

被折叠的 条评论
为什么被折叠?



