kvm on gentoo

Debian 6.0 安装 KVM 桥接网络 环境:Win 7 中安装WMWare 8.0; WMWare 中安装Debian 6.0;Debian中安装qemu-kvm; qemu-kvm中安装Gentoo (如下图所示) 桥接:桥接可以让Guest OS (KVM中的OS)和Host OS(此处是Debian)位于同一局域网内,并且可以和局域网内其他PC相互通信。 一. 加载kvm模块 # mod 阅读详情
system: gentoo
arch: amd64
kernel: 2.6.30
time: Mon Nov 9 23:59:06 CST 2009

step 1:
打开kernel里的Virtualization功能,因为我的amd64架构,所以选择"KVM for AMD".
[*] Virtualization --->
--- Virtualization
Kernel-based Virtual Machine (KVM) support
<  > KVM for Intel processors support 
KVM for AMD processors support


测试命令
#modprobe kvm-amd
正常情况不会有任何回显
lsmod可以看到加载的模块信息"kvm-amd"
Module Size Used by
kvm_amd 36068 0
kvm 155640 1 kvm_amd


注:可以配置/etc/conf.d/modules用于启动时自动装载kvm模块

step 2:
打开masked包
 
=app-emulation/kvm-88-r1 ~amd64
=app-emulation/kvm-kmod-88-r1 ~amd64

将上面两行信息echo到/etc/portage/package.keywords里,portage里最新的版本为88

然后
#emerge kvm
此时会关联安装其他几个包.

step 3:
将用户加入kvm组,比如我的帐户是ben(也就是用于操作kvm的用户)
#gpasswd -a ben kvm

到此将完成kvm的安装,过程相当简单.注:未支持网络等其他功能.

试用测试:

在/var建立一个kvm目录
创建4g的lv
#lvcreate -nkvm -L4G vg0 && mkfs.ext3 /dev/vg0/kvm

#mount /dev/vg0/kvm /var/kvm

// 创建一个虚拟磁盘,磁盘格式为qcow2
#kvm-img create -f qcow2 kvm.img 4G

//光驱装入gentoo2008的安装光盘
#kvm -m 512M -hda kvm.img -cdrom /dev/cdrom -boot d -sdl

出现安装画面,判断程序运行正常

命令参数说明
程序名: kvm
-m 512M    - 给VM划分上限为512M的内存
-hda kvm.img    -  使用kvm.img(镜像)文件作为VM IDE硬盘(1 or 2)
-cdrom /dev/cdrom    - 使用设备文件/dev/cdrom作用VM光驱
-boot d    - 优先从(VM)光驱启动
-sdl    - 开启sdl支持

注:kvm.img为事先创建的虚拟磁盘文件;-sdl选项开启后程序输出将定向到(新弹出的窗口)qemu,或使用-curses替代则将在本xterm输出(我使用curses的结果是分辨率不足,黑黑一片)

 

基于WEB的KVM虚拟机管理程序oVirt介绍 oVirt提供基于Web的虚拟机管理控制平台,oVirt是KVM开源管理程序,该虚拟机软件支持主流的x86硬件,并允许用户在其上运行Linux及Windows操作系统。运行 oVirt除了要求硬件具有虚拟化VT支持外,还应事先安装好kvm、libvirt、virt-manager、virt-viewer等软件。 Fedora 17将默认安装这个KVM虚拟机管理程序,目前你也可以在Fedo 阅读详情

相关推荐

银河麒麟服务器操作系统V10SP2实战:基于vsftpd构建多角色精细化权限FTP服务

本文详细介绍了在银河麒麟服务器操作系统V10SP2上基于vsftpd构建多角色精细化权限FTP服务的实战指南。从环境准备、核心配置到多角色用户权限管理,全面解析了FTP服务的部署与优化技巧,特别针对企业级应用场景提供了安全加固和故障排查方案。

weixin_30312563的博客 358

虚拟机桌面linux系统,KVM - Linux下三大免费桌面虚拟机评测_Linux教程_Linux公社-Linux系统门户网站...

KVMKVM(基于内核的虚拟机)是一个x86 Linux全虚拟化解决方案,需要硬件支持虚拟化扩展(Intel VT 或AMD-V),它由一个载入时内核模块kvm.ko(提供核心虚拟化基础设施)和一个处理器特殊模块kvm-intel.ko或kvm-amd.ko组成,在它上层需要修改过的QEMU。使用KVM,我们可以运行多个Windows或Linux虚拟机,每个虚拟机都拥有自己的虚拟硬件:网卡,磁盘,...

