如何从CLI创建虚拟机?
创建虚拟机
First, download an ISO cd image of some OS you want to run. For Ubuntu, you can find these at: http://www.ubuntu.com/getubuntu/download Double click on the name of the host. The Status column should read Active Right click on the name of the host, and select New This will start a wizard to guide you through the rest of your VM creation Enter your virtual machine details Name: foo Choose Local install media (ISO image or CDROM), or you can use another method if you know what you're doing Forward Locate your install media Use ISO image Browse to find the ISO you downloaded earlier Optional: Select the matching OS Type Optional: Select the matching Version Forward
主要是为了我自己的教育。
只需使用:
virt-install \
--name vm_name \
--ram=2048 \
--vcpus=2 \
--disk pool=guest_images,size=30,bus=virtio,format=qcow2 \
--cdrom /var/iso/debian.iso \
--network bridge=kvmbr0,model=virtio \
--graphics vnc,listen=0.0.0.0,password=Qwerty1234 \
--boot cdrom,hd,menu=on
哪里/var/iso/debian.iso
-ISO映像的路径
guest_images
-磁盘池,您需要在vm之前创建它
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句