Virtualization: Difference between revisions

From Hack Sphere Labs Wiki
Jump to navigation Jump to search
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
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# and how to activate them. For more information, see interfaces(5).
 
 
# The loopback network interface
# The loopback network interface
auto lo br0
auto lo
iface lo inet loopback
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


# Set up interfaces manually, avoiding conflicts with, e.g., network manager
# The loopback network interface
iface eth0 inet manual
auto lo
iface lo inet loopback


iface eth1 inet manual
# The primary network interface
auto eth0
iface eth0 inet manual


# Bridge setup
# Network bridge
iface br0 inet dhcp
auto br0
        bridge_ports eth0 eth1
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

Notes

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.

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
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 
Template error: are you trying to use the = sign? Visit Help:Template#Escape template-breaking characters for workarounds.

or something using ethernet aliases:

 /etc/network/interfaces 
Template error: are you trying to use the = sign? Visit Help:Template#Escape template-breaking characters for workarounds.

You then need to edit /etc/xen/xend-config.sxp

Fuck

http://vimeo.com/38636349

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

Xen

http://wiki.debian.org/Xen