Infrastructure Team/Template virtual machine lucid: Difference between revisions
Created page with 'This procedure documents how our template Karmic image was created and configured == VM Creation == virt-install --prompt -v --accelerate --nographics -x console=ttyS0,115200 …' |
m moved Walter is a wanker 11/Template virtual machine lucid to Infrastructure Team/Template virtual machine lucid over redirect: revert |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 4: | Line 4: | ||
virt-install --prompt -v --accelerate --nographics -x console=ttyS0,115200 \ | virt-install --prompt -v --accelerate --nographics -x console=ttyS0,115200 \ | ||
--name template- | --name template-lucid --vcpus=4 --ram $((1*1024)) \ | ||
--os-type=linux --os-variant=ubuntujaunty --network bridge:br0 \ | --os-type=linux --os-variant=ubuntujaunty --network bridge:br0 \ | ||
--disk path=/srv/vm/template- | --disk path=/srv/vm/template-lucid.qcow2,bus=virtio,sparse=true,size=10 \ | ||
--location http://ubuntu.media.mit.edu/ubuntu/dists/ | --location http://ubuntu.media.mit.edu/ubuntu/dists/lucid/main/installer-amd64/ | ||
ip adresse: 140.186.70.109 | |||
We install with the minimun of needed package setup: | |||
* ubuntu basic server -> since we use ubuntu server, we want ubuntu basic | |||
* openssh server -> for remote access | |||
After installation: | After installation: | ||
virsh start --console template- | virsh start --console template-lucid | ||
| Line 19: | Line 25: | ||
sudo -i | sudo -i | ||
aptitude install etckeeper bash-completion git-core strace munin-node duplicity postfix vim devtodo | aptitude install etckeeper bash-completion git-core strace munin-node duplicity postfix vim devtodo | ||
aptitude purge memtest86+ | aptitude purge memtest86+ | ||
update-alternatives --set editor /usr/bin/vim.basic | update-alternatives --set editor /usr/bin/vim.basic | ||
<- template-lucid changes | |||
* Remove restricted repositories from /etc/apt/sources.list (fsf asks us to avoid using non-free software). | * Remove restricted repositories from /etc/apt/sources.list (fsf asks us to avoid using non-free software). | ||
| Line 43: | Line 52: | ||
netmask 16 | netmask 16 | ||
gateway ::192.88.99.1 | gateway ::192.88.99.1 | ||
local 140.186.70. | local 140.186.70.109 | ||
endpoint any | endpoint any | ||
Add these to /etc/sudoers: | Add these to /etc/sudoers: | ||
#bernie: forward agent | #bernie: forward agent | ||
Defaults env_keep += "SSH_AUTH_SOCK" | Defaults env_keep += "SSH_AUTH_SOCK" | ||
# Uncomment to allow members of group sudo to not need a password | # Uncomment to allow members of group sudo to not need a password | ||
# (Note that later entries override this, so you might need to move | # (Note that later entries override this, so you might need to move | ||
| Line 62: | Line 72: | ||
ln -sf /usr/src/devtools/sysadm/zzz_profile.sh /etc/profile.d/zzz_profile.sh | ln -sf /usr/src/devtools/sysadm/zzz_profile.sh /etc/profile.d/zzz_profile.sh | ||
ln -sf /usr/src/devtools/conf/vimrc /etc/vim/vimrc.local | ln -sf /usr/src/devtools/conf/vimrc /etc/vim/vimrc.local | ||
vim /etc/bash.bashrc # enable bash_completion, kill code messing with PS1 | vim /etc/bash.bashrc # enable bash_completion, kill code messing with PS1 | ||
vim /etc/profile # set umask 002, kill code messing with PS1 | vim /etc/profile # set umask 002, kill code messing with PS1 | ||
| Line 69: | Line 79: | ||
passwd # set a password for root, to be used to log in from the console only | passwd # set a password for root, to be used to log in from the console only | ||
adduser bernie | adduser bernie | ||
adduser dogi | adduser dogi | ||
| Line 121: | Line 131: | ||
== See also == | == See also == | ||
* [[ | * [[Sysadmin/Add virtual machine]] | ||
* [[ | * [[Sysadmin/Delete virtual machine]] | ||
* [[ | * [[Sysadmin/Template_virtual_machine]] | ||