OpenShift Virtualization - 创建 Windows 虚拟机

OpenShift / RHEL / DevSecOps 汇总目录
说明:本文已经在 OpenShift 4.18 环境中验证

创建 Windows VM

  1. 在 Template catalog 中进入 Microsoft Windows Server 2019 VM。
  2. 在下图的 VM 配置界面中完成以下配置:
  • 选中 Boot from CD 选项
  • CD source 选择 URL (creates PVC)
  • Image URL 中填入 https://catalog-item-assets.s3.us-east-2.amazonaws.com/qcow_images/Windows2019.iso
  • Disk size 设为 5 GiB
  • Disk source 设为 Blank
  • Disk size 设为 60 GiB
  • 选中 Drivers 的 Mount Windows drivers disk 选项
    在这里插入图片描述
  1. 点击上图的 Customize and create VirtualMachine,然后在下图的 Overview 中为 Boot mode 选择 BIOS。
    在这里插入图片描述
  2. 进入下图的 Scripts,然后点击 sysprep 的 Edit。
    在这里插入图片描述
  3. 在 Sysprep 窗口中填入以下 XML,然后 Save。注意:Sysprep 是微软的自动化工具,可以自动在 Windows 安装软件和配置环境。
    在这里插入图片描述
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-microsoft-com:unattend">
  <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <DiskConfiguration>
        <Disk wcm:action="add">
          <CreatePartitions>
            <CreatePartition wcm:action="add">
              <Order>1</Order>
              <Extend>true</Extend>
              <Type>Primary</Type>
            </CreatePartition>
          </CreatePartitions>
          <ModifyPartitions>
            <ModifyPartition wcm:action="add">
              <Active>true</Active>
              <Format>NTFS</Format>
              <Label>System</Label>
              <Order>1</Order>
              <PartitionID>1</PartitionID>
            </ModifyPartition>
          </ModifyPartitions>
          <DiskID>0</DiskID>
          <WillWipeDisk>true</WillWipeDisk>
        </Disk>
      </DiskConfiguration>
      <ImageInstall>
        <OSImage>
          <InstallFrom>
            <MetaData wcm:action="add">
              <Key>/IMAGE/NAME</Key>
              <Value>Windows Server 2019 SERVERSTANDARD</Value>
            </MetaData>
          </InstallFrom>
          <InstallTo>
            <DiskID>0</DiskID>
            <PartitionID>1</PartitionID>
          </InstallTo>
        </OSImage>
      </ImageInstall>
      <UserData>
        <AcceptEula>true</AcceptEula>
        <FullName>Administrator</FullName>
        <Organization>My Organization</Organization>
      </UserData>
      <EnableFirewall>false</EnableFirewall>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <SetupUILanguage>
        <UILanguage>en-US</UILanguage>
      </SetupUILanguage>
      <InputLocale>en-US</InputLocale>
      <SystemLocale>en-US</SystemLocale>
      <UILanguage>en-US</UILanguage>
      <UserLocale>en-US</UserLocale>
    </component>
  </settings>
  <settings pass="offlineServicing">
    <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <EnableLUA>false</EnableLUA>
    </component>
  </settings>
  <settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <AutoLogon>
        <Password>
          <Value>R3dh4t1!</Value>
          <PlainText>true</PlainText>
        </Password>
        <Enabled>true</Enabled>
        <LogonCount>999</LogonCount>
        <Username>Administrator</Username>
      </AutoLogon>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <HideLocalAccountScreen>true</HideLocalAccountScreen>
        <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
        <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
        <NetworkLocation>Work</NetworkLocation>
        <ProtectYourPC>3</ProtectYourPC>
        <SkipMachineOOBE>true</SkipMachineOOBE>
      </OOBE>
      <UserAccounts>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Description>Local Administrator Account</Description>
            <DisplayName>Administrator</DisplayName>
            <Group>Administrators</Group>
            <Name>Administrator</Name>
          </LocalAccount>
        </LocalAccounts>
      </UserAccounts>
      <TimeZone>Eastern Standard Time</TimeZone>
    </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <InputLocale>en-US</InputLocale>
      <SystemLocale>en-US</SystemLocale>
      <UILanguage>en-US</UILanguage>
      <UserLocale>en-US</UserLocale>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
      <AutoLogon>
        <Password>
          <Value>R3dh4t1!</Value>
          <PlainText>true</PlainText>
        </Password>
        <Enabled>true</Enabled>
        <LogonCount>999</LogonCount>
        <Username>Administrator</Username>
      </AutoLogon>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <HideLocalAccountScreen>true</HideLocalAccountScreen>
        <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
        <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
        <NetworkLocation>Work</NetworkLocation>
        <ProtectYourPC>3</ProtectYourPC>
        <SkipMachineOOBE>true</SkipMachineOOBE>
      </OOBE>
      <UserAccounts>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Description>Local Administrator Account</Description>
            <DisplayName>Administrator</DisplayName>
            <Group>Administrators</Group>
            <Name>Administrator</Name>
          </LocalAccount>
        </LocalAccounts>
      </UserAccounts>
      <TimeZone>Eastern Standard Time</TimeZone>
    </component>
  </settings>
</unattend>
  1. 在点击 Create VirtualMachine 后会自动安装 Windows Server 虚机并安装要求的软件,在完成后可看到下图 Windows 虚机的运行状态。
    在这里插入图片描述

配置可迁移 Windows VM

  1. 可以看到当前 Windows 虚机的状态为 Not migratable。另外可进入 Windows 虚机的 Diagnstics 栏查看 NotMigratable 的原因:Windows 为了避免在迁移系统时出现时钟不一致的情况。
    在这里插入图片描述
  2. 可以进入 Windows 虚机的 YAML,然后将 reenlightenment 部分的 enabled 设为 false。
。。。
        features:
          acpi: {}
          apic: {}
          hyperv:
            reenlightenment:
              enabled: false
。。。
  1. 在保存配置后 Windows 虚机的状态就不再有 Not migratable 了,说明该虚机可自节点间迁移了。
    在这里插入图片描述

参考

https://rhpds.github.io/openshift-virt-roadshow-cnv-multi-user/modules/module-07-tempinst.html#create_win
https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_virtualization/optimizing-windows-virtual-machines-on-rhel_installing-and-managing-windows-virtual-machines-on-rhel

内容概要:本文档聚焦于“博士论文复现”项目,重点围绕光伏并网逆变器的阻抗建模与扫频验证方法展开,利用Simulink进行系【博士论文复现】【阻抗建模、验证扫频法】光伏并网逆变器扫频与稳定性分析(包含锁相环电流环)(Simulink仿真实现)统建模与仿真,涵盖锁相环和电流环控制环节,旨在分析并网系统的稳定性。文档不仅提供具体的技术实现路径,还强调科研过程中逻辑思维、创新意识与借助已有成果的重要性,提倡系统性学习与实践结合。此外,文中列举了多个相关科研方向的复现案例与资源链接,涵盖拟电厂调度、风光制氢、电力系统优化等多个前沿领域,形成一个综合性科研辅助资料集合。; 适合人群:具备电力电子、自动控制或新能源系统背景的研究生、博士生及科研人员,熟悉MATLAB/Simulink仿真环境,有志于从事并网逆变器稳定性分析或相关课题研究的人员。; 使用场景及目标:①复现博士论文中的光伏并网逆变器阻抗建模与扫频分析过程,掌握其理论基础与仿真技巧;②深入理解锁相环与电流环在并网系统稳定性中的作用;③获取相关科研项目的代码与数据资源,用于学术研究、论文撰写或工程验证。; 阅读建议:建议按照文档提供的目录顺序系统学习,优先下载并查看网盘中的完整资源,结合Simulink模型与代码进行实操演练,注重理论与仿真的对照分析,以加深对阻抗建模与稳定性判据的理解。
内容概要:本文介绍了基于粒子群优化算法【故障定位】基于粒子群优化算法的故障定位及故障区段研究【IEEE33节点】(Matlab代码实现)(PSO)在IEEE33节点系统上进行故障定位及故障区段判定的研究,采用Matlab代码实现。通过构建配电网故障定位的数学模型,利用粒子群算法的全局寻优能力,快速准确地识别故障发生的位置与范围。文中详细阐述了算法原理、适应度函数设计、约束条件处理及仿真流程,并结合IEEE33节点标准测试系统验证了方法的有效性和鲁棒性。此外,文档还列举了多个相关科研方向及Matlab/Simulink仿真实现案例,涵盖智能优化、器学习、电力系统管理、路径规划等多个领域,展示了广泛的科研应用场景和技术支持能力。; 适合人群:具备电力系统基础知识和Matlab编程能力的研究生、科研人员及从事智能电网、故障诊断相关工作的工程技术人员。; 使用场景及目标:① 掌握基于智能优化算法的配电网故障定位方法;② 学习如何将粒子群算法应用于实际电力系统问题建模与求解;③ 借助Matlab实现算法仿真,提升科研与工程实践能力;④ 拓展对电力系统故障诊断、优化算法应用及综合能源系统仿真的理解。; 阅读建议:建议读者结合提供的Matlab代码进行实操演练,深入理解算法实现细节与参数设置,同时可参考文档中列出的其他研究方向拓展思路,适用于科研项目开发、论文复现与算法改进。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值