weixin_32452127的博客 674

[特殊字符]交通标志检测与分类数据集-智能驾驶系统 地图数据更新 1,886张图片

🚦交通标志检测与分类数据集-智能驾驶系统 地图数据更新 1,886张图片

cver123的博客 2075

【gentoo】kvm 配置

1. 看cpu是否支持虚拟化 egrep '(vmx|svm)' --color=always /proc/cpuinfo 2. 打开bios的cpu虚拟化支持 3. 配置kernel      [*] Virtualization ---> --- Virtualization Kernel-based Virtual Machine (KVM) suppor

coldplay的专栏 1252

【OTDR曲线工具箱】04 批量生成sor文件

软件下载地址:http://120.78.150.214:9999/isora.zip 通过一个测试数据sor文件,批量生成多个测试文件(基于Bellcore GR196及SR-4731标准)。主要考虑哪些问题: 1、sor测试是否符合要求(主要是衰减系数) 2、多个文件的创建时间 3、文件必须随机处理,不要看省去一模一样。 来说说怎么操作的 第一步:选择参考曲线 参考曲线的选择由两种方法:从文件中导入、从曲线库中选择。 其中曲线库分为公共库和个人库两种,平时浏览的sor文件都可以加载到库中。 第二步

夜晚是传说的博客 5275

190、LLC谐振变换器的样机调试实战(问题定位)

这篇实战笔记总结了LLC谐振变换器样机调试中的五大典型问题及解决方案:1)空载炸机源于谐振电容纹波电流能力不足;2)轻载啸叫因控制环路不稳定,需调整突发模式阈值;3)MOSFET过热由死区时间不当导致,需精确优化实现ZVS;4)输出纹波大由PCB布局耦合引起,需优化共模抑制;5)启动过冲需延长软启动时间。作者强调调试需结合示波器、热成像仪等工具,理论计算与实测并重,并详细记录每次参数调整。文章指出LLC调试是不断试错的过程,关键是通过现象分析本质原因。

Jack010169的博客 49

gentoo on kvm[note]

之前就一直想好好玩玩gentoo,前面比较忙而且编译内核总是太费时间,所以一拖再拖了。。。。 正巧有台服务器刚刚装了libvirt,就拿它建虚拟机玩gentoo咯~~~ kvm用的virt-manager远程管理,先上几个图 【virt管理界面】 【gentoo安装完成后的grub界面】 【系统加载完毕,登录进系统后】 安装过程,开始比较顺利,后

Lodevil的专栏 1050

2023年12月机器人技术等级考试试卷(三级理论) 试题解析

2023年12月机器人技术等级考试试卷(三级理论) 试题解析

http://www.cierobot.com 4095

Gentoo安装kvm桥接网络

本来最先是在 Gentoo 上实现 KVM 的,后来又在 Debian 上玩了玩:http://blog.youkuaiyun.com/cenziboy/article/details/6957890 后来觉得还是有必要再总结总结,只当是复习罢了,于是乎出现了此文。 一 安装前准备 1. KVM需要硬件支持,并在BIOS中开启CPU虚拟化功能 2. 配置 kernel  kvm 模块

CC 4476

详解FreeRTOS:事件标志组(高级篇—5)

事件组可以实现一对多,多对多的同步,即一个任务可以等待多个事件的发生。任务可以通过设置事件位来实现事件的触发和等待操作,FreeRTOS的事件仅用于同步,不提供数据传输功能。

不脱发的程序猿 1075

gentoo kvm qemu

gentoo kvm qemu 首先使用 grep --color -E "vmx|svm" /proc/cpuinfo 检查 cpu 能不能支持虚拟化,注意 biso 里面要开启虚拟化。 内核开启相应选项 [*] Virtualization ---> <*> Kernel-based Virtual Mach...

weixin_30719711的博客 281

Autosar入门_OS_5

os hook函数说明

u012406840的博客 399

Gentoo 系统 KVM 桥接 tap 启动脚本

Gentoo 启动 init 机制不同于 Debian 和 Redhat, 具体细节尚未总结。 现备份一 KVM tap 启动脚本:kvm_net #!/sbin/runscript # Copyright chencheng use kvm # Distributed under the terms of the GNU General Public License v2 # $Header

CC 3159

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

