install url --url="http://mirror.centos.org/centos/7/os/x86_64/" lang en_US.UTF-8 keyboard --vckeymap=us --xlayouts='us' timezone Europe/Berlin --isUtc network --device=eth0 --bootproto=dhcp --activate network --hostname=localhost.localdomain firewall --enable --ssh services --enabled=NetworkManager,sshd,chronyd selinux --disabled auth --enableshadow --passalgo=sha512 rootpw vagrant text skipx clearpart --all --initlabel zerombr autopart bootloader --location=mbr firstboot --disabled reboot %packages --ignoremissing --excludedocs @core chrony openssh-clients openssh-server sudo %end %post # disable unnecessary services chkconfig acpid off chkconfig auditd off chkconfig blk-availability off chkconfig bluetooth off chkconfig certmonger off chkconfig cpuspeed off chkconfig cups off chkconfig haldaemon off chkconfig ip6tables off chkconfig lvm2-monitor off chkconfig messagebus off chkconfig mdmonitor off chkconfig rpcbind off chkconfig rpcgssd off chkconfig rpcidmapd off chkconfig yum-updateonboot off # vagrant groupadd vagrant -g 1001 useradd vagrant -g vagrant -G wheel -u 1001 echo "vagrant" | passwd --stdin vagrant # sudo yum install -y sudo echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers yum clean all %end