Our Blog

Latest news and updates from flathost

How To Create VM Manually through command line

Posted by shazim on 02 08 2019. 0 Comments

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 new one

        # cp v1001.xml v1008.xml

Step6:   Edit the XML file 

        # vi v1008.xml

 

Vps hosting

Cheap Linux vps

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 IP address 

 

Best Linux vps

 

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

Step10:   Now You can take ssh of the new 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)

Leave a Reply

Your email address will not be published.