virt-install 安装过程

本文介绍了如何使用virt-install命令行工具创建一个CentOS虚拟机。首先,通过qemu-img创建一个10GB的qcow2磁盘映像。接着,利用virt-install进行安装,指定虚拟机名称、内存大小、CPU数量、ISO镜像路径以及磁盘配置。最后,提到了生成的虚拟机配置文件路径。
摘要由CSDN通过智能技术生成

1:  qemu-img create -f qcow2 first_os.qcow2 10G


2: 

virt-install --name=first_os  --ram=2048 --vcpus=1  --os-type=linux --cdrom=/home/iso/CentOS-6.4-x86_64-bin-DVD1.iso  --disk path=/home/vm1/first_os.qcow2,format=qcow2,size=10  --graphics vnc,listen=0.0.0.0,port=5925   --network network:default 


3:  /etc/libvirt/qemu/first_os.xml


<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE 
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit first_os
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>first_os</name>
  <uuid>80b981dc-0a4d-e6cf-44cc-ffbb8aae12a6</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMe
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值