How To Create VM Manually through command line

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 

/home/v1008.raw

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

Summary
How To Create VM Manually Through Command Line?
Article Name
How To Create VM Manually Through Command Line?
Description
Start a virtual machine from the command line, use the VMware command. See Using the VMware Command. You can start a virtual machine from the VM menu or from the toolbar. When you operate the VM menu, you could pick out a smooth or tough strength choice or start the virtual device in BIOS setup mode.
Author
Publisher Name
Ideastack
Publisher Logo
Tags: ,

Leave a Reply

Your email address will not be published.