* [Comm] KVM и внешний DHCP-сервер @ 2015-03-19 2:20 Алексей Варакин 2015-03-19 2:42 ` alexei 0 siblings, 1 reply; 9+ messages in thread From: Алексей Варакин @ 2015-03-19 2:20 UTC (permalink / raw) To: ALT Linux Community general discussions Здравствуйте! Я решил для теста поднять у себя KVM вместо работающего VirtualBox. Успешно перегнал виртуальные машины из формата VirtualBox в формат Qcow2. Винды успешно запустились(правда, пришлось там повозиться с драйверами), однако сетевой адрес они получили от встроенного DHCP-сервера. Поэтому у меня вопрос: Можно ли избавиться от встроенного DHCP и получать адрес от реального DHCP-сервера(как в VirtualBox)? P.S. Я использовал в работе с виртуальными машинами AQEMU(но там я ничего не нашел про встроенный DHCP). ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 2:20 [Comm] KVM и внешний DHCP-сервер Алексей Варакин @ 2015-03-19 2:42 ` alexei 2015-03-19 5:12 ` Алексей Варакин 0 siblings, 1 reply; 9+ messages in thread From: alexei @ 2015-03-19 2:42 UTC (permalink / raw) To: ALT Linux Community general discussions добрый день ----- Исходное сообщение ----- > От: "Алексей Варакин" <varalt@yandex.ru> > Кому: "ALT Linux Community general discussions" <community@lists.altlinux.org> > Отправленные: Четверг, 19 Март 2015 г 10:20:19 > Тема: [Comm] KVM и внешний DHCP-сервер > Здравствуйте! > > Я решил для теста поднять у себя KVM вместо работающего VirtualBox. > Успешно перегнал виртуальные машины из формата VirtualBox в формат Qcow2. > Винды успешно запустились(правда, пришлось там повозиться с драйверами), однако > сетевой адрес они получили от встроенного DHCP-сервера. > > Поэтому у меня вопрос: Можно ли избавиться от встроенного DHCP и получать адрес > от реального DHCP-сервера(как в VirtualBox)? > > P.S. Я использовал в работе с виртуальными машинами AQEMU(но там я ничего не > нашел про встроенный DHCP). Создать на хост-системе бридж, в который входит интерфейс реальной сетевой карты, и в настройках сетевой карты виртуальной машины указать типа сети Shared и указать ранее созданный бридж. Тогда гостевая система получит доступ в сеть, к которой подключен хост. Пример из конфига: <domain type='kvm'> ... <devices> ... <interface type='bridge'> <mac address='52:54:00:70:ba:30'/> <source bridge='brenp3s0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ... </devices> </domain> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 2:42 ` alexei @ 2015-03-19 5:12 ` Алексей Варакин 2015-03-19 5:18 ` alexei ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Алексей Варакин @ 2015-03-19 5:12 UTC (permalink / raw) To: ALT Linux Community general discussions А как создать грамотно бридж? Примерную команду подскажите? 19.03.2015, 09:41, "alexei@taf.ru" <alexei@taf.ru>: > добрый день > > ----- Исходное сообщение ----- >> От: "Алексей Варакин" <varalt@yandex.ru> >> Кому: "ALT Linux Community general discussions" <community@lists.altlinux.org> >> Отправленные: Четверг, 19 Март 2015 г 10:20:19 >> Тема: [Comm] KVM и внешний DHCP-сервер >> Здравствуйте! >> >> Я решил для теста поднять у себя KVM вместо работающего VirtualBox. >> Успешно перегнал виртуальные машины из формата VirtualBox в формат Qcow2. >> Винды успешно запустились(правда, пришлось там повозиться с драйверами), однако >> сетевой адрес они получили от встроенного DHCP-сервера. >> >> Поэтому у меня вопрос: Можно ли избавиться от встроенного DHCP и получать адрес >> от реального DHCP-сервера(как в VirtualBox)? >> >> P.S. Я использовал в работе с виртуальными машинами AQEMU(но там я ничего не >> нашел про встроенный DHCP). > > Создать на хост-системе бридж, в который входит интерфейс реальной сетевой карты, и > в настройках сетевой карты виртуальной машины указать типа сети Shared и указать ранее > созданный бридж. Тогда гостевая система получит доступ в сеть, к которой подключен хост. > Пример из конфига: > > <domain type='kvm'> > ... > <devices> > ... > <interface type='bridge'> > <mac address='52:54:00:70:ba:30'/> > <source bridge='brenp3s0'/> > <model type='virtio'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> > </interface> > ... > </devices> > </domain> > _______________________________________________ > community mailing list > community@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/community ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 5:12 ` Алексей Варакин @ 2015-03-19 5:18 ` alexei 2015-03-19 6:38 ` "Четвериков К.В." 2015-03-19 10:35 ` Васюк Максим Анатольевич 2 siblings, 0 replies; 9+ messages in thread From: alexei @ 2015-03-19 5:18 UTC (permalink / raw) To: ALT Linux Community general discussions Пример в /usr/share/doc/etcnet-0.X.Y/examples/Ethernet-bridge-GRE ну и /usr/share/doc/etcnet-0.X.Y/wiki-RU для общего развития ----- Исходное сообщение ----- > От: "Алексей Варакин" <varalt@yandex.ru> > Кому: "ALT Linux Community general discussions" <community@lists.altlinux.org> > Отправленные: Четверг, 19 Март 2015 г 13:12:27 > Тема: Re: [Comm] KVM и внешний DHCP-сервер > А как создать грамотно бридж? > Примерную команду подскажите? > > 19.03.2015, 09:41, "alexei@taf.ru" <alexei@taf.ru>: >> добрый день >> >> ----- Исходное сообщение ----- >>> От: "Алексей Варакин" <varalt@yandex.ru> >>> Кому: "ALT Linux Community general discussions" <community@lists.altlinux.org> >>> Отправленные: Четверг, 19 Март 2015 г 10:20:19 >>> Тема: [Comm] KVM и внешний DHCP-сервер >>> Здравствуйте! >>> >>> Я решил для теста поднять у себя KVM вместо работающего VirtualBox. >>> Успешно перегнал виртуальные машины из формата VirtualBox в формат Qcow2. >>> Винды успешно запустились(правда, пришлось там повозиться с драйверами), однако >>> сетевой адрес они получили от встроенного DHCP-сервера. >>> >>> Поэтому у меня вопрос: Можно ли избавиться от встроенного DHCP и получать адрес >>> от реального DHCP-сервера(как в VirtualBox)? >>> >>> P.S. Я использовал в работе с виртуальными машинами AQEMU(но там я ничего не >>> нашел про встроенный DHCP). >> >> Создать на хост-системе бридж, в который входит интерфейс реальной сетевой >> карты, и >> в настройках сетевой карты виртуальной машины указать типа сети Shared и указать >> ранее >> созданный бридж. Тогда гостевая система получит доступ в сеть, к которой >> подключен хост. >> Пример из конфига: >> >> <domain type='kvm'> >> ... >> <devices> >> ... >> <interface type='bridge'> >> <mac address='52:54:00:70:ba:30'/> >> <source bridge='brenp3s0'/> >> <model type='virtio'/> >> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> >> </interface> >> ... >> </devices> >> </domain> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 5:12 ` Алексей Варакин 2015-03-19 5:18 ` alexei @ 2015-03-19 6:38 ` "Четвериков К.В." 2015-03-19 11:31 ` Michael Shigorin 2015-03-19 10:35 ` Васюк Максим Анатольевич 2 siblings, 1 reply; 9+ messages in thread From: "Четвериков К.В." @ 2015-03-19 6:38 UTC (permalink / raw) To: ALT Linux Community general discussions 19.03.2015 08:12, Алексей Варакин пишет: > А как создать грамотно бридж? > Примерную команду подскажите? Из нашей корпоративной документации: *Создание и настройка сетевого моста.* По умолчанию, при создании ВМ, QEMU создаёт сетевое соединение на подобии NAT. Оно ограничено по пропускной способности, не даст вам присвоить гостю доступный из локальной сети ip-адрес и так-же имеет другие, менее значительные минусы. Этот вариант подходит для домашнего использования или для тестового прогона нового live-cd, но никак не для продакшн-сервера. Именно поэтому, нам нужно создать сетевой мост на хост-ОС, который не имеет описанных выше недостатков, и при создании виртуализированных ОС указывать его имя в качестве сетевого интерфейса. Переходим в папку /etc/net/ifaces/ и копируем папку "имя_вашего_текущего_сетевого_интерфейса" (у меня это eno1) в эту же папку с именем, например, "most1" : [root@kvm-tester ~]# cd /etc/net/ifaces/ && cp -r eno1 most1 В папке "имя_вашего_текущего_сетевого_интерфейса", в файле ipv4address, закомментируем строку с ip-адресом и маской: [root@kvm-tester ifaces]# sed -i s/^/#/ eno1/ipv4address В папке most1, подправим файл options, изменив тип интерфейса на мост (TYPE=bri) и добавив значение HOST="имя_вашего_текущего_сетевого_интерфейса" (HOST=eno1): [root@kvm-tester ifaces]# sed -i s/eth/bri/ most1/options && echo "HOST=eno1" >>most1/options В моём случае, в сети идёт привязка к MAC-адресу, поэтому в той-же папке most1, дополнительно нужно создать файл iplink, в котором прописать MAC, в следующем формате: address XX:XX:XX:XX:XX:XX. [root@kvm-tester ifaces]# echo "address 58:0B:1A:45:C7:A9" > most1/iplink Настройка сети завершена. -- С уважением, Четвериков Константин Системный администратор ООО „МАНН и ШРЁДЕР Руссланд“ Лихачевский пр-д.10, г. Долгопрудный 141700 МО Тел. +7 (495) 617-617-2 доб. 212 e-mail: chetverikov@mann-schroeder.ru www.mann-schroeder.ru ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 6:38 ` "Четвериков К.В." @ 2015-03-19 11:31 ` Michael Shigorin 2015-03-20 6:18 ` "Четвериков К.В." 0 siblings, 1 reply; 9+ messages in thread From: Michael Shigorin @ 2015-03-19 11:31 UTC (permalink / raw) To: ALT Linux Community general discussions On Thu, Mar 19, 2015 at 09:38:20AM +0300, "Четвериков К.В." wrote: > >А как создать грамотно бридж? > Из нашей корпоративной документации: А не хотите "невнутренние" части утащить на альтовскую вики? Практика показывает, что таким образом можно в итоге получить более качественную документацию и "для себя". > *Создание и настройка сетевого моста.* Например, можно завести пространство имён HOWTO:. -- ---- WBR, Michael Shigorin / http://altlinux.org ------ http://opennet.ru / http://anna-news.info ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 11:31 ` Michael Shigorin @ 2015-03-20 6:18 ` "Четвериков К.В." 2015-03-20 10:33 ` Michael Shigorin 0 siblings, 1 reply; 9+ messages in thread From: "Четвериков К.В." @ 2015-03-20 6:18 UTC (permalink / raw) To: ALT Linux Community general discussions Всё, как обычно, упирается в отсутствие времени для всего, что за гранью плана задач :) Да и встаёт вопрос в объективности выбора того или иного решения из списка десятков возможных. Чтобы писать в вики, как я считаю, нужно досконально разбираться в вопросе и владеть актуальной информацией, чтобы не вводить в заблуждение других, а это не просто. В общем, если будет возможность и материал, будет и мой вклад в вики. 19.03.2015 14:31, Michael Shigorin пишет: > А не хотите "невнутренние" части утащить на альтовскую вики? > Практика показывает, что таким образом можно в итоге получить > более качественную документацию и "для себя". -- С уважением, Четвериков Константин Системный администратор ООО „МАНН и ШРЁДЕР Руссланд“ Лихачевский пр-д.10, г. Долгопрудный 141700 МО Тел. +7 (495) 617-617-2 доб. 212 Моб. +7 916-990-89-26 e-mail: chetverikov@mann-schroeder.ru www.mann-schroeder.ru ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-20 6:18 ` "Четвериков К.В." @ 2015-03-20 10:33 ` Michael Shigorin 0 siblings, 0 replies; 9+ messages in thread From: Michael Shigorin @ 2015-03-20 10:33 UTC (permalink / raw) To: ALT Linux Community general discussions On Fri, Mar 20, 2015 at 09:18:54AM +0300, "Четвериков К.В." wrote: > Чтобы писать в вики, как я считаю, нужно > досконально разбираться в вопросе и > владеть актуальной информацией, чтобы не > вводить в заблуждение других, а это не > просто. Это да, хотя публиковать можно и на своей страничке участника. > В общем, если будет возможность и > материал, будет и мой вклад в вики. Удачи! -- ---- WBR, Michael Shigorin / http://altlinux.org ------ http://opennet.ru / http://anna-news.info ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] KVM и внешний DHCP-сервер 2015-03-19 5:12 ` Алексей Варакин 2015-03-19 5:18 ` alexei 2015-03-19 6:38 ` "Четвериков К.В." @ 2015-03-19 10:35 ` Васюк Максим Анатольевич 2 siblings, 0 replies; 9+ messages in thread From: Васюк Максим Анатольевич @ 2015-03-19 10:35 UTC (permalink / raw) To: ALT Linux Community general discussions 19.03.2015 11:12, Алексей Варакин пишет: > А как создать грамотно бридж? > Примерную команду подскажите? Я поднимал мост по нашей вики: http://www.altlinux.org/Etcnet#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B0_Ethernet-.D0.BC.D0.BE.D1.81.D1.82.D0.B0 Моих скромных познаний хватило, почти сразу все заработало. -- С уважением, Васюк Максим ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-20 10:33 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-19 2:20 [Comm] KVM и внешний DHCP-сервер Алексей Варакин 2015-03-19 2:42 ` alexei 2015-03-19 5:12 ` Алексей Варакин 2015-03-19 5:18 ` alexei 2015-03-19 6:38 ` "Четвериков К.В." 2015-03-19 11:31 ` Michael Shigorin 2015-03-20 6:18 ` "Четвериков К.В." 2015-03-20 10:33 ` Michael Shigorin 2015-03-19 10:35 ` Васюк Максим Анатольевич
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git