Skip to content

Instantly share code, notes, and snippets.

@goffinet
Created May 9, 2017 21:08
Show Gist options
  • Select an option

  • Save goffinet/8a856ec7b13507cfd9fa7927cf0d3a19 to your computer and use it in GitHub Desktop.

Select an option

Save goffinet/8a856ec7b13507cfd9fa7927cf0d3a19 to your computer and use it in GitHub Desktop.
ubuntu on scw virt-scripts adaptation
#!/bin/bash
download_install_virt-scripts () {
cd
apt-get -y install git
git clone https://github.com/goffinet/virt-scripts
cd virt-scripts
./autoprep.sh
}
adapt_for_scw () {
cd
cd virt-scripts
sed -i '30s/512/256/' define-guest-image.sh
sed -i '86s/virt/#virt/' define-guest-image.sh
dd if=/dev/zero of=/var/lib/swap1 bs=1M count=4096
mkswap /var/lib/swap1
chmod 600 /var/lib/swap1
swapon /var/lib/swap1
}
get_ubuntu_image () {
cd
wget https://get.goffinet.org/kvm/ubuntu1604.qcow2
mv ubuntu1604.qcow2 /var/lib/libvirt/images/
}
#download_install_virt-scripts
#adapt_for_scw
#get_ubuntu_image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment