Wednesday, March 5, 2014

creating a local vm easily and automatically

This is the nifty little snippet I use to create a quick and dirty VM for testing. Just apt-get install vmbuilder and run the following:

NAME="ubuntu"
vmbuilder kvm ubuntu --arch 'amd64' --suite 'precise' \
--rootsize '8096' \
--mem '1024' \
--components 'main,universe' \
--addpkg vim  \
--addpkg openssh-server  \
--addpkg bash-completion  \
--user 'ubuntu'  --pass 'ubuntu' \
-d /var/lib/libvirt/images/${NAME} \
--libvirt qemu:///system \
-o \
-v --debug \
--hostname ${NAME}

If you need additional help consult:
https://help.ubuntu.com/12.04/serverguide/jeos-and-vmbuilder.html

No comments:

Post a Comment