Install virtual machines in one line

2016-07-25 60 words 1 min read

To install a VM from command line, you can use the following command. Change the required parameters as need but you need to change at-least CDROM iso image and disk-path.

virt-install \
    -n myVM \
    --description "Test VM" \
    --os-type=Linux \
        --os-variant=centos7 \
        --ram=2048 \
        --vcpus=2 \
        --disk path=./myVM.img,bus=virtio,size=10 \
        --graphics none \
        --cdrom  <Image installtion CDROM>.iso \
        --net user

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it