How To Create VM Manually through command line

Step1: Create raw file ( There are two partitioning types LVM and Raw ) 

        # qemu-IMG create -f raw v1008. raw 30G

Step2: Convert image file to raw format

        # qemu-img convert -f raw -O raw /var/virtualizor/kvm/centos-7.1-x86_64. img 


Step3: Assign password for the VM

        # virt-sysprep -a /home/v1008.raw –root-password password:india123

Step4: Go to qemu XML location

        #cd /etc/libvirt/qemu/

Step5: Copy Old XML file with a new one

        # cp v1001.xml v1008.xml

Step6: Edit the XML file 

        # vi v1008.xml

 vi v1008.xml

vi v1008.xml

Step7: LOGIN virtual shell 

            NOTE: ( virsh for KVM server / vzctl for Openvz server / pct for Proxmox server )

   # virsh

Step8: Start the VM

    # Create /etc/libvirt/qemu/v1008.xml

Step9: Now take VNC access via VNC viewer and assign an IP address 

 VNC access


Take server IP, port and password from a qemu XML file as shown in Image. (Require for VNC Viewer)

Step10: Now You can take ssh of the newly created VM.

Step11: For listing all created VMs

#virsh (Go to virsh)

# list (For listing)

# shutdown vid or #destroy vid (For turn off the VM)

Tags: Cheap VPS, Indian VPS, Linux VPS

Open chat