Skip to content

Instantly share code, notes, and snippets.

@skamithi
Created September 6, 2014 19:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save skamithi/9461ac1e59b26aeea83b to your computer and use it in GitHub Desktop.
Save skamithi/9461ac1e59b26aeea83b to your computer and use it in GitHub Desktop.
creating vms using virt-builder and virt-install on ubuntu 14.04
! add current user to kvm group
usermod -a -G kvm skamithi
! create root password file
cat 'mypass' > /tmp/rootpw
! update soon with run-command to run 'dpkg-reconfigure openssh-server' to regenerate ssh keys
! without this you get a ssh reset peer message
virt-builder ubuntu-14.04 --root-password file:/tmp/rootpw -o ubuntu1404.qcow2 --format qcow2 --size 10G --hostname ubuntu1404
! install created disk into virt management
virt-install --name ubu --ram 1024 --vcpus=4 --disk path=/home/skamithi/vms/ubuntu1404.qcow2,format=qcow2,cache=none --import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment