kvm

如何在 Ubuntu 20.04 上安装 Vagrant

試著忘記壹切 提交于 2020-08-04 20:25:34
本文最先发布在: https://www.itcoder.tech/posts/how-to-install-vagrant-on-ubuntu-20-04/ Vagrant 是一个命令行工具,用于构建和管理虚拟开发环境。 默认情况下,Vagrant 在 VirtualBox, Hyper-V, 和 Docker 之上准备环境。支持其他提供者,例如, Libvirt (KVM), VMware and AWS 可以通过 Vagrant 插件系统启用。 Vagrant 通常被开发者用来建立匹配生产环境的开发环境。 这篇文章描述如何在 Ubuntu 20.04 机器上安装 Vagrant。我们将会使用 VirtualBox,Vagrant 默认的提供者。 一、在 Ubuntu 上安装 Vagrant 我们将会在 VirtualBox 的基础上提供虚拟机。 如果 VirtualBox 没有安装在你系统上,你可以运行下面的命令安装它: sudo apt update sudo apt install virtualbox Vagrant 软件包,在 Ubuntu 源仓库中提供,并且不经常更新。我们将会从官方 Vagrant 网站下载并安装最新版的 Vagrant。 在写这篇文章的时候,Vagrant 最新版是 2.2.9。浏览 Vagrant 下载页面 ,看看有没有 Vagrant

openstack安装配置—— 基础环境准备

為{幸葍}努か 提交于 2020-07-29 06:53:07
众所周知,不管是公有云也好,私有云也罢,openstack都是赫赫有名的,那么今天就给大家分享一下oenstack官方目前较新版本mitaka的安装和配置,本次将会带大家配置openstack的Identity service、Compute service、Image service、Networking service、Block Storage service、Dashboard、Orchestration service、Shared File Systems service一些常用服务模块,以下是本实验的一些前期准备。 网络环境准备 公有网络:10.0.0.0/16 私有网络:172.16.0.0/16 管理网络:192.168.10.0/24 直连接口:111.40.215.0/28 由于我使用的是远程机房中的高配服务器虚拟化出来的三台kvm虚拟机做的本实验,所以我这里使用10段地址模拟公网网络,并且新增了一个直连接口给三台虚拟机各自配置了一个公网IP, 以方便直连三台虚拟机执行配置操作,希望大家能够本实验中的网络环境,以免影响你对openstack网络的理解,在此特此说明。 controller节点: 公网IP:10.0.0.10 管理IP:192.168.10.10 直连IP:111.40.215.8 compute节点: 公网IP:10.0.0.20 管理IP

kvm虚拟化存储管理

妖精的绣舞 提交于 2020-07-29 06:15:03
1. kvm虚拟化存储介绍   KVM 的存储虚拟化是通过存储池(Storage Pool)和卷(Volume)来管理的。Storage Pool 是宿主机上可以看到的一片存储空间,可以是多种型;   Volume 是在 Storage Pool 中划分出的一块空间,宿主机将 Volume 分配给虚拟机,Volume 在虚拟机中看到的就是一块硬盘。 2. 目录类型的storage pool   文件目录是最常用的Storage Pool 类型。KVM 将宿主机目录 /var/lib/libvirt/images/ 作为默认的 Storage Pool,Volume 是该目录下面的文件了,一个文件就是一个 Volum   kvm所有可以使用的storage pool都定义在宿主机的/etc/libvirt/images目录下。每个storage pool有一个xml文件,该文件包含了storage pool的默认路径。 [root@localhost ~]# cd /etc/libvirt/storage/ [root@localhost storage]# ls autostart default.xml [root@localhost storage]# vim default.xml ....... <pool type='dir'> <name>default</name>

ubuntu 16.04 环境下实践 VLAN

淺唱寂寞╮ 提交于 2020-07-28 20:33:16
01 准备环境 环境:ubuntu 16.04 环境(物理 or 虚拟) 确认 CPU 是否支持虚拟化: # egrep -o '(vmx|svm)' /proc/cpuinfo # vmx 如果不支持,开启 KVM 嵌套虚拟化之后再重启。 1.1 安装 KVM 环境 sudo apt - get install -y qemu -kvm qemu -system libvirt -bin virt -manager bridge -utils vlan 1.2 安装 Ubuntu 图形化界面 sudo apt - get install -y xinit gdm kubuntu -desktop 02 创建 KVM 虚拟机 使用 virt-manager 创建 KVM 虚拟机,方法比较简单,由于篇幅有限,大家可以查阅相关资料自行了解。 创建完之后用 virsh list --all 查看创建的 VM: Id Name State ---------------------------------------------------- - kvm1 shut off - kvm2 shut off - kvm3 shut off 我们的实验拓扑如下: image 图中创建了 2 个 Linux Bridge:brvlan1 和 brvlan2,宿主机的物理网卡 eth0

KVM虚拟化、创建、克隆、qemu-guest-agent安装等实践过程

大兔子大兔子 提交于 2020-07-28 11:13:27
由于公司需求,所以最近学习了KVM,下面是本人安装实践过程。 安装虚拟化软件 查看CPU是否支持KVM egrep 'vmx|svm' /proc/cpuinfo --color=auto 可以看到grep出来的内容,就说明支持kvm。 通过apt进行安装 apt-get install -y qemu-kvm libvirt-daemon libvirt-daemon-system 启动并设置开机启动 systemctl start libvirtd && systemctl enable libvirtd 配置网桥网卡,如下配置 ubuntu路径: vim /etc/netplan/01-network-manager-all.yaml network: version: 2 renderer: NetworkManager ethernets: enp2s0: dhcp4: yes dhcp6: yes #bridge: br0 bridges: br0: dhcp4: no dhcp6: no addresses: [192.168.10.163/23] gateway4: 192.168.10.1 nameservers: addresses: [223.5.5.5,223.6.6.6] 重启网卡 netplan apply 安装vncserver apt-get

KVM虚拟化

喜夏-厌秋 提交于 2020-07-28 03:59:33
1. 虚拟化介绍 虚拟化是云计算的基础。简单的说,虚拟化使得在一台物理的服务器上可以跑多台虚拟机,虚拟机共享物理机的 CPU、内存、IO 硬件资源,但逻辑上虚拟机之间是相互隔离的。 物理机我们一般称为宿主机(Host),宿主机上面的虚拟机称为客户机(Guest)。 那么 Host 是如何将自己的硬件资源虚拟化,并提供给 Guest 使用的呢? 这个主要是通过一个叫做 Hypervisor 的程序实现的。 根据 Hypervisor 的实现方式和所处的位置,虚拟化又分为两种: 全虚拟化 半虚拟化 全虚拟化: 全虚拟化: Hypervisor 直接安装在物理机上,多个虚拟机在 Hypervisor 上运行。Hypervisor 实现方式一般是一个特殊定制的 Linux 系统。Xen 和 VMWare 的 ESXi 都属于这个类型 半虚拟化: 物理机上首先安装常规的操作系统,比如 Redhat、Ubuntu 和 Windows。Hypervisor 作为 OS 上的一个程序模块运行,并对管理虚拟机进行管理。KVM、VirtualBox 和 VMWare Workstation 都属于这个类型 理论上讲: 全虚拟化一般对硬件虚拟化功能进行了特别优化,性能上比半虚拟化要高; 半虚拟化因为基于普通的操作系统,会比较灵活,比如支持虚拟机嵌套。嵌套意味着可以在KVM虚拟机中再运行KVM。 2.

Centos环境下搭建zabbix监控系统, zabbix5.0最新版

狂风中的少年 提交于 2020-07-28 02:44:11
Zabbix 是一个基于 WEB 界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。zabbix 能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题 zabbix的优点: 开源,无软件成本投入 Server 对设备性能要求低 支持设备多,自带多种监控模板 支持分布式集中管理,有自动发现功能,可以实现自动化监控 开放式接口,扩展性强,插件编写容易 当监控的 item 比较多服务器队列比较大时可以采用被动状态,被监控客户端主动 从server 端去下载需要监控的 item 然后取数据上传到 server 端。 这种方式对服务器的负载比较小。 Api 的支持,方便与其他系统结合 缺点: 需在被监控主机上安装 agent,所有数据都存在数据库里, 产生的数据很大,瓶颈主要在数据库。 监控对象: 数据库: MySQL,MariaDB,Oracle,SQL Server agent 应用软件:Nginx,Apache,PHP,Tomcat agent ------------------------------------------------------------------------------------------------------------------------------- 集群: LVS

Do x86 instructions require their own encoding as well as all of their arguments to be present in memory at the same time?

妖精的绣舞 提交于 2020-07-27 09:26:37
问题 I am trying to figure out whether it is possible to run a Linux VM whose RAM is only backed by a single physical page. To simulate this, I modified the nested page fault handler in KVM to remove the present bit from all nested page table (NPT) entries, except the one corresponding to the currently processed page fault. While trying to start a Linux guest, I observed that assembly instructions that use memory operands, like add [rbp+0x820DDA], ebp lead to a page fault loop until I restore the

Do x86 instructions require their own encoding as well as all of their arguments to be present in memory at the same time?

丶灬走出姿态 提交于 2020-07-27 09:26:27
问题 I am trying to figure out whether it is possible to run a Linux VM whose RAM is only backed by a single physical page. To simulate this, I modified the nested page fault handler in KVM to remove the present bit from all nested page table (NPT) entries, except the one corresponding to the currently processed page fault. While trying to start a Linux guest, I observed that assembly instructions that use memory operands, like add [rbp+0x820DDA], ebp lead to a page fault loop until I restore the

Do x86 instructions require their own encoding as well as all of their arguments to be present in memory at the same time?

有些话、适合烂在心里 提交于 2020-07-27 09:26:08
问题 I am trying to figure out whether it is possible to run a Linux VM whose RAM is only backed by a single physical page. To simulate this, I modified the nested page fault handler in KVM to remove the present bit from all nested page table (NPT) entries, except the one corresponding to the currently processed page fault. While trying to start a Linux guest, I observed that assembly instructions that use memory operands, like add [rbp+0x820DDA], ebp lead to a page fault loop until I restore the