在Ubuntu环境中qemu-kvm网桥的配置
在文件/etc/network/interfaces中添加以下内容
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports all # eth0 tap0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
如果使用virsh启动虚拟机,以下可以不添加,同时上述bridge_ports all 改为bridge_ports eth0
auto tap0
iface tap0 inet manual
pre-up tunctl -t tap0 -u username #将username修改为自己的用户名即可
pre-up ifconfig tap0 0.0.0.0 promisc up
post-up brctl addif br0 tap0
重启网络或者重启宿主机
使用qemu-kvm启动虚拟机时加入参数-net nic -net tap,ifname=tap0,script=no,downscript=no即可
桥接的shell脚本配置方式:https://github.com/starrytale/kvm_bridge_file
在Ubuntu环境中qemu-kvm网桥的配置的更多相关文章
- K8S生产环境中实践高可靠的配置和技巧都有哪些?
K8S环境中实践高可靠的配置和技巧都有哪些? 磁盘类型及大小 磁盘类型: 推荐使用ssd 磁盘 对于worker节点,创建集群时推荐使用挂载数据盘.这个盘是专门给/var/lib/docker 存放本 ...
- Ubuntu环境下Anaconda安装TensorFlow并配置Jupyter远程访问
本文主要讲解在Ubuntu系统中,如何在Anaconda下安装TensorFlow以及配置Jupyter Notebook远程访问的过程. 在官方文档中提到,TensorFlow的安装主要有以下五种形 ...
- Ubuntu环境中的Android源代码下载
跟随“老罗的Android之旅”学习Android系统,首先得学会创建能用于编译Android源代码的环境. 文章参考:http://0xcc0xcd.com/p/books/978-7-121-18 ...
- 搭建Ubuntu环境中的Error [dpkg 被中断,您必须手工运行 sudo dpkg --configure -a 解决此问题][安装Flashplayer出错 ]
//解决方法如下: sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock sudo dpkg -r flashplugin-i ...
- QEMU/KVM虚拟机安装配置
1.安装相关组件: [root@KVM ~]# yum install qemu-img qemu-kvm qemu-kvm-tools virt-manager virt-viewer virt-v ...
- Linux日常之Ubuntu系统中sendmail的安装、配置、发送邮件
一. 安装 1. sendmail必须先要安装两个包 (1)sudo apt-get install sendmail (2)sudo apt-get install sendmail-cf 2. u ...
- Ubuntu环境Docker+K8s+Dashboard的安装配置(无坑亲测)
安装之前的准备: 安装docker 使用国内 daocloud 一键安装命令: curl -sSL https://get.daocloud.io/docker | sh 直接从dockerhub下载 ...
- 【事件中心 Azure Event Hub】在Linux环境中(Ubuntu)安装Logstash的简易步骤及配置连接到Event Hub
在文章([事件中心 Azure Event Hub]使用Logstash消费EventHub中的event时遇见的几种异常(TimeoutException, ReceiverDisconnected ...
- uwsgi+flask环境中安装matplotlib
uwsgi+flask的python有自身的virtual environment,可以通过如下命令进入 . venv/bin/activate 虽然通过sudo apt-get install py ...
随机推荐
- 改动Apach默认port
一.改动Apache的默认port号 在WEB SERVER界,无论是微软的IIS还是世界排名第一的Apache,它们安装好后默认的网页服务port号都是80.有必要指出的是,假设你的电脑中已经安装有 ...
- 解决 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”
eclipse在其POM文件的一处提示出错如下: Plugin execution not covered by lifecycle configuration: org.apache.maven.p ...
- exception PLS-00103: Encountered the symbol "(" when expecting one of the following:
exception PLS-00103: Encountered the symbol "(" when expecting one of the following: Cre ...
- [Spring MVC] - JSP + Freemarker视图解释器整合(转)
Spring MVC中如果只使用JSP做视图,可以使用下面这段即可解决: <!-- 视图解释类 --> <bean class="org.springframework.w ...
- JavaScript-jQuery插件开发全解析
摘自:http://www.iteye.com/topic/545971 jQuery插件的开发包括两种: 一种是类级别的插件开发,即给jQuery添加新的全局函数,相当于给jQuery类本身添加方法 ...
- NYOJ-------三角形
Problem A 三角形 时间限制:1000 ms | 内存限制:65535 KB 描述 在数学中,如果知道了三个点的坐标,我们就可以判断这三个点能否组成一个三角形:如果可以组成三角形,那么 ...
- InteliJ Idea通过maven创建webapp
facet是IDE给工程添加的属性,在使用maven时一定不能使用facet 一.创建maven项目,选定webapp作为archtype,这样就会自动生成webapp目录 如果没有给maven设置代 ...
- cxGrid显示行号
定义一个类: TMyCxGrid = class(TObject) class procedure DrawIndicatorCell( Sender: TcxGridTableView; ACanv ...
- js unique
<script type="text/javascript"> var dataArr = [1,3,33,3,5,1,4,3,4,5]; document.write ...
- RHCE7 管理I-12归档文件并在Linux系统间复制文件
tar命令使用 默认tar只有归档的功能,没有压缩功能 tar [option...] [file]... -c,--create 创建 -x,--extract,--get 解压 -t, ...