<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Проблема с KVM]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=10986</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=10986&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Проблема с KVM».]]></description>
		<lastBuildDate>Thu, 12 May 2011 06:43:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=178351#p178351</link>
			<description><![CDATA[<p>Macumazan c правами всё вроде нормально <br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">crw-rw----+ 1 root kvm 10, 232 Май 12 10:33 /dev/kvm</div></p><p>newzenon с qemu всё запускается , по команде с aptitude всё установленно.Вывод что модули подргужены я вроде в первом сообщении привёл.</p><p>Вывод dmesg <br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">[ 1046.852640] kvm: Nested Virtualization enabled<br />[ 1046.852643] kvm: Nested Paging enabled<br />[ 1056.946689] kvm: enabling virtualization on CPU0 failed<br />[ 1438.763814] kvm: enabling virtualization on CPU0 failed<br /></div></p><p>На ядре 2.6.32 всё работает хорошо.</p><p>Вывод lscpu <br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">Architecture: x86_64<br />CPU op-mode(s): 64-bit<br />CPU(s): 4<br />Thread(s) per core: 1<br />Core(s) per socket: 4<br />CPU socket(s): 1<br />NUMA node(s): 1<br />Vendor ID: AuthenticAMD<br />CPU family: 16<br />Model: 4<br />Stepping: 2<br />CPU MHz: 800.000<br />Virtualization: AMD-V<br />L1d cache: 64K<br />L1i cache: 64K<br />L2 cache: 512K<br />L3 cache: 6144K </div></p>]]></description>
			<author><![CDATA[null@example.com (Set_Me_Free)]]></author>
			<pubDate>Thu, 12 May 2011 06:43:10 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=178351#p178351</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=178240#p178240</link>
			<description><![CDATA[<p><strong>Set_Me_Free</strong>, поддержка kvm есть? Сама kvm установлена?<br />Попробуй так:<br /></p><div class="codebox"><pre><code>qemu -m 400 /путь_до_образа/ваш_образ.img -cdrom /путь_к_установочному_диску.iso</code></pre></div><p>Доустановить полностью:<br /></p><div class="codebox"><pre><code>aptitude install qemu kvm qemu-kvm qemu-utils qemu-system qemu-user vde2 etherboot-qemu</code></pre></div><p>Подгрузить модули kvm:<br /></p><div class="codebox"><pre><code>$ modprobe kvm
# Для AMD
$ modprobe kvm-amd
# Для INTEL
$ modprobe kvm-intel</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 11 May 2011 20:42:56 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=178240#p178240</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=178236#p178236</link>
			<description><![CDATA[<p>Права на /dev/kvm в норме?</p>]]></description>
			<author><![CDATA[null@example.com (Macumazan)]]></author>
			<pubDate>Wed, 11 May 2011 20:33:31 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=178236#p178236</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=178215#p178215</link>
			<description><![CDATA[<p>newzenon доброго времени суток , вот по вашим словам сделал :</p><p>qemu-img create /путь_до_образа/ваш_образ.img 8G</p><p>kvm&nbsp; -m 400 /путь_до_образа/ваш_образ.img -cdrom /путь_к_установочному_диску.iso</p><p>После этого у меня вываливается следущее<br />kvm_create_vm: Device or resource busy<br />Could not initialize KVM, will disable KVM support<br />kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument</p><p>Вывод lsmod | grep kvm<br />kvm_amd&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 50543&nbsp; 0 <br />kvm&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;263288&nbsp; 1 kvm_amd</p>]]></description>
			<author><![CDATA[null@example.com (Set_Me_Free)]]></author>
			<pubDate>Wed, 11 May 2011 19:41:57 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=178215#p178215</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=146036#p146036</link>
			<description><![CDATA[<p>Не меня такой способ не устраивает, короче заработало, все друг друга видят, интернет везде есть две подсети:<br />192.168.0.0/24 = Локалка<br />192.168.1.0/24 = VDE switch<br />Можно конечно и водну подсеть запихнуть, но извращаться с масками надо.<br />Конфиги - рабочие:</p><p>iptables (потом сохраняются/восстанавливаютя по pre-up/post-dowm интерфйса tap0 - вот это правда надо куда-нибудь в другое место отправить....):<br />Только эта строчка у меня как бэ сомнения вызывает<br /><em># Запрещаем доступ снаружи во внутреннюю сеть<br />iptables -v -A FORWARD -i ${WAN} -o ${WAN} -j REJECT<br /></em><br />но все работает отлично в таком варианте<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br />#!/bin/sh<br />modprobe iptable_nat<br />modprobe ip_conntrack_ftp<br />modprobe ip_nat_ftp</p><p>export LAN=eth1<br />export NAT1=eth0<br />export NAT2=tap0<br />export WAN=ppp0</p><p># Сообщаем ядру, что ip-форвардинг разрешен<br />echo 1 &gt;/proc/sys/net/ipv4/ip_forward</p><p># RESET<br />iptables -v -P INPUT ACCEPT<br />iptables -v -P FORWARD ACCEPT<br />iptables -v -P OUTPUT ACCEPT<br /># reset the default policies in the nat table.<br />iptables -v -t nat -P PREROUTING ACCEPT<br />iptables -v -t nat -P POSTROUTING ACCEPT<br />iptables -v -t nat -P OUTPUT ACCEPT<br /># reset the default policies in the mangle table.<br />iptables -v -t mangle -P PREROUTING ACCEPT<br />iptables -v -t mangle -P OUTPUT ACCEPT<br /># flush all the rules in the filter and nat tables.<br />iptables -v -F<br />iptables -v -t nat -F<br />iptables -v -t mangle -F<br /># erase all chains that&#039;s not default in filter and nat table.<br />iptables -v -X<br />iptables -v -t nat -X<br />iptables -v -t mangle -X<br /># Let&#039;s go<br />iptables -v -P INPUT DROP<br />iptables -v -P OUTPUT DROP<br />iptables -v -P FORWARD DROP</p><p>iptables -v -A INPUT -i lo -j ACCEPT<br />iptables -v -A INPUT -i ${NAT1} -j ACCEPT<br />iptables -v -A INPUT -i ${NAT2} -j ACCEPT</p><p>iptables -v -A OUTPUT -o lo -j ACCEPT<br />iptables -v -A OUTPUT -o ${NAT1} -j ACCEPT<br />iptables -v -A OUTPUT -o ${NAT2} -j ACCEPT<br />iptables -v -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />iptables -v -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT</p><p>iptables -v -A FORWARD -o ${NAT1} -m state --state RELATED,ESTABLISHED -j ACCEPT<br />iptables -v -A FORWARD -o ${NAT2} -m state --state RELATED,ESTABLISHED -j ACCEPT<br />iptables -v -A FORWARD -i ${NAT1} -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT<br />iptables -v -A FORWARD -i ${NAT2} -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT</p><p># Разрешаем доступ из внутренней сети наружу<br />iptables -v -A FORWARD -i ${NAT1} -o ${WAN} -j ACCEPT<br />iptables -v -A FORWARD -i ${NAT2} -o ${WAN} -j ACCEPT</p><p>iptables -v -A FORWARD -i ${NAT1} -o ${NAT2} -j ACCEPT<br />iptables -v -A FORWARD -i ${NAT2} -o ${NAT1} -j ACCEPT</p><p># Включаем NAT<br />iptables -v -t nat -A POSTROUTING -o ${WAN} -s 192.168.0.0/24 -j MASQUERADE<br />iptables -v -t nat -A POSTROUTING -o ${WAN} -s 192.168.1.0/24 -j MASQUERADE</p><p># Запрещаем доступ снаружи во внутреннюю сеть<br />iptables -v -A FORWARD -i ${WAN} -o ${WAN} -j REJECT</p><p># Проброс локального и VPN трафика<br />iptables -v -t nat -A POSTROUTING -o ${NAT1} -j MASQUERADE<br />iptables -v -t nat -A POSTROUTING -o ${NAT2} -j MASQUERADE<br />iptables -v -t nat -I POSTROUTING -o ${WAN} -j MASQUERADE<br />iptables -v -t nat -I POSTROUTING -o ${LAN} -j MASQUERADE</p><p># Включаем фрагментацию пакетов. Необходимо из за разных значений MTU<br />iptables -v -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu<br /></div></p></div></div><br /><p>interfaces:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br /># The loopback network interface<br />auto lo<br /> iface lo inet loopback</p><p># eth0 - Локальная сеть<br />auto eth0<br />iface eth0 inet static<br />&nbsp; address 192.168.0.1<br />&nbsp; netmask 255.255.255.0<br />&nbsp; network 192.168.0.0<br />&nbsp; broadcast 192.168.0.255</p><p># PPPoE<br />auto eth1<br />iface eth1 inet manual</p><p>auto dsl-provider<br />iface dsl-provider inet ppp<br />&nbsp; pre-up ifconfig eth1 up<br />&nbsp; provider dsl-provider</p><p># VDE<br />auto tap0<br /> iface tap0 inet static<br />&nbsp; &nbsp; address 192.168.1.1<br />&nbsp; &nbsp; netmask 255.255.255.0<br />&nbsp; &nbsp; network 192.168.1.0<br />&nbsp; &nbsp; broadcast 192.168.1.255<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; vde_tunctl -t tap0<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; vde_switch -x -n&nbsp; 10 -s /var/run/vde2/vde_192.ctl -g vde2-net -m 770 -d -p /var/run/v$<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; iptables-restore &lt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; post-down iptables-save&nbsp; &nbsp; &gt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; post-down kill `/bin/cat /var/run/vde2/vde_192.pid`<br />&nbsp; &nbsp; post-down vde_tunctl -d tap0<br /></div></p></div></div><p>interfaces - ВМ:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br />auto lo<br />iface lo inet loopback</p><p>auto eth0<br />iface eth0 inet static<br />&nbsp; &nbsp;address 192.168.1.2<br />&nbsp; &nbsp;netmask 255.255.255.0<br />&nbsp; &nbsp;gateway 192.168.1.1<br />&nbsp; &nbsp;network 192.168.1.0<br />&nbsp; &nbsp;broadcast 192.168.1.255</p><p>dns-nameserver 192.168.1.1 192.168.0.1<br /></div></p></div></div>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 16 Feb 2011 17:42:58 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=146036#p146036</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145961#p145961</link>
			<description><![CDATA[<p>может будет в помощь по твоей теме <a href="http://www.comp-service.ru/materiali-sayta/5-article/264--------kvm.html">http://www.comp-service.ru/materiali-sa … --kvm.html</a></p>]]></description>
			<author><![CDATA[null@example.com (komrad-zack)]]></author>
			<pubDate>Wed, 16 Feb 2011 14:30:19 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145961#p145961</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145950#p145950</link>
			<description><![CDATA[<p>У меня все заработало .Забыл про iptables <br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE</div></p>]]></description>
			<author><![CDATA[null@example.com (komrad-zack)]]></author>
			<pubDate>Wed, 16 Feb 2011 14:08:15 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145950#p145950</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145948#p145948</link>
			<description><![CDATA[<p>С ВМ<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br />route -n<br />Kernel IP routing table<br />Destination&nbsp; &nbsp; &nbsp;Gateway&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Genmask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Flags Metric Ref&nbsp; &nbsp; Use Iface<br />192.168.1.0&nbsp; &nbsp; &nbsp; 0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0 U&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth0<br /></div></p><p>пошел читать маны <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 16 Feb 2011 14:02:35 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145948#p145948</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145941#p145941</link>
			<description><![CDATA[<p>Сейчас поставлю что-нибудь на ВМ, не кошерно с live, <br />И, да меня не было в vde2-net (/etc/group)...<br />С бриджем там другая группа должна быть.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 16 Feb 2011 13:45:00 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145941#p145941</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145934#p145934</link>
			<description><![CDATA[<p>Свич не стал поднимать потому как ВМ всего одна,Да и с мостом думал проблем меньше будет.<br />С ВМ своей кинь /etc/network/interfaces и route -n</p>]]></description>
			<author><![CDATA[null@example.com (komrad-zack)]]></author>
			<pubDate>Wed, 16 Feb 2011 13:29:44 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145934#p145934</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145926#p145926</link>
			<description><![CDATA[<p>Ну я не мостом делал.<br />Cейчас поднял vde - по быстрому live запустил, нахрапом что -то не клеится, у меня две сетевые + vde.<br />eth1 = ppp0<br />eth0 = 192.168.0.1<br />tap0 = 192.168.1.1</p><p>С тачки на eth1 -&nbsp; пинг на tap0 идет.., <br />ВМ запускаю, с нее нукуда.... (192.168.1.2)<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br />&gt;&gt;route -n<br />Kernel IP routing table<br />Destination&nbsp; &nbsp; &nbsp;Gateway&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Genmask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Flags Metric Ref&nbsp; &nbsp; Use Iface<br />88.87.84.1&nbsp; &nbsp; &nbsp; 0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.255 UH&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 ppp0<br />192.168.1.0&nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 tap0<br />192.168.0.0&nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth0<br />0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 ppp0<br /></div></p><p>Тоже в размышлениях.... </p><p>Запуск iptables пока так:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br /># <br />iptables -v -P INPUT DROP<br />iptables -v -P OUTPUT DROP<br />iptables -v -P FORWARD DROP</p><p>iptables -v -A INPUT -i lo -j ACCEPT<br />iptables -v -A INPUT -i eth0 -j ACCEPT<br />iptables -v -A INPUT -i tap0 -j ACCEPT</p><p>iptables -v -A OUTPUT -o lo -j ACCEPT<br />iptables -v -A OUTPUT -o eth0 -j ACCEPT<br />iptables -v -A OUTPUT -o tap0 -j ACCEPT<br />iptables -v -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />iptables -v -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT</p><p>iptables -v -A FORWARD -i eth0 -o ppp0 -j ACCEPT<br />iptables -v -A FORWARD -i tap0 -o ppp0 -j ACCEPT</p><p>iptables -v -A FORWARD -i eth0 -o tap0 -j ACCEPT<br />iptables -v -A FORWARD -i tap0 -o eth0 -j ACCEPT<br /></div></p></div></div><p>/etc/network/interfaces пока так</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br />auto eth0<br /> iface eth0 inet static<br />&nbsp; &nbsp;address 192.168.0.1<br />&nbsp; &nbsp;netmask 255.255.255.0<br />&nbsp; &nbsp;network 192.168.0.0<br />&nbsp; &nbsp;broadcast 192.168.0.255</p><p># PPPoE<br />auto eth1<br /> iface eth1 inet manual</p><p>auto dsl-provider<br /> iface dsl-provider inet ppp<br />&nbsp; &nbsp;pre-up ifconfig eth1 up<br />&nbsp; &nbsp;provider dsl-provider</p><p># VDE<br />auto tap0<br /> iface tap0 inet static<br />&nbsp; &nbsp; address 192.168.1.1<br />&nbsp; &nbsp; netmask 255.255.255.0<br />&nbsp; &nbsp; network 192.168.1.0<br />&nbsp; &nbsp; broadcast 192.168.0.255<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; vde_tunctl -t tap0<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; vde_switch -x -n&nbsp; 10 -s /var/run/vde2/vde_192.ctl -g vde2-net -m 770 -d -p /var/run/v$<br />#&nbsp; &nbsp; pre-up&nbsp; &nbsp; vde_switch -x -n 10 -s /var/run/vde2/vde_010.ctl -g vde2-net -m 770 -d -p /var/run/v$<br />&nbsp; &nbsp; pre-up&nbsp; &nbsp; iptables-restore &lt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; post-down iptables-save&nbsp; &nbsp; &gt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; post-down kill `/bin/cat /var/run/vde2/vde_192.pid`<br />#&nbsp; &nbsp; post-down kill `/bin/cat /var/run/vde2/vde_010.pid`<br />&nbsp; &nbsp; post-down vde_tunctl -d tap0<br /></div></p></div></div><p>А почему не стал виртуальный свитч поднимать?</p><br /><p>зыж: Пользователя в группу добавил?</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 16 Feb 2011 13:15:45 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145926#p145926</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145916#p145916</link>
			<description><![CDATA[<p>я немного по-другому сделал.На машине поднял интрефейс virbr0 ip192.168.100.1.На ВМ интрефейс eth1 ip192.168.100.2 gw192.168.100.1.На самой тачке есть еще интрефес eth0 ip192.168.0.174 .С ВМ на 192.168.0.174 пакеты идут и с тачки на 192.168.100.2 тоже все норм.А вот с ВМ в сеть 192.168.0.0 никак.<br />на тачке route -n<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">Kernel IP routing table<br />Destination&nbsp; &nbsp; &nbsp;Gateway&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Genmask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Flags Metric Ref&nbsp; &nbsp; Use Iface<br />192.168.100.0&nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 virbr0<br />192.168.0.0&nbsp; &nbsp; &nbsp;192.168.0.174&nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;UG&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth0<br />192.168.0.0&nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth0<br />0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;192.168.0.9&nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UG&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth0</div><br />на ВМ route -n<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">Kernel IP routing table<br />Destination&nbsp; &nbsp; &nbsp;Gateway&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Genmask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Flags Metric Ref&nbsp; &nbsp; Use Iface<br />192.168.100.0&nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth1<br />192.168.0.0&nbsp; &nbsp; &nbsp;192.168.0.174&nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;UG&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth1<br />192.168.0.0&nbsp; &nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;255.255.255.0&nbsp; &nbsp;U&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth1<br />0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;192.168.100.1&nbsp; &nbsp;0.0.0.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UG&nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 0 eth1<br /></div><br />Сижу вот туплю что не так</p>]]></description>
			<author><![CDATA[null@example.com (komrad-zack)]]></author>
			<pubDate>Wed, 16 Feb 2011 12:42:54 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145916#p145916</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145838#p145838</link>
			<description><![CDATA[<p><a href="http://xgu.ru/wiki/Man:qemu">http://xgu.ru/wiki/Man:qemu</a><br /><a href="http://wiki.virtualsquare.org/wiki/index.php/VDE_Basic_Networking">http://wiki.virtualsquare.org/wiki/inde … Networking</a><br /><a href="http://xgu.ru/wiki/Virtual_Distributed_Ethernet">http://xgu.ru/wiki/Virtual_Distributed_Ethernet</a></p><p>aptitude install qemu qemu-utils qemu-kvm etherboot-qemu vde2</p><p>Редактируем и добавляем (я добавил два интерфейса):<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh"><br /># /etc/network/interfaces</p><p>auto tap0<br />iface tap0 inet static<br />&nbsp; &nbsp; address 192.168.0.20<br />&nbsp; &nbsp; netmask 255.255.255.0<br />&nbsp; &nbsp; network 192.168.0.0<br />&nbsp; &nbsp; broadcast 192.168.0.255<br />&nbsp; &nbsp; pre-up /usr/sbin/vde_tunctl -t tap0<br />&nbsp; &nbsp; pre-up /usr/bin/vde_switch -x -n 5 -s /var/run/vde2/vde_192.ctl -g vde2-net -m 770 -d -p /var/run/vde2/vde_192.pid -t tap0<br />&nbsp; &nbsp; pre-up /usr/bin/vde_switch -x -n 10 -s /var/run/vde2/vde_010.ctl -g vde2-net -m 770 -d -p /var/run/vde2/vde_010.pid <br />&nbsp; &nbsp; pre-up /sbin/iptables-restore &lt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; post-down /sbin/iptables-save &gt; /etc/ip_rulles.lst<br />&nbsp; &nbsp; # pre-up /sbin/ip6tables-restore &lt; /etc/ip6_rulles.lst<br />&nbsp; &nbsp; # post-down /sbin/ip6tables-save &gt; /etc/ip6_rulles.lst<br />&nbsp; &nbsp; post-down /bin/kill `/bin/cat /var/run/vde2/vde_192.pid`<br />&nbsp; &nbsp; post-down /bin/kill `/bin/cat /var/run/vde2/vde_010.pid`<br />&nbsp; &nbsp; post-down /usr/sbin/vde_tunctl -d tap0</p><p>auto tap1<br /> iface tap1 inet static<br />&nbsp; &nbsp; address 10.10.0.1<br />&nbsp; &nbsp; netmask 255.255.255.0<br />&nbsp; &nbsp; network 10.10.0.0<br />&nbsp; &nbsp; broadcast 10.10.0.255<br />&nbsp; &nbsp; pre-up /usr/sbin/vde_tunctl -t tap1&nbsp; &nbsp; &nbsp;# -u zion<br />&nbsp; &nbsp; pre-up /usr/bin/vde_switch -x -n 5 -s /var/run/vde2/vde_010.ctl -g vde2-net -m 770 -d -p /var/run/vde2/vde_010.pid -t tap1<br />&nbsp; &nbsp; post-down /bin/kill `/bin/cat /var/run/vde2/vde_010.pid`<br />&nbsp; &nbsp; post-down /usr/sbin/vde_tunctl -d tap1</p><p></div></p><p># /etc/init.d/networking restart<br />Лучше иногда stop / start<br />После этого сетевые интерфейсы должны появиться, если нет, то<br />наверное маскарадинг не работает, </p><p># iptables -t nat&nbsp; -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE<br /># iptables-save &gt; /etc/ip_rulles.lst</p><p>ну и на всякий ребутнутся</p><p>Запуск примерно так:</p><p># kvm -m 512 -name Virt-tap0-tap1&nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -net nic -net vde,sock=/var/run/vde2/vde_010.ctl \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -net nic -net vde,sock=/var/run/vde2/vde_192.ctl \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -hda /home/user/qemu/hdd/image.img</p><p>ы. У меня поднимается два виртуальных свитча, что нафиг не надо, позже может переделаю, tap1 - можно выкинуть<br />Вроде ничего не упустил.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Wed, 16 Feb 2011 08:59:04 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145838#p145838</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145800#p145800</link>
			<description><![CDATA[<p>Спасибо,как раз копаю тему по настройке сети в qemu/kvm</p>]]></description>
			<author><![CDATA[null@example.com (komrad-zack)]]></author>
			<pubDate>Wed, 16 Feb 2011 06:38:10 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145800#p145800</guid>
		</item>
		<item>
			<title><![CDATA[Re: Проблема с KVM]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=145537#p145537</link>
			<description><![CDATA[<p>Да не за что, тут про сеть в qemu было: <a href="http://linuxforum.ru/viewtopic.php?id=3948">http://linuxforum.ru/viewtopic.php?id=3948</a></p><p>Кстати kvm нормально монтирует /dev/sdXY - можно вторым диском монтировать.</p>]]></description>
			<author><![CDATA[null@example.com (zenon)]]></author>
			<pubDate>Tue, 15 Feb 2011 15:24:50 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=145537#p145537</guid>
		</item>
	</channel>
</rss>
