Last active
June 2, 2016 13:33
-
-
Save abythell/5249453 to your computer and use it in GitHub Desktop.
Bash script to automatically install and configure Xen 4.1 on Ubuntu Server 12.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Setup and configure Xen DomU | |
# Run as root/sudo on a fresh Ubuntu Server 12.04 LTS install. Reboot when complete. | |
# Update | |
apt-get update | |
apt-get upgrade | |
# Install Xen hypervisor | |
apt-get install xen-hypervisor-amd64 | |
sed -i 's/GRUB_DEFAULT=.*\+/GRUB_DEFAULT="Xen 4.1-amd64"/' /etc/default/grub | |
sed -i 's/TOOLSTACK=.*\+/TOOLSTACK="xm"/' /etc/default/xen | |
# Setup bridge network interface | |
cat >> /etc/network/interfaces << EOL | |
#Xen Bridge | |
auto xenbr0 | |
iface xenbr0 inet dhcp | |
bridge_ports eth0 | |
EOL | |
# Limit Dom0 memory to 512M | |
echo 'GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=512M"' >> /etc/default/grub | |
update-grub | |
#Allow VNC connections from anywhere | |
sed -i "s/#(vnc-listen.*/(vnc-listen \'0.0.0.0\')/" /etc/xen/xend-config.sxp | |
#Fix keymap issue | |
ln -s /usr/share/qemu-linaro/ /usr/share/qemu/ |
Thanks for the script! Was following another guide and stumbled across yours -- gonna save me a lot of time! ;_;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit line 24 to set the amount of memory assigned to dom0.