Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g0053/a8940dd59e4bdf8d1d93afa71da6ae94 to your computer and use it in GitHub Desktop.
Save g0053/a8940dd59e4bdf8d1d93afa71da6ae94 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