使用 docker 部署 kvm 图形化管理工具 WebVirtMgr

news2024/9/21 20:32:25

文章目录

    • @[toc]
    • 前提条件
    • 镜像构建
    • 启动 webvirtmgr
      • 创建其他 superuser
      • 配置 nginx 反向代理和域名访问
      • 绑定 kvm 宿主机
        • local socket
        • tcp 连接
      • 虚拟机创建
      • 创建快照
      • 虚拟机克隆
      • 删除虚拟机

  • kvm 官方提供了以下这些图形化管理,license 这块也提示了是商业版(Commercial)的还是哪个开源协议的,或者免费的范围
  • 这边主要的需求就是有个 kvm 的图形化管理工具,通过浏览器就可以访问,机器不多,也不涉及私有云,这边就选择了 WebVirtMgr,能有简单的颜值,还有 vnc 模式访问虚拟机
    • WebVirtMgr 是用 PythonDjango 编写的,基于 Libvirt 的 Python 接口,将日常 kvm 的管理操作变的更加的可视化。
    • WebVirtMgr的官网地址:http://retspen.github.io/
    • WebVirtMgr的 github 地址:https://github.com/retspen/webvirtmgr
Name/URLDescriptionUI TypeLast UpdatedNotesLicense
AbiquoAbiquo is a technology-agnostic solution for enterprises and service providers who want to quickly and simply build, manage and develop public and private clouds based on their existing heterogeneous environments.Web, RESTActiveKVM, Xen, VirtualBox, VMware, Hyper-V & XenServer support; uses libvirtCommercial
ArchipelArchipel is an Open Source project that aims to bring push notifications to virtualization orchestration using XMPP.WebActiveKVM, Xen, Virtual Box & OpenVZ support; uses libvirtAGPL v3
AQemua Qt4 user interface for KVMDesktop2013-05-30GPL v2
cloonixcloonix is a virtualization management framework aimed at virtual networks building based on kvm.Gui/cliActiveKVMRPL Licence
CloudStackCloudstack is an open source project that enables the deployment, management, and configuration of multi-tier and multi-tenant infrastructure cloud services using Xen, KVM and VMware hypervisors.WebActiveKVM, Xen & VMware supportApache License v2
ConVirtConVirt 2.0 Open Source is the leading open source product for managing Xen and KVM, enabling you to standardize and proactively manage your virtualized environment in a centralized fashion.WebActiveXen & KVM; formerly known as xenmanGPL v2
Enomalya programmable virtual cloud infrastructure for small, medium and large businessesWeb, RESTNot available as of 2010-02-08they have commercial and open source editionsCommercial/AGPL v3
EucalyptusEucalyptus is open source software for building AWS-compatible private and hybrid clouds. Eucalyptus allows IT organizations to build an on-premises Infrastructure as a Service (IaaS) cloud that pools together compute, storage, and network resources. With Eucalyptus, developers can leverage knowledge and tools around AWS APIs, including EC2, S3, EBS, IAM, Auto Scaling, Elastic Load Balancing, and CloudWatch. IT can create a flexible hybrid cloud environment so that developers can develop sooner, test more, and deploy faster while giving IT and cloud admins greater control of cloud performance, scale, and security.Web, CLI, REST, SOAPActiveSupports KVM and VMware. Uses libvirt. View the Eucalyptus Compatibility Matrix: http://bit.ly/QfH4IvGPL v3
ForemanForeman is aimed to be a Single Address For All Machines LifeCycle Management including bare metal / vm / cloud provisioning, configuration managememnt and configureation reports/auditing using puppetWeb, REST, CLIActiveKVM, VMWare, oVirt RHEV-M, EC2, OpenStackGPL v3
GanetiGaneti is a cluster virtual server management software tool built on top of existing virtualization technologiesCLIActiveKVM support added in Ganeti 2.0GPL v2
GKVMA Gnome user interface for KVM.Desktop2007-08-01GPL v2
KaresansuiKaresansui is an open-source virtualization management application. It’s smart graphical user interface lowers your management cost, and brings a total management/audit solution for both physical and virtual servers.Web, RESTNovember 2013KVM & Xen support; uses libvirtLGPL v2.1/GPL v2
kimchiKimchi is an HTML5 based management tool for KVM. It is designed to make itas easy as possible to get started with KVM and create your first guest.WEBActiveKVMLGPL,Apache License v2
KubevirtVirtualization API for KubernetesCLI, APIActiveRun VMs in KubernetesApache License v2
kvmadma minimalistic set of command-line tools to control multi-user utilization of KVMCLI2007-09-25GPL v2
kvmupdownsimple, robust and no-bloat management interface.CLILink broken, probably terminated projectKVMpublic domain
kvm-adminPython scripts for managing the guests (boot, shutdown …) and include a commandline monitor .CLIActivekvm supportGPL v2
kvm-wrapperkvm-wrapper is a lightweight, simple and intended to be hackable set of shell scripts that help manage kvm virtual machines a great deal.CLIActiveKVM supportWTFPL (v2)
Mist.ioMist.io provides a unifed dashboard / API for managing your entire infrastructure - public and private clouds, KVM and VMware hypervisors, bare metal, and containers. You can install the open-source version or use the freemium service. Try it outWeb, Mobile, REST API, CLIActiveUses libvirt and libcloud for VM management. Supports KVM, several public cloud providers, OpenStack, Docker and bare metal servers.AGPL v3 for the open source version, Commercial for the service
MorpheusMorpheus provides a single dashboard for managing hybrid infrastructure - KVM, Xen, VMware hypervisors, public clouds, bare metal, and containers. Learn more.UI, API, and CLIActiveCommercial (community licensing for testing and lab environments; up to 25 workloads and 3 clouds)
nbsvmNo Bullshit VMs. No setup required. No dependencies but sudo, and LVM or ZFS. Start, stop, create and clone images and view VMs using simple chained commands. Basically applies sane (overridden by cli or file) defaults to the kvm invocation and gets out of the way. Sudo invocation is designed to allow user access controls.CLIFebruary 2014WTFPL 2
Nimbula DirectorNimbula Director is a Cloud Operating System that enables Infrastructure as a Service using the KVM.Web, CLI, RESTActiveKVM supportCommercial (Freemium)
op5op5 develops and delivers op5 Monitor a enterprise-class software for IT monitoring and administration of the whole IT. op5 developed a KVM plug-in to monitor KVM virtualization infrastructure that allows organizations to have better capacity planning, which enables the provisioning of usage of resources such as storage, CPU, and memory more proactively.Web, RESTActiveUses libvirtGPL v2
OpenNebulaan open source virtual infrastructure engineCLI, XML-RPCActivecloud computing managment; uses libvirtApache License v2
OpenNodeRHEL/CentOS based open-source server virtualization and management solution - simple bare-metal installer, providing KVM+OpenVZ host and standard libvirt, func management interfaces together with standard cli tools like virsh and vzctl. OpenNode Management Server with ajax web-based management console available - as is RPC-JSON API interface.Web, CLI, APIActiveBare-metal installer, KVM, OpenVZ hypervizors and variety of management toolsUnknown
openQRMopenQRM is the next generation, open-source Data-center management platform.WebActiveKVM, Xen, VMware and Linux V-Server supportGPL v2
oVirtoVirt is a virtualization management framework constisting of a small host image, the oVirt Node, that provides the libvirt service to host virtual machines, and a robust vm management software stack, controlled by a web-based management interface, the oVirt Server.WebActiveuses libvirtApache License v2
Platform9 Managed OpenStackPlatform9 makes it very easy to manage a KVM environment with resource pooling and automation. Platform9’s Openstack service easily integrates with any new or existing Linux servers. KVM expertise is helpful but not required. The OpenStack service supports major Linux distributions including CentOS, RHEL & Ubuntu. See the demos for KVM.UI, OpenStack CLI, OpenStack API & integrations (puppet, ansible, chef, vagrant, etc).ActiveFast, Easy & Affordable for anyone familiar with Linux. See KVM Management w/ OpenStack.Commercial. A free trial is available.
Proxmox VEProxmox Virtual Environment (Proxmox VE) is an open-source server virtualization management platform to manage VMs and containers.The Debian-based platform uses KVM as hypervisor and also provides OS-level virtualization using LXC containers. It provides enterprise-class features like clustering, high availability, networking, live migration, backup/restore, integrates a built-in firewall and come with various storage plugins such as LVM, LVM-thin, iSCSI/kernel, iSCSI/libiscsi, Ceph/RBD, Sheepdog, ZFS over iSCSI, ZFS (local), directory, NFS, CIFS, and GlusterFS.Web, CLI, APIActiveBare-metall ISO installer including KVM and LXC management toolsAGPL v3
PVM( PDNSoft Virtual Machine Management System) is a hypervisor based on KVM.It provides new application stack to manage KVM virtual machines instead of using Libvirt with it’s own considerations.Cluster and user awareness is specific features in PVM design, so managing of HA and other features is done by PVM application stack that is placed directly on KVM.Desktop,CLIActiveBar-metall installerCommercial
Plain qemu/kvmYou can run qemu/kvm straight from the command lineCLIActiveSee man (qemu-system-x86_64 or kvm or qemu-kvm) for more infoGPL v2
Red Hat Virtualization / RHVCommercial management solution for RHEL / KVM.WebActiveCommercial
SolusVMThe most popular control panel for commercial use.WebActiveKVM, Xen & OpenVZ supportCommercial
Stackops Openstack DistroStackops is an Openstack Nova distribution verified and tested for KVM. You only need to download the ISO image with the distro and install it on one or more servers.CLI, RESTActiveKVM & QEMU (libvirt based)Apache License v2
UVMMUCS Virtual Machine Manager (UVMM) is an easy-to-use and powerful administration tool for KVM. It virtualizes Microsoft Windows, Univention Corporate Server and other Linux distributions by providing all the necessary functions for creating and managing virtual instances (also OpenStack and Amazon EC2-based resources) and hard drives on physical servers centrally via a web-based modern interface. On AWS it also manages Virtual Private Clouds (VPC). UVMM is included in Univention Corporate Server by default, an easy-to-use and scalable Enterprise distribution with an integrated management system for the central management of heterogeneous environments.Web, CLIActiveSupports KVM, Uses libvirtFree for use, AGPL v3
virshA minimal shell around libvirt for managing VMsCLIActiveUses libvirtLGPL
VirtualbricksPython-gtk GUI to manage guest and hybrid (host/guest) networks.CLI2011-11-23kvm, qemu, ksm & VDE supportGPL v2
VMM / Virtual Machine ManagerAlso known as virt-manager. A desktop user interface for managing virtual machines.DesktopActiveUses libvirtGPL v2
VMM’s supporting tools virt-install/clone/convertCommand line tools for provisioning new VMs, cloning existing VMs and importing / converting appliance images.CLIActiveUses libvirtGPL v2
VMmanagerSoftware solution for virtualization management that can be used both for hosting virtual machines and building a cloud. With VMmanager you can manage not only one server, but a large cluster of hypervisors. It delivers a number of functions, such as live migration that allows for load balancing between cluster nodes, monitoring CPU, memory and I/O operation enabling to detect problematic nodes, use of local and networks storages, and many tools for efficient management.Web, CLI, RESTActiveKVM, uses libvirtCommercial
vmmaestrovmmaestro is a tiny shell script which can start/stop/monitor KVM guests.CLIActiveKVMMIT License
VM-KingVM-King is an Android App that allows you to manage your hypervisior remotely from your Android mobile or tablet. This app supports the following functions: Start/stop/destroy VM, restore and delete snapshots, get screenshot of running VMs, get remote display connection information (VNC/Spice).mobile, tabletActiveKVMfree
WebVirtMgrWeb service for managing VMs based on the KVMWEBActiveOnly KVM; use libvirtApache License v2
WitsbitsWitsbits enables you to set up your servers with virtualization and deploy virtual machines faster than ever before. It’s a complete virtualization solution with a self-upgrading hypervisor and cloud-based centralized management, reducing time spent on maintenance to a fraction of what other solutions require. The self-configuring hypervisor comes as a Live CD, delivering the fastest time-to-deployment by removing the need for spending time on installation and configuration.WebActiveLive CD Hypervisor with SaaS Management SystemFree for 5 CPUs (full version)

前提条件

开始这篇文章的时候,默认已经部署了 kvm,如果没有部署,可以参考我之前的博客:CentOS 7 部署 KVM 虚拟化

以下的操作环境是 centos 7 这个发行版

镜像构建

  • 官方最后一次更新已经是 2015年6月22日 了,官方也没有 docker 镜像,这边选择咱们自己构建
  • 如果你的服务器有魔法,可以直接 git clone 一下 webvirtmgr 的包,没有的话,可以和我一样,提前从 github 上下载下来,上传到机器上,然后 ADD 到容器里面
  • 这个项目已经很悠久了,只能用 2.x 的 python,这里就直接用 python 作为基础镜像
FROM docker.m.daocloud.io/centos:7.6.1810

ADD start.sh /start.sh
ADD webvirtmgr-4.8.9.tar.gz /

WORKDIR /webvirtmgr-4.8.9

# yum 相关的依赖
RUN rm -f mv /etc/yum.repos.d/*.repo && \
    curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo && \
    yum install -y epel* && \
    yum install -y python-pip libvirt-python libxml2-python python-websockify gcc python-devel && \
    yum clean all

# python 相关的依赖
RUN pip install numpy==1.16.3 -i https://mirrors.aliyun.com/pypi/simple/ && \
    pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ && \
    echo no | python manage.py syncdb && \
    echo yes | python manage.py collectstatic

# webvirtmgr 通过 tcp 连接 kvm 相关的依赖
RUN yum install -y cyrus-sasl cyrus-sasl-scram cyrus-sasl-devel cyrus-sasl-md5 && \
    yum clean all

CMD ["/usr/bin/bash","/start.sh"]

这里是 ADD 里面的启动脚本 start.sh,本地记得 chmod +x start.sh 加个执行权限

#!/usr/bin/bash
if [ ! -f "/webvirtmgr-4.8.9/webvirtmgr.sqlite3" ];then
  echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@localhost', '1qaz@WSX')" | /usr/bin/python /webvirtmgr-4.8.9/manage.py shell
  /usr/bin/python /webvirtmgr-4.8.9/manage.py run_gunicorn --bind 0.0.0.0:8000 --log-file /webvirtmgr-4.8.9/webvirtmgr.log --daemon
  nohup /usr/bin/python /webvirtmgr-4.8.9/console/webvirtmgr-console &> /dev/null &
else
  echo "/webvirtmgr-4.8.9/webvirtmgr.sqlite3 exist"
fi

tail -f /webvirtmgr-4.8.9/webvirtmgr.log

构建镜像

docker build -t webvirtmgr:4.8.9-centos-7.6 .

启动 webvirtmgr

启动参数仅供参考,里面有些配置是我本地环境相关的

  • 如果 kvm 和 webvirtmgr 是相同机器,可以把 /var/run/libvirt/libvirt-sock 文件带入到容器内,就可以实现 local socket 的方式连接 kvm 宿主机了
docker run -d \
--restart=always \
--network host \
--memory 1024m \
--name webvirtmgr \
-v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
webvirtmgr:4.8.9-centos-7.6

创建其他 superuser

进入 webvirtmgr 容器

docker exec -it webvirtmgr bash

创建其他超级用户

python manage.py createsuperuser

浏览器访问 IP:8000 看看能不能访问到 webvirtmgr 的页面

在这里插入图片描述

默认的用户名是 admin,密码是 1qaz@WSX,在启动脚本里面可以找到

在这里插入图片描述

配置 nginx 反向代理和域名访问

这一步不是必须的,有需求就做,这里也是用的 docker 容器的方式运行的,下面是需要打包到容器内的配置文件

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    # access_log  /var/log/nginx/access.log  main;

    # sendfile        on;
    # tcp_nopush     on;

    keepalive_timeout  65;
    gzip  on;

    server {
        listen       80;
        # 这里的域名,修改成自己的
        server_name  virtmgr.icu;
        # access_log /var/log/nginx/webvirtmgr_access_log;

        location / {
            proxy_pass http://192.168.18.222:8000;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_connect_timeout 600;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            # 这里的配置,也可以再放大一点,这个会影响 iso 镜像的上传
            ## 如果直接放到指定的 iso 目录下,那就不受影响
            client_max_body_size 5120M;
        }

        location /static {
            proxy_pass http://192.168.18.222:8000/static;
        }
    }
}

下面是 Dockerfile

FROM docker.m.daocloud.io/nginx:1.26.0
ADD ./nginx.conf /etc/nginx/nginx.conf

构建镜像

docker build -t webvirtmgr-static:4.8.9-nginx-1.26.0 .

启动镜像

docker run -d --rm \
-p 80:80 \
--memory 200m \
--name webvirtmgr-static \
webvirtmgr-static:4.8.9-nginx-1.26.0

使用域名访问,域名没有 dns 解析的,可以本地自己配置一下 hosts

绑定 kvm 宿主机

local socket

在浏览器开始配置

在这里插入图片描述

绑定后,和主机通信成功的,就是绿色的,点击 192.168.18.222-local 就可以进去管理了

在这里插入图片描述

我本地用 virsh 创建过虚拟机,这里可以看到,也被展示出来了

在这里插入图片描述

tcp 连接

修改 kvm 配置,如果 kvm 已经有机器的,这个操作需要慎重考虑一下,或者有个环境能小规模模拟一下

  • /etc/libvirt/libvirtd.conf
# 修改 /etc/libvirt/libvirtd.conf 文件,把下面这些参数的注释打开
listen_tls = 0
listen_tcp = 1
tcp_port = "16509"
listen_addr = "0.0.0.0"
auth_tcp = "sasl"
  • /etc/sysconfig/libvirtd
# 修改 /etc/sysconfig/libvirtd  文件,把下面参数的注释打开
LIBVIRTD_ARGS="--listen"
  • /etc/sasl2/libvirt.conf
# 修改 /etc/sasl2/libvirt.conf 文件,把下面参数的注释修改,注释掉之前打开的参数
mech_list: DIGEST-MD5
sasldb_path: /etc/libvirt/passwd.db

配置用户名密码,输入两次密码回车就可以了

saslpasswd2 -a libvirt virtadmin

验证授权文件

sasldblistusers2 -f /etc/libvirt/passwd.db

可以看到用户名和主机名

virtadmin@dream: userPassword

检查是否有 DIGEST-MD5 类型,没有该类型的话,执行 tcp 连接会有下面的报错:

  • error: failed to connect to the hypervisor
  • error: authentication failed: authentication failed
pluginviewer -c | grep -i 'DIGEST-MD5'

如果没有返回的话,安装一下相关的插件

yum install -y cyrus-sasl cyrus-sasl-scram cyrus-sasl-devel cyrus-sasl-md5

重启 kvm

systemctl restart libvirtd

测试 tcp 连接

virsh -c qemu+tcp://dream/system list

提示输入用户名密码,然后能正常返回虚拟机列表

Please enter your authentication name: virtadmin
Please enter your password:
 Id    Name                           State
----------------------------------------------------
 1     openeuler-20.03-lts-sp4-init   running

在 webvirtmgr 添加 tcp 连接

在这里插入图片描述

绑定后,和主机通信成功的,就是绿色的,点击 192.168.18.222-tcp 就可以进去管理了

在这里插入图片描述

和上面的 local socket 一样,可以看到之前创建过的虚拟机

在这里插入图片描述

虚拟机创建

  • 虚拟机创建这块,还是 virt-manager 相对方便点,使用 webvirtmgr 创建虚拟机,需要先去存储池创建镜像(前提是,网络这些都创建好了,因为我的是之前使用过 kvm 创建,所以相关信息也都直接带入了,就只需要创建存储池的镜像就好了)

在这里插入图片描述

创建虚拟机

  • 确认存储池创建了对应的镜像
  • New Instance 创建实例
  • Custom Instance 的方式创建
  • 配置虚拟机名称,CPU,内存资源,选择提前创建的磁盘镜像和网络网卡,关闭主机模式,点击创建
  • 在设置 -> media 里面找到需要使用的 iso 镜像,点击连接
  • 在Power里面点击启动
  • 在Access里面点击控制台

在这里插入图片描述

进入到指定的主机里面,点统计可以看到当前的机器资源使用情况

在这里插入图片描述

此处省略安装过程,这边可以查看一下基础架构,可以看到展示的内容都是一样的

在这里插入图片描述

查看 kvm 宿主机的资源使用情况

在这里插入图片描述

创建快照

  • To take a snapshot, shutdown the instance. 从快照持可以看到,快照要求先关机,暂停也不行

在这里插入图片描述

虚拟机克隆

和快照一样,克隆也需要关机

  • 设置里面找到克隆
  • 点一下 random MAC address 获取一个随机的 MAC 地址,避免和之前的机器冲突了,导致网络不通
  • 根据情况,选择修改克隆后的机器名称和磁盘镜像名称
  • 选中 Metadata 后,点击克隆就可以了

在这里插入图片描述

删除虚拟机

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2103018.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

rometheus Blackbox监控网站

Blackbox Exporter简介 blackbox_exporter 是 Prometheus 拿来对 http/https、tcp、icmp、dns、进行的黑盒监控工具,也就是从服务、主机等外部进行探测,来查看服务、主机等是否可用。 Blackbox Exporter 默认端口是 9115, 安装1 wget htt…

Codeforces Round (Div.3) C.Sort (前缀和的应用)

原题: time limit per test:5 seconds memory limit per test:256 megabytes You are given two strings a and b of length n. Then, you are (forced against your will) to answer q queries. For each query, you are given a range …

Dify 与 FastGPT 流程编排能力对比分析

Dify 与 FastGPT 流程编排能力对比分析 一、引言 在人工智能快速发展的今天,大语言模型(LLM)应用平台正在重塑各行各业的工作流程。其中,Dify 和 FastGPT 作为两款具有重要影响力的工具,凭借各自独特的流程编排能力&a…

智能化升级:AI在客服知识库中的应用

引言 在数字化时代,客户服务已成为企业竞争的关键一环。随着人工智能(AI)技术的飞速发展,传统客服模式正经历着前所未有的变革。AI与客服知识库的深度融合,不仅极大地提升了客服处理的效率与准确性,还为用…

unreal engine 5.4.4 runtime 使用PCG

Unreal PCG Runtime runtime环境下控制PCG PCG Graph 这里简单的在landscape上Spawn Static Mesh 和 Spawn Actor GraphSetting 自定义的参数,方便修改 场景 这里新建了一个蓝图Actor PCG_Ctrl, 用来runtime的时候控制PCG生成 Construct 获取场景中的PCGVolum…

Oracle版本简介手册

Oracle版本简介手册 图1—数据库发布路线图表 Oracle数据库的各个版本反映了其技术的发展历程和功能增强,从最早的Oracle 1(1979年)到最新的版本,每个版本都带来了新的特性和改进,以满足不断变化的企业需求。以下是Or…

【数学建模国赛思路预约】2024全国大学生数学建模竞赛助攻思路、代码、论文

2024年全国大学生数学建模大赛马上就要开始了,大家有没有准备好呢,今年将会和之前一样,将会在比赛赛中时期为大家提供比赛各题的相关解题思路、可运行代码参考以及成品论文。 一、分享计划表如下所示 1、 赛中分享内容包括(2023国…

详解React setState调用原理和批量更新的过程

1. React setState 调用的原理 setState目录 1. React setState 调用的原理2. React setState 调用之后发生了什么?是同步还是异步?3. React中的setState批量更新的过程是什么? 具体的执行过程如下(源码级解析)&#x…

马尔科夫决策过程(MDP):详解与应用

马尔科夫决策过程(MDP):详解与应用 引言 在人工智能、机器学习和运筹学等领域,马尔科夫决策过程(Markov Decision Process,MDP)是一个基础而重要的数学模型。MDP 被广泛应用于优化决策问题&am…

1.1什么是SQL注入

SQL 注入(Injection) 概述 SQL注入即是指web应用程序对用户输入数据的合法性没有判断或过滤不严,攻击者可以在web应用程序中事先定义好的查询语句的结尾上添加额外的SQL语句,在管理员不知情的情况下实现非法操作,以此来…

异步 “一发入魂“

异步 概述: 异步就是从主线程发射一个子线程来完成任务。 什么时候用异步编程 主线程作为一个线程,不能够同时接受多方面的请求。所以,当一个事件没有结束时,界面将无法处理其他请求。 为了避免这种情况的发生,我们…

zookeeper是啥?在kafka中有什么作用

一、Zookeeper是啥 问AI,它是这么说: ZooKeeper是一个开源的分布式协调服务。 ZooKeeper最初由雅虎研究院开发,用于解决大型分布式系统中的协调问题,特别是为了避免分布式单点故障。它被设计成一个简单易用的接口集,封…

家教管理系统设计与实现

摘 要 传统办法管理信息首先需要花费的时间比较多,其次数据出错率比较高,而且对错误的数据进行更改也比较困难,最后,检索数据费事费力。因此,在计算机上安装家教管理系统软件来发挥其高效地信息处理的作用&#xff0c…

《Cloud Native Data Center Networking》(云原生数据中心网络设计)读书笔记 -- 09部署OSPF

本章的目的是帮助网络工程师确定网络的理想 OSPF 配置。本章将回答以下问题 应何时在数据中使用OSPF ?配置 OSPF 的关键设计原则是什么?OSPFv2 和 OSPFv3 之间有什么区别,应如何使用?如何在路由协议栈中配置 OSPF ?如何在服务器上配置 OSPF,例如为容…

【Python机器学习】词向量推理——词向量

目录 面向向量的推理 使用词向量的更多原因 如何计算Word2vec表示 skip-gram方法 什么是softmax 神经网络如何学习向量表示 用线性代数检索词向量 连续词袋方法 skip-gram和CBOW:什么时候用哪种方法 word2vec计算技巧 高频2-gram 高频词条降采样 负采样…

SpringMvc--后续(参数问题)

参数问题 package com.hwq.controller;import com.hwq.beans.User; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframewo…

vllm源码解析(一):整体架构与推理代码

vlllm官方代码更新频发,每个版本都有极大变动, 很难说哪个版本好用. 第一次阅读vllm源码是0.4.0版本,对这版圈复杂度极高的调度代码印象深刻 0.4.1对调度逻辑进行重构,完全大变样, 读代码速度快赶不上迭代的速度了。 现在已经更新到0.5.4, 经过长时间观察,发现主要的…

认知杂谈34

今天分享 有人说的一段争议性的话 I 环境的影响 I 首先得说说,环境这东西对人的影响真不是盖的。你要是老待在一个死气沉沉的地方,那你的激情和梦想,可能慢慢就会被磨得平平无奇。 I 激情的消逝 I 本来你可能是满怀激情,想要大干一…

HMI触屏网关-VISION如何与Node-red通信

上文:HMI触屏网关-VISION如何与Modbus TCP从机通信-CSDN博客 1. Node-red启用HTTP监听 HTTP监听,用于模拟WebAPI服务端,接收WebAPI客户端GET请求。 启用HTTP监听服务,选择请求方式GET;URL自定义,本示例设…

人活着的意义是什么

大家好,我是凡人。 最近很多行业已经受到了 AI 带来的冲击,造成现在网络上一些消极情绪滋生。 这篇文章来源于我回答了一个知乎小哥的问题后,有了点思考,他的问题是这样的“可能我们普通人一辈子都无法为人类社会做出大的贡献&a…