Sunday, January 30, 2011
Saturday, January 29, 2011
Idea for animation
Period of great raise of classical music, time when Mozart, Bach and Beethoven creating their great compositions ... because music have a great power - it is a conductor of magic power. Each composition affect the world according to it's content and feeling, it induct. It's a natural occasion to clip greatest hits of classical music and cartoon interpretation of them.
As the final great battle of good and evil the greatest symphony of Beethoven (good side) save the world from falling into the hell spelled by greatest "bad" wizard Bach. The result of this battle is that music lost it's magic power and can't directly affect reality. This wipe of magic also wipe people's memories and knowledge about magic of music - from heads as well as from books.
As the final great battle of good and evil the greatest symphony of Beethoven (good side) save the world from falling into the hell spelled by greatest "bad" wizard Bach. The result of this battle is that music lost it's magic power and can't directly affect reality. This wipe of magic also wipe people's memories and knowledge about magic of music - from heads as well as from books.
Wednesday, January 26, 2011
Qemu networking with TUN/TAP and forwarding.
Task definition.
Have: Linux desktop with (routed) internet connection.
Want: run (Qemu) KVM with network access from vm to desktop and internet and network access from desktop to vm.
Pre-word.
There is a lot of step-by-step recipes reg. this in the web. The problem is that I hate to use recipes I don't understand. One step aside - and everything break and you don't know what to do. Therefore I'm going to configure network manually. This note is mostly for me - to remember required steps.
Solution.
On the host
1. Create tap device.
host# tunctl -u -g kvm
There is almost no documentation reg. tunctl. This spell had been composed "by example". After this command you must see new network interface tap0 by issuing "ifconfig -a".
2. allow NAT in iptables.
host# iptables -A POSTROUTING -o eth0 -j MASQUERADE
where is network card with WAN connection.
3. allow packet forwarding. Add to /etc/sysctl.conf:
net.ipv4.ip_forward=1
4. activate tap interface before setup routing:
host# ifconfig tap0 0.0.0.0 promisc up
5. to allow connection from host to vm, we need define routing *on the host*:
host# route add -host 192.168.1.2 dev tap0
where 192.168.1.2 is IP address of vm.
On the vm
6. my host IP and my vm IP are in different subnets, therefore I need to define routing to host first:
vm# route add -host dev eth0
I'm able to PING host by IP from vm after this step.
7. and then default gateway:
vm# route add default gw
and I'm able to PING other machines by IP after this step.
8. Now define nameserver in /etc/resolv.conf. The same as on host.
Have: Linux desktop with (routed) internet connection.
Want: run (Qemu) KVM with network access from vm to desktop and internet and network access from desktop to vm.
Pre-word.
There is a lot of step-by-step recipes reg. this in the web. The problem is that I hate to use recipes I don't understand. One step aside - and everything break and you don't know what to do. Therefore I'm going to configure network manually. This note is mostly for me - to remember required steps.
Solution.
On the host
1. Create tap device.
host# tunctl -u
There is almost no documentation reg. tunctl. This spell had been composed "by example". After this command you must see new network interface tap0 by issuing "ifconfig -a".
2. allow NAT in iptables.
host# iptables -A POSTROUTING -o eth0 -j MASQUERADE
where
3. allow packet forwarding. Add to /etc/sysctl.conf:
net.ipv4.ip_forward=1
4. activate tap interface before setup routing:
host# ifconfig tap0 0.0.0.0 promisc up
5. to allow connection from host to vm, we need define routing *on the host*:
host# route add -host 192.168.1.2 dev tap0
where 192.168.1.2 is IP address of vm.
On the vm
6. my host IP and my vm IP are in different subnets, therefore I need to define routing to host first:
vm# route add -host
I'm able to PING host by IP from vm after this step.
7. and then default gateway:
vm# route add default gw
and I'm able to PING other machines by IP after this step.
8. Now define nameserver in /etc/resolv.conf. The same as on host.
Subscribe to:
Posts (Atom)