wy168 发表于 2024-1-5 13:26:13

手把手教你在ARM上配置Windows虚拟机


    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">能不能通过虚拟机usb重定向功能安装打印机,然后再通过云打印共享给pc使用,这样岂不是免去了云打印必须依赖一台x86windows电脑的刚需,经过两天的摸索,终于是走通了这条路,现将最终安装教程分享如下:</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span>
                </span></strong></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">测试环境</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">●</span>CPU:FT2000、D2000</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">●</span>
            </span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">操作系统系统:统信UOS专业版(1050)</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">●</span>qemu-system-x86_64软件version:3.1.0</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span><span style="color: green;">关于镜像和软件选择的几点说明</span></span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">●</span>
            </span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">首推选择xp系统,只是因为他比win7快很多,占用的空间也小很多!</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><span style="color: green;">●</span>
            </span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">如果用惯了统信云打印,那么只能装win7,统信云打印服务端并不支持在xp上运行。</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">●如果你还想在虚拟机上运行点什么简单的软件程序,推荐使用xp,win7虚拟机内打开文件夹都卡的要死,最好不要尝试运行什么程序。</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">●个别打印机驱动可能在xp上会安装失败(少数),请尝试使用win7</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span><span style="color: green;">准备工作</span></span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">●xp/win7镜像可以去(https://msdn.itellyou.cn/)下载,推荐安装32位vol版本</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">●麒麟/统信云打印服务端和客户端程序</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">●打印机驱动程序(推荐去打印机官网下载,一定记得下载系统对应驱动)</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">●sudo apt install qemu-system-x86 virt-manager -y (虚拟机软件)</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">公众号回复“</span><span style="color: green;">麒麟云打印</span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">”下载麒麟云打印安装包</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">公众号回复“</span><span style="color: green;">统信云打印</span><span style="color: green;">”下载统信云打印安装包</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span>安装步骤</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">1.#开启NAT默认虚拟网络</p>
      <span style="color: green;">sudo virsh net-start default</span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">2.创建qcow2格式磁盘</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">qemu-img create -f qcow2 /path/to/xp.qcow2 10G</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">这个地址可以随便设置,创建后虚拟机磁盘文件使用多少空间就占用多少大小。(不知道是我的问题还是bug,通过virt-manage创建的qcow2磁盘占用全部空间)</span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">2.安装xp虚拟机</p>
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">打开虚拟系统管理器</p>
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"> 文件-新建虚拟机</p> 1)本地安装介质-选择
      <span style="color: green;">x86_64架构</span><span style="color: green;">
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">(兔神推荐)-前进-浏览</p> 2)左下角“
      </span><span style="color: green;">+</span><span style="color: green;">
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">”——名称“xp镜像”——前进</p> 3)“
      </span><span style="color: green;">浏览</span><span style="color: green;">
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">”添加xp镜像所在目录</p>
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"> 4)左边选择“xp镜像”——右边选择目录下你下载的镜像文件-选择卷</p>
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"> 5)选择内存大小和cpu核心数(内存自己看,如果是arm架构选择多核也没用)</p>
            <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"> 6)选择或者创建自定义存储-左边选第2步创建文件的目录-右边选第2步创建的磁盘文件。</p>
      </span>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"> 7)名称“winxp”(自拟)-勾选安装前自定义——选择网络-虚拟网络‘</span><span style="color: green;">default’:NAT</span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">——完成</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">3.安装xp系统,此过程不需要介绍吧,key请网络自行百度</p>4.安装完成后需要在虚拟机硬件详情里删除IDE CDROM(安装镜像)
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;">5.开启虚拟机共享,或者</span><span style="color: green;">添加硬件</span><span style="color: green;">—</span><span style="color: green;">—usb主机设备</span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">将U盘、打印机连接到虚拟机,将麒麟云打印的服务端程序、打印机安装文件拷贝到到虚拟机里并安装。</p>6.在虚拟机里设置云打印服务端的ip和密码。
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">7.关闭虚拟机防火墙,打开虚拟机文件共享,启用发现文件和打印机。</p>
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;">8.在主机上安装麒麟云打印客户端</p>9.打开麒麟云打印,输入虚拟机地址和密码,完成打印机共享
      
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span>运行截图</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/ac335c08278846a493d8ceba73464fed~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568548&amp;x-signature=sU89KHPScOz6jLwV5z%2FwtpMVx0Q%3D" style="width: 100%; margin-bottom: 20px;"></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4493daf526b143ae88d9853d03296ae5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1704568548&amp;x-signature=fBNzZVAx%2FInctF8VMnyaMjQ6dVU%3D" style="width: 100%; margin-bottom: 20px;"></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;"><span style="color: green;">※</span>优化环境(可选)</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><strong style="color: blue;">1.虚拟机共享和主机共享文件夹,可以和局域网所有电脑共享。</strong></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><strong style="color: blue;">2.将虚拟机取消屏保、取消休眠。</strong></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><strong style="color: blue;">3.可以利用virsh命令操作xml文件完成虚拟机开机后台静默启动,经测试虚拟机运行时占用主机资源很少,并不会影响主机正常使用。</strong></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><strong style="color: blue;">4.可以使用Remmina远程控制调试虚拟机,可调分辨率、直接添加共享目录,方便调试虚拟机环境。</strong></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">※暂未解决的已知BUG</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">1.xp+麒麟云打印环境打印word文档中的图片会出现马赛克,win7+统信云打印没有这个问题。</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">2.<strong style="color: blue;"><span style="color: green;">xp+麒麟云打印环境</span>打印多页文档中间会打印机会停顿一会儿再打,不确定是打印机型号问题还是云打印的问题,或者是虚拟机的问题,有待进一步测试排障。</strong></span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">3.如打印机未正确安装会导致虚拟机云打印服务端卡死。</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">4.慢!慢!慢!</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">※成品下载</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">为了节约安装windows的时间,小编精心为您准备了我已经装好的win7和统信云打印服务端,特供伸手党以及没有时间和精力自己折腾的老板们!</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">使用方法:</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">终端开启命令:</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">virt-win7-cloud-print</span></strong></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">终端关机命令:</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">virt-win7-cloud-print-shutdown</span></strong></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">开启虚拟机程序后打开“</span></strong><span style="color: green;"><strong style="color: blue;"><span style="color: green;">虚拟系统管理器</span></strong></span></p><p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;">”打开目标虚拟机进行调试。</strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">打开</span></strong><span style="color: green;"><strong style="color: blue;"><span style="color: green;">Remmina</span></strong></span><strong style="color: blue;"><span style="color: green;">程序,“服务器”输入虚拟机ip,用户名uos,密码为空,连接即可。推荐Remmina使用“客户机分辨率”“RemoteFX(32位)”勾选“忽略证书”“字形缓存”,开启“共享目录”可讲本机目录共享到虚拟机。</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">可以在启动器右键设置开机启动.</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">本程序为后台运行,因开启关闭虚拟机时间较长写了运行提示框,虚拟机运行过程中没有窗口,调试需执行以上3/4两种方法.推荐使用</span></strong><span style="color: green;"><strong style="color: blue;"><span style="color: green;">Remmina。</span></strong></span></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><strong style="color: blue;"><span style="color: green;">在不更换网卡的情况下,ip地址默认为:</span></strong></p>
    <p style="font-size: 18px; line-height: 40px; text-align: left; margin-bottom: 30px;"><span style="color: green;"><strong style="color: blue;"><span style="color: green;">192.168.122.240</span></strong></span></p>


页: [1]
查看完整版本: 手把手教你在ARM上配置Windows虚拟机