title Ubuntu Lucid KVM Notes user strick ip 216.239.45.4 vol 1 lock ******** /pre( $ kvm-ok INFO: Your CPU supports KVM extensions INFO: /dev/kvm exists KVM acceleration can be used $ uname -a Linux pdp11 2.6.32-24-serer #43-Ubuntu SMP Thu Sep 16 16:05:42 UTC 2010 x86_64 GNU/Linux /pre) /subsection Creating a VM named "creat" /pre( $ virt-install -n creat -r 500 \ -f creat.img -s 10 \ -c /opt/ubuntu-10.04.1-server-amd64.iso --accelerate \ --connect=qemu:///system --vnc --noautoconsole -v /pre) /list( * "-n creat" means the name will be creat * "-r 500" means 500 MB Ram * The file "creat.img" is created with size 10 GB. * The named /opt/ubuntu...iso is the CD we boot from * The VM uses 127.0.0.1:5900 for its VNC port. * The final "-v" is "full" (not "para") virtualization /list) /subsection Shortcut to virsh. "v help" /pre( $ cat /usr/local/bin/v set -x exec virsh --connect qemu:///system "$@" /pre) /subsection lvcreate lv-creat-2 /pre( root@pdp11:~/creat-vm# lvcreate -n lv-creat-2 --size=31G pdp11 Logical volume "lv-creat-2" created $ dd bs=64k if=creat.img of=/dev/pdp11/lv-creat-2 # v list --all ++ exec virsh --connect qemu:///system list --all Id Name State ---------------------------------- - creat shut off - ubuntu shut off # virt-viewer creat /pre) ====================================== Static IPs: 173.8.190.56 173.8.190.57 173.8.190.58 173.8.190.59 Gateway: 173.8.190.62 Netmask: 255.255.255.240 Comcast DNS: 68.87.76.178 (primary) 66.240.48.9 (secondary) /subsection =============================== lvcreate --size 80G --name eniac_all_m vg01010m mount /dev/vg01010m/eniac_all_m /m/eniac_all_m root@pdp11:/m/eniac_all_m# lvextend -L +30G /dev/vg01010m/eniac_all_m /dev/sdb4 / Extending logical volume eniac_all_m to 110.00 GiB / Logical volume eniac_all_m successfully resized http://intodns.com/yak.net /tt ssh -vAX -L5900:127.0.0.1:5900 -L5901:127.0.0.1:5901 root@pdp11.yak.net /subsection Poor Man's Bridge, using DNAT & SNAT. Allow private 192.168.122.9 (a Kvm Guest in /link http://libvirt.org/formatdomain.html#elementsNICSVirtual Virtual Network configuration ) to be available to the world as 173.8.190.58 (a public IP we have). It will not be visible to the Kvm Host at that address; instead the Kvm Host sees itself there. /box( /pre( ifconfig eth0:1 netmask 255.255.255.255 173.8.190.58 : iptables -F -v -t nat ## Dont do this -- guests can access outer internet (for dns, updates). iptables -t nat -I PREROUTING -i eth0 -d 173.8.190.58 -j DNAT --to-destination 192.168.122.9 iptables -t nat -I POSTROUTING -o eth0 -s 192.168.122.9 -j SNAT --to-source 173.8.190.58 iptables -I FORWARD -i eth0 -d 192.168.122.9 -j ACCEPT iptables -I FORWARD -o eth0 -s 173.8.190.58 -j ACCEPT /pre) /box) /subsection Limit DHCP space to the 200's. /box( /pre( root@pdp11:~# cat /etc/libvirt/qemu/networks/default.xml default /pre) /box) /subsection NEPAL /box( /pre( virt-install -n nepal -r 500 \ -f /dev/vg01010m/nepal_lv \ -c /opt/ubuntu-10.04.1-server-amd64.iso \ --accelerate --connect=qemu:///system --vnc --noautoconsole -v \ ## /pre) /box) On a new box: /list( * Set root password * Configure sshd, ssh * Reboot * apt-get update * apt-get upgrade /list) /box( http://www.debian-administration.org/users/endecotp/weblog/2 /i Posted by daemon (155.232.xx.xx) on Wed 11 Jul 2007 at 22:32 I'll try and get in here before anyone else does: Use iproute. For this kind of job, using iproute really is much easier, so instead of: ifconfig eth0:0 netmask 255.255.255.224 x.y.z.2 you would use: ip addr add x.y.z.2/27 dev eth0 which you can also stick in your /etc/network/interfaces with a post-up command... /box) /link https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/%20RedHatEnterpriseLinuxAndFedora cmp(Ubuntu,RedHat) /i update-rc.d - install and remove System-V style init script links /section VPN for Android Phone * http://rootmanager.com/ubuntu-ipsec-l2tp-windows-domain-auth/setting-up-openswan-xl2tpd-with-native-windows-clients.html * http://www.jacco2.dds.nl/networking/freeswan-l2tp.html * http://www.linuxquestions.org/questions/linux-networking-3/ipsec-l2tp-vpn-server-on-ubuntu-for-iphone-