windows 自带了hyper-v,可以安装一些虚机进行试验,但有时不能复制,粘贴,下面对windows和linux虚机如何实现同宿主机的复制粘贴分表介绍
对windows主机,如果要实现这一功能,必须在菜单栏打开增强会话这一模式。
对在hyper-v中运行ubuntu虚拟机,不能复制粘贴,可以用Windows与XRDP合作开发的工具 —— linux-vm-tools来实现这一功能。
操作 Ubuntu 虚拟机
在 Ubuntu 打开终端(Terminal),准备执行命令
$ sudo apt-get update
$ sudo apt install git
$ git clone https://github.com/Microsoft/linux-vm-tools.git ~/linux-vm-tools
$ cd ~/linux-vm-tools/ubuntu/16.04/
#Make the scripts executable and run them...
$ sudo chmod +x install.sh
$ sudo chmod +x config-user.sh
$ sudo ./install.sh
Install.sh 需要运行二次,还有一次是重启后运行
$ sudo ./config-user.sh
在winodws 宿主机 运行 powershell 命令:
Set-VM -VMName <your_vm_name> -EnhancedSessionTransportType HvSocket
更多文章,关注“业祥运维室(sajyx2012)”
Windows与Linux虚拟机:跨主机复制粘贴实战指南
本文详细介绍了如何在Windows主机上启用Hyper-V增强会话以实现在Ubuntu虚拟机中的复制粘贴功能,并指导读者使用Linux-VM-Tools解决Linux虚拟机复制粘贴问题。通过一步步操作和工具配合,提升虚拟机间的数据交互效率。
81

被折叠的 条评论
为什么被折叠?