My Gentoo kernel config on MacbookPro early 2015 13' Retina

# # Automatically generated file; DO NOT EDIT. # Linux/x86 4.8.12-gentoo Kernel Configuration # # # Gentoo Linux # CONFIG_GENTOO_LINUX=y CONFIG_GENTOO_LINUX_UDEV=y CONFIG_GENTOO_LINUX_PORTAGE=y # #

王旻宇 1万+

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

Gentoo用上虚拟机中的战斗机KVM

====== Gentoo用上虚拟机中的战斗机KVM ======Created 星期四 22 十月 2009 By Z.Y.F@msn.com一,准备工作: egrep'^flags.*(vmx|svm)' /proc/cpuinfo 要是没有输出什么,那就意味着你的CPU不支持KVM虚拟,你可以去试试Vmware之类。 dmesg|grepkvm 如果是 disabled by...

weixin_30625691的博客 105

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

[gentoo]搞定kvm+spice

很早之前就听说spice相对vnc来说要强大很多,之前因为安装的是32位的系统,没法进行尝试,安装了64位的系统之后,还没时间去折腾过。 上上周其实已经将以前的windows虚拟机的图形方式从vnc换成了spice,昨天又搞定了agent的启动和远程复制粘贴。 先说下安装,安装的过程相对比较方便,首先需要卸载原来安装的app-emulation/qemu...

weixin_34138521的博客 615

普通用户执行qemu-kvm 报没有权限

非root用户执行qemu-kvm 报错 Could not access KVM kernel module: Permission denied Failed to initialize KVM: Permission denied No accelerator found! sudo 就可以,百度了一下都说要加入kvm组, 立马照做,还是不行 难道RP不行 ls -

charles_caicai的专栏 6834

minikube kvm2 驱动完全指南:基于 KVM 与 libvirt 的本地 Kubernetes 集群实践

本文以 minikube 官方文档中的 [kvm2 驱动文档](https://link.gitcode.com/i/392120680affc6721ad83f46fa5b0e37) 为骨架,系统讲解如何在 Linux 上借助 KVM(内核级虚拟机)与 libvirt 虚拟化 API 运行 minikube 集群。你将掌握 kvm2 驱动的环境要求、安装与虚拟化检查方法、5 个 KVM 专属启动

gitblog_00826的博客 1038

部署KVM虚拟化平台

yum -y install virt-manager 虚拟机图形管理工具(宿主机有桌面环境时可以考虑安装,命令操作或者远程控制则不需要)yum -y install libguestfs-tools 用于访问虚拟机的磁盘映像文件提供的一组命令。yum -y install qemu-kvm-tools qemu-kvm的工具包。通过 virsh list --all 查看不到 test01 的信息,说明此虚拟机被删除。

weixin_73081076的博客 1054

CentOS、Ubuntu、Gentoo、 Freebsd 、RedHat、 Debian 如何选择

       Linux最早由Linus Benedict Torvalds在1991年开始编写。在这之前,Richard Stallman创建了Free Software Foundation(FSF)组织以及GNU项目,并不断的编写创建GNU程序(此类程序的许可方式均为GPL: General Public License)。在不断的有杰出的程序员和开发者加入到GNU组织中后,便造就了今天...

weixin_33694172的博客 826

ko和java安全性_内核模块kvm.ko和kvm-intel.ko都被加载时关闭/ dev / kvm [关闭]

uname -a 显示:Linux localhost 2.6.39-gentoo-r3-nsfocus#52 SMP PREEMPT Wed Feb 12 15:37:56 CST 2014 i686 Intel(R)Core(TM)i7-2600 CPU @ 3.40GHz GenuineIntel GNU / Linux我已经在BIOS上打开了英特尔VT . / proc / cpuinf...

weixin_32540247的博客 265

Getoo下用kvm启动Host WinXp系统

<br />kvm -hda /dev/sda ??<br /> 

梦言 510

拾遗:Qemu/KVM

WinXP: #!/bin/bash name=winxp qemu-system-x86_64 \ -enable-kvm \ -cpu host -smp 2,sockets=2,cores=1,threads=1 \ -m 4096 \ -net user \ -drive file=./WinXP.img,if=none,cache=writeback,id=$...

weixin_30608503的博客 229
上一篇: Lucene初探
下一篇: [Cisco-CCNP]学习EIGRP的几个概念
bkzone
博客等级 码龄19年 10粉丝 20原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值