0

steps to create virtual machine in CentOS

I need to create a new virtual machine from command-line itself. Is it possible, how to set IP and other basic setups.

CentOS Virtual-machine Add a comment
david
asked May 08 2017

Answer

0

Run the below command to create a new virtual machine as required.

# virt-install --name=CentOS-VM --disk path=/dev/sda10 --graphics spice --vcpu=1 --ram=1024 --location=/home/user1/Documents/CentOS-6.8-x86_64-bin-DVD1.iso --network bridge=virbr0

Here,

--name is for defining specific name for VM

--disk path is for destination of VM stored

--graphics which is spice as a default for KVM

--vcpu is the number of CPUs

--ram for number of RAM usage

--location is where the .iso is located

--network refers to the Bridged one.

Thus it will start creating a new VM and continue with respective Console.

Add a comment
jagannatharumugam
asked May 08 2017
edited Oct 05 2018
Post your Answer