Difference between revisions of "Virtualization"
From Hack Sphere Labs Wiki
(→Notes) |
(→Configure) |
||
Line 35: | Line 35: | ||
==Configure== | ==Configure== | ||
Debian wiki states that the network control scripts that come with Xen are going to be phased out eventually. Goes on to say that you should setup networking yourself. | Debian wiki states that the network control scripts that come with Xen are going to be phased out eventually. Goes on to say that you should setup networking yourself. | ||
+ | |||
+ | {{Note| You need to zero out your eth0 connection or the bridge will disable eth0.}} | ||
+ | Something like: | ||
+ | ifconfig eth0 0.0.0.0 | ||
aptitude install bridge-utils | aptitude install bridge-utils | ||
Line 47: | Line 51: | ||
{{File| /etc/network/interfaces | content= | {{File| /etc/network/interfaces | content= | ||
− | + | # This file describes the network interfaces available on your system | |
− | + | # and how to activate them. For more information, see interfaces(5). | |
− | + | ||
− | + | # The loopback network interface | |
− | + | auto lo | |
− | + | iface lo inet loopback | |
+ | |||
+ | # The primary network interface | ||
+ | iface eth0 inet manual | ||
+ | #allow-hotplug eth0 | ||
+ | #iface eth0 inet static | ||
+ | # address 192.168.0.10 | ||
+ | # netmask 255.255.255.0 | ||
+ | # network 192.168.0.0 | ||
+ | # broadcast 192.168.0.255 | ||
+ | # gateway 192.168.0.1 | ||
+ | # # dns-* options are implemented by the resolvconf package, if installed | ||
+ | # dns-nameservers 192.168.0.1 | ||
+ | |||
+ | auto xenbr0 | ||
+ | iface xenbr0 inet dhcp | ||
+ | bridge_ports eth0 | ||
+ | |||
+ | auto br0 | ||
+ | iface br0 inet static | ||
+ | bridge_ports eth0 | ||
+ | address 192.168.0.10 | ||
+ | netmask 255.255.255.0 | ||
+ | network 192.168.0.0 | ||
+ | broadcast 192.168.0.255 | ||
+ | gateway 192.168.0.1 | ||
+ | # dns-* options are implemented by the resolvconf package, if installed | ||
+ | dns-nameservers 192.168.0.1 | ||
+ | |||
+ | |||
+ | }} | ||
+ | |||
+ | or something using ethernet aliases: | ||
+ | |||
+ | {{File| /etc/network/interfaces | content= | ||
+ | |||
+ | # NETWORK BRIDGE EXAMPLE FOR A DEBIAN SYSTEM WITH A SINGLE NIC | ||
− | + | # The loopback network interface | |
− | + | auto lo | |
+ | iface lo inet loopback | ||
− | + | # The primary network interface | |
+ | auto eth0 | ||
+ | iface eth0 inet manual | ||
− | + | # Network bridge | |
− | + | auto br0 | |
− | + | iface br0 inet static | |
+ | address 11.22.33.2 | ||
+ | network 11.22.33.0 | ||
+ | netmask 255.255.255.192 | ||
+ | broadcast 11.22.33.63 | ||
+ | gateway 11.22.33.1 | ||
+ | bridge_ports eth0 | ||
+ | bridge_stp off | ||
+ | bridge_fd 0 | ||
+ | bridge_maxwait 0 | ||
+ | |||
+ | # Internal networking | ||
+ | auto br0:0 | ||
+ | iface br0:0 inet static | ||
+ | address 10.0.1.2 | ||
+ | netmask 255.255.255.0 | ||
}} | }} | ||
+ | |||
+ | You then need to edit /etc/xen/xend-config.sxp | ||
=Fuck= | =Fuck= |
Revision as of 17:18, 22 July 2012
- HVM is hardware and faster
- PV is Paravirtualization and usually slower
Contents
Notes
- http://serverfault.com/questions/222010/difference-between-xen-pv-xen-kvm-and-hvm
- http://paste.debian.net/180252/
Debian
Xen Config File: /etc/xen/xend-config.sxp
Install
apt-get install xen-linux-system apt-get install xen-qemu-dm-4.0 dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen update-grub
May want to do this eventually to limit dom0 ram:
/etc/default/grub # Xen boot parameters for all Xen boots GRUB_CMDLINE_XEN="dom0_mem=1024M"
then
update-grub
then edit
/etc/xen/xend-config.sxp (dom0-min-mem 1024) (enable-dom0-ballooning no)
You would then need to reboot.
Network Scripts
/etc/xen/scripts/network-bridge /etc/xen/scripts/vif-bridge
Notes
Configure
Debian wiki states that the network control scripts that come with Xen are going to be phased out eventually. Goes on to say that you should setup networking yourself.
Something like:
ifconfig eth0 0.0.0.0
aptitude install bridge-utils brctl addbr br0
- br0 could be anything like: whatever0
ip addr show
- Just to see interfaces
You now need to add interfaces to the bridge
brctl addif br0 eth0 eth1
To make the bridge perm you need to edit /etc/network/interfaces
/etc/network/interfaces
or something using ethernet aliases:
/etc/network/interfaces
You then need to edit /etc/xen/xend-config.sxp
Fuck
- cloudstack.org/
- xcp
- http://www.xvpsource.org/
- openstack
Notes
HyperVM | Free and looks like a great product. Does not work with CentOS 6 because CentOS dropped Xen? |
- Xen XCP
- OpenVZ
- Virtuzzo
- ProxMox
- SolusVM
- vePortal
Most of these can integrate with a billing platform.
- lxcenter.org
kloxo