[Topic DIscussion] 如何在deepin中用虚拟机安装WIN10和WIN11。
Tofloor
poster avatar
buyike
deepin
2024-12-04 19:33
Author

一直以来,都是在WIN的虚拟机中安装deepin,但现在日常使用已经稳定在deepin了,

所以想知道能否在deepin中用虚拟机安装WIN10和WIN11呢?

有大神用过没?用什么虚拟机好,体验如何,能够实用了吗?

Reply Favorite View the author
All Replies
1 / 2
To page
希声
deepin
2024-12-04 19:45
#1

qemu+kvm+virt-manager 理论上性能是最好的吧

Reply View the author
buyike
deepin
2024-12-04 20:32
#2
希声

qemu+kvm+virt-manager 理论上性能是最好的吧

你在用吗?用得如何,能细说一下吗?

Reply View the author
132******79
deepin
2024-12-04 20:47
#3

肯定能安装,但是性能就不知道了。

Reply View the author
昨夜的星辰
deepin
2024-12-04 21:33
#4

我是用的VBOX,偶尔用也只是为了虚拟机里WIN上WPS的会员功能,还行,本子内存不是特别多,台式的话性能可能会更好一些

Reply View the author
璀璨星空
deepin
2024-12-04 22:03
#5
buyike

你在用吗?用得如何,能细说一下吗?

感觉比别的虚拟机性能好一点

Reply View the author
jjcui8595
deepin
2024-12-04 22:15
#6

我一直都用VirtualBox

Reply View the author
神末shenmo
deepin
Spark-App
2024-12-04 22:39
#7

VMWare是操作最简单的

Reply View the author
buyike
deepin
2024-12-04 22:50
#8
神末shenmo

VMWare是操作最简单的

sad 最简单的,唉,我现在在WIN下用的就是它。

Reply View the author
神末shenmo
deepin
Spark-App
2024-12-04 22:58
#9
buyike

sad 最简单的,唉,我现在在WIN下用的就是它。

反正现在免费了随便用

Reply View the author
新手来啦~
deepin
2024-12-05 01:43
#10

没试过

Reply View the author
希声
deepin
2024-12-05 11:09
#11
It has been deleted!
希声
deepin
2024-12-05 11:09
#12
buyike

你在用吗?用得如何,能细说一下吗?

- # [qemu](https://www.qemu.org/docs/master/)
	- https://wiki.archlinux.org/title/QEMU
	- https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md
	-
	  ```sh
	  qemu-img create -f raw windows-server-2012.raw 60G
	  
	  QEMU’s system emulation provides a virtual model of a machine (CPU, memory and emulated devices) to run a guest OS. It supports a number of hypervisors (known as accelerators) as well as a JIT known as the Tiny Code Generator (TCG) capable of emulating many CPUs.
	  
	  # cpu支持虚拟化扩展 https://en.wikipedia.org/wiki/Hardware-assisted_virtualization
	  
	  LC_ALL=C lscpu | grep Virtualization
	  
	  zgrep CONFIG_KVM /proc/config.gz
	  # 内核加载kvm
	  lsmod |grep kvm
	  
	  sudo -E apt install qemu-system-x86 virt-manager
	  
	  sudo systemctl status libvirtd
	  
	  qemu-system-x86_64 -help
	  
	  qemu-system-x86_64 -M help
	  
	  qemu-system-x86_64 -device scsi-hd,help
	  
	  
	  
	    -drive file=windows_server.img,format=qcow2,if=virtio \
	    -cdrom /path/to/windows_server.iso \
	  
	  
	  qemu-img create -f raw windows-server-2012.raw 60G
	  qemu-img create -o backing_file=windows-server-2012.raw,backing_fmt=raw -f qcow2 windows2012.cow
	  
	  Formatting 'windows2012.cow', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=64424509440 backing_file=windows-server-2012.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16
	  
	    -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF_VARS.fd \
	  
	  
	  qemu-system-x86_64 \
	    -machine type=q35,accel=kvm \
	    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
	    -smp 4 \
	    -m 4096 \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
	    -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
	    -drive file=/home/xxl/vms/windows2012.ISO,index=2,media=cdrom \
	    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=3,media=cdrom \
	    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
	    -usb -device usb-tablet \
	    -vga qxl \
	    -monitor stdio
	  
	  qemu-system-x86_64 \
	    -machine type=q35,accel=kvm \
	    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
	    -smp 4 \
	    -m 4096 \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
	    -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
	    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=3,media=cdrom \
	    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
	    -usb -device usb-tablet \
	    -vga qxl \
	    -monitor stdio
	  
	  If you store the hard disk images on a Btrfs file system, you should consider disabling Copy-on-Write for the directory before creating any images.
	  
	  
	  virsh list --all
	  
	  gir1.2-gtk-vnc-2.0 gir1.2-libosinfo-1.0 gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 gir1.2-vte-2.91
	    gstreamer1.0-plugins-ugly ipxe-qemu libbrlapi0.6 libcacard0 libcapstone4 libfdt1 libgovirt-common libgovirt2 libgtk-vnc-2.0-0
	    libgvnc-1.0-0 libnss-mymachines libopencore-amrnb0 libopencore-amrwb0 libosinfo-1.0-0 libphodav-2.0-0 libphodav-2.0-common libpmem1
	    librdmacm1 libsidplay1v5 libslirp0 libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1 libssh-4 liburing1
	    libusbredirhost1 libusbredirparser1 libvdeplug2 libvirglrenderer0 libvirt-clients libvirt-daemon libvirt-daemon-config-network
	    libvirt-daemon-config-nwfilter libvirt-daemon-driver-lxc libvirt-daemon-driver-qemu libvirt-daemon-driver-vbox libvirt-daemon-driver-xen
	    libvirt-daemon-system libvirt-daemon-system-systemd libvirt-glib-1.0-0 libvirt0 libvte-2.91-0 libvte-2.91-common libx264-155 libxencall1
	    libxendevicemodel1 libxenevtchn1 libxenforeignmemory1 libxengnttab1 libxenmisc4.11 libxenstore3.0 libxentoolcore1 libxentoollog1
	    libxml2-utils libyajl2 osinfo-db ovmf python-asn1crypto python-certifi python-cffi-backend python-chardet python-cryptography
	    python-enum34 python-idna python-ipaddress python-openssl python-requests python-urllib3 python3-certifi python3-chardet python3-idna
	    python3-libvirt python3-libxml2 python3-pkg-resources python3-requests python3-six python3-urllib3 qemu-system-common qemu-system-data
	    qemu-system-gui qemu-system-x86 qemu-utils seabios spice-client-glib-usb-acl-helper systemd-container virt-manager virt-viewer virtinst 
	    建议安装:
	  libosinfo-l10n sidplay-base libvirt-login-shell libvirt-daemon-driver-storage-gluster libvirt-daemon-driver-storage-iscsi-direct
	    libvirt-daemon-driver-storage-rbd libvirt-daemon-driver-storage-zfs numad apparmor auditd nfs-common open-iscsi pm-utils systemtap
	    zfsutils python-cryptography-doc python-cryptography-vectors python-enum34-doc python-openssl-doc python-openssl-dbg python-socks
	    python-ntlm python3-setuptools python3-cryptography python3-openssl python3-socks python-requests-doc vde2 qemu-block-extra debootstrap
	    ssh-askpass gir1.2-secret-1 python3-guestfs
	  
	  ```
	-
	- uefi
		- `/usr/share/edk2/x64/OVMF.4m.fd` 是OVMF固件的一种变种,与普通的OVMF固件有一些区别。这里的 "4m" 指的是固件映像的大小,通常为4MB。
		- 区别在于固件映像的大小和功能,这取决于用例和虚拟化环境。以下是一些可能的区别:
		- 固件大小:OVMF.4m.fd 固件映像的大小通常比标准的 OVMF 固件大。这可以容纳更多的UEFI代码和数据,因此可以支持更多的功能。
	- [Virtio](https://wiki.libvirt.org/Virtio.html)
		- Virtio is a virtualization standard for network and disk device drivers where just the guest's device driver "knows" it is running in a virtual environment, and cooperates with the hypervisor.
	- tap bridge
		- mac
			-
			  ```sh
			  
			  
			  # To make the change permanent, change net.ipv4.ip_forward = 0 to net.ipv4.ip_forward = 1 in /etc/sysctl.d/99-sysctl.conf.
			  
			  
			  env vm_name="win-2012" qemu-system-x86_64 -name "$vm_name" -net nic,macaddr=$(qemu-mac-hasher.py "$vm_name")
			  
			  qemu-system-x86_64 \
			  -machine type=q35,accel=kvm \
			  -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			  -smp 4 \
			  -m 4096 \
			  -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
			  -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
			  -device virtio-net-pci,netdev=net0,mac=52:54:a6:f5:48:c1 \
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0 \
			  -usb -device usb-tablet \
			  -vga qxl \
			  -monitor stdio
			  
			  
			  
			  
			  # windows esd文件
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=1,media=cdrom \
			    -drive file=/home/xxl/vms/win10-ltsc.iso,media=cdrom \
			    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  
			  
			  # 改成 virtio
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk \
			    -drive file=/home/xxl/vms/win10-ltsc/dummy.qcow2,if=virtio \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=2,media=cdrom \
			    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=virtio \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=2,media=cdrom \
			    -device virtio-net-pci,netdev=net0,mac=52:54:69:33:a2:7f \
			    -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0,vhost=on \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  qemu-system-x86_64 \
			  -machine type=q35,accel=kvm \
			  -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			  -smp 4 \
			  -m 4096 \
			  -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			  -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=virtio \
			  -device virtio-net-pci,netdev=net0,mac=52:54:69:33:a2:7f \
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0 \
			  -usb -device usb-tablet \
			  -vga std \
			  -monitor stdio  
			  
			  
			  
			  # pe 启动相关  
			  
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=none \
			    -drive file=/home/xxl/vms/WePE_64_V1.2.iso,media=cdrom \
			    -drive file=/home/xxl/vms/win10-ltsc.iso,media=cdrom \  
			  
			     -drive file=/home/xxl/vms/WePE_64_V1.2.iso,index=1,media=cdrom \
			  
			  -device nvme,drive=nvm,serial=nvme-1 \
			  -device virtio-net-pci,netdev=net0,mac=52:54:a6:f5:48:c1
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0,vhost=on \
			  ```
		-
		  ```sh
		  
		  sudo ip link add name br0 type bridge
		  sudo ip addr flush dev eth0
		  sudo ip link set eth0 master br0
		  sudo ip tuntap add tap0 mode tap
		  sudo ip link set tap0 master br0
		  sudo ip link set up dev eth0
		  sudo ip link set up dev tap0
		  sudo ip link set up dev br0
		  
		  sudo dhclient -v br0
		  # 或者
		  sudo ip addr add 127.0.1.100/24 dev br0
		  sudo ip route add default via 127.0.1.1
		  
		  
		  bridge link show
		  brctl show
		  
		  
		  
		  
		  sudo ip link set tap0 nomaster
		  sudo ip tuntap del tap0
		  sudo ip link set eth0 nomaster
		  sudo ip link set down dev br0
		  sudo ip link del br0
		  sudo ip link set up dev eth0
		  sudo dhclient -v eth0
		  ```
	-
	- https://libvirt.org/index.html
	- https://virt-manager.org/
	- https://wiki.archlinux.org/title/Libvirt
	- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/index
	- # libvirt
		-
		  ```sh
		  
		  sudo -E pacman -S qemu virt-manager virt-viewer edk2-ovmf dnsmasq vde2 bridge-utils openbsd-netcat dmidecode libguestfs iptables-nft
		  
		  
		  
		  # 使用Spice协议下推荐使用QXL(QEMU Xorg Logical Display Interface)显卡,让Windows虚拟机图形页面更加流畅
		  # 查看Spice地址和端口号 
		   virsh dumpxml vmuuid|grep spice
		  # Spice客户端 virt-viewer
		  spice://hostip:port
		  
		  # 基于QXL显卡驱动的Spice协议在Windows虚拟机上安装
		  # 另外需手动更新显卡驱动程序,设备管理器-> 显示适配器-》标准VGA图形适配器-》择更新驱动程序-》挂载的virio中择Red Hat QXL驱动
		  
		  ```
		- 虚拟GPU-QXL(QEMU Xorg Logical Display Interface)
			- QXL(是一种高性能的虚拟显示卡,专为虚拟化环境设计,以提供接近物理硬件的图形性能。
			- PCI设备模拟:QXL作为虚拟PCI设备,可以被虚拟机识别和使用,就像物理GPU一样。
			- 多显示器支持:QXL支持多显示器配置,允许虚拟机使用多个虚拟显示器。
			- 与KVM的兼容性:QXL是为KVM环境设计的,因此它可以很好地与KVM虚拟化技术配合使用。
			- 优化性能:为了提高性能,可以在虚拟机中安装SPICE的增强工具,如`spice-vdagent`,它支持鼠标同步、共享剪贴板、音视频传输等功能20。
Reply View the author
希声
deepin
2024-12-05 11:12
#13
希声
- # [qemu](https://www.qemu.org/docs/master/)
	- https://wiki.archlinux.org/title/QEMU
	- https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md
	-
	  ```sh
	  qemu-img create -f raw windows-server-2012.raw 60G
	  
	  QEMU’s system emulation provides a virtual model of a machine (CPU, memory and emulated devices) to run a guest OS. It supports a number of hypervisors (known as accelerators) as well as a JIT known as the Tiny Code Generator (TCG) capable of emulating many CPUs.
	  
	  # cpu支持虚拟化扩展 https://en.wikipedia.org/wiki/Hardware-assisted_virtualization
	  
	  LC_ALL=C lscpu | grep Virtualization
	  
	  zgrep CONFIG_KVM /proc/config.gz
	  # 内核加载kvm
	  lsmod |grep kvm
	  
	  sudo -E apt install qemu-system-x86 virt-manager
	  
	  sudo systemctl status libvirtd
	  
	  qemu-system-x86_64 -help
	  
	  qemu-system-x86_64 -M help
	  
	  qemu-system-x86_64 -device scsi-hd,help
	  
	  
	  
	    -drive file=windows_server.img,format=qcow2,if=virtio \
	    -cdrom /path/to/windows_server.iso \
	  
	  
	  qemu-img create -f raw windows-server-2012.raw 60G
	  qemu-img create -o backing_file=windows-server-2012.raw,backing_fmt=raw -f qcow2 windows2012.cow
	  
	  Formatting 'windows2012.cow', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=64424509440 backing_file=windows-server-2012.raw backing_fmt=raw lazy_refcounts=off refcount_bits=16
	  
	    -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF_VARS.fd \
	  
	  
	  qemu-system-x86_64 \
	    -machine type=q35,accel=kvm \
	    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
	    -smp 4 \
	    -m 4096 \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
	    -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
	    -drive file=/home/xxl/vms/windows2012.ISO,index=2,media=cdrom \
	    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=3,media=cdrom \
	    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
	    -usb -device usb-tablet \
	    -vga qxl \
	    -monitor stdio
	  
	  qemu-system-x86_64 \
	    -machine type=q35,accel=kvm \
	    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
	    -smp 4 \
	    -m 4096 \
	    -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
	    -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
	    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=3,media=cdrom \
	    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
	    -usb -device usb-tablet \
	    -vga qxl \
	    -monitor stdio
	  
	  If you store the hard disk images on a Btrfs file system, you should consider disabling Copy-on-Write for the directory before creating any images.
	  
	  
	  virsh list --all
	  
	  gir1.2-gtk-vnc-2.0 gir1.2-libosinfo-1.0 gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 gir1.2-vte-2.91
	    gstreamer1.0-plugins-ugly ipxe-qemu libbrlapi0.6 libcacard0 libcapstone4 libfdt1 libgovirt-common libgovirt2 libgtk-vnc-2.0-0
	    libgvnc-1.0-0 libnss-mymachines libopencore-amrnb0 libopencore-amrwb0 libosinfo-1.0-0 libphodav-2.0-0 libphodav-2.0-common libpmem1
	    librdmacm1 libsidplay1v5 libslirp0 libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1 libssh-4 liburing1
	    libusbredirhost1 libusbredirparser1 libvdeplug2 libvirglrenderer0 libvirt-clients libvirt-daemon libvirt-daemon-config-network
	    libvirt-daemon-config-nwfilter libvirt-daemon-driver-lxc libvirt-daemon-driver-qemu libvirt-daemon-driver-vbox libvirt-daemon-driver-xen
	    libvirt-daemon-system libvirt-daemon-system-systemd libvirt-glib-1.0-0 libvirt0 libvte-2.91-0 libvte-2.91-common libx264-155 libxencall1
	    libxendevicemodel1 libxenevtchn1 libxenforeignmemory1 libxengnttab1 libxenmisc4.11 libxenstore3.0 libxentoolcore1 libxentoollog1
	    libxml2-utils libyajl2 osinfo-db ovmf python-asn1crypto python-certifi python-cffi-backend python-chardet python-cryptography
	    python-enum34 python-idna python-ipaddress python-openssl python-requests python-urllib3 python3-certifi python3-chardet python3-idna
	    python3-libvirt python3-libxml2 python3-pkg-resources python3-requests python3-six python3-urllib3 qemu-system-common qemu-system-data
	    qemu-system-gui qemu-system-x86 qemu-utils seabios spice-client-glib-usb-acl-helper systemd-container virt-manager virt-viewer virtinst 
	    建议安装:
	  libosinfo-l10n sidplay-base libvirt-login-shell libvirt-daemon-driver-storage-gluster libvirt-daemon-driver-storage-iscsi-direct
	    libvirt-daemon-driver-storage-rbd libvirt-daemon-driver-storage-zfs numad apparmor auditd nfs-common open-iscsi pm-utils systemtap
	    zfsutils python-cryptography-doc python-cryptography-vectors python-enum34-doc python-openssl-doc python-openssl-dbg python-socks
	    python-ntlm python3-setuptools python3-cryptography python3-openssl python3-socks python-requests-doc vde2 qemu-block-extra debootstrap
	    ssh-askpass gir1.2-secret-1 python3-guestfs
	  
	  ```
	-
	- uefi
		- `/usr/share/edk2/x64/OVMF.4m.fd` 是OVMF固件的一种变种,与普通的OVMF固件有一些区别。这里的 "4m" 指的是固件映像的大小,通常为4MB。
		- 区别在于固件映像的大小和功能,这取决于用例和虚拟化环境。以下是一些可能的区别:
		- 固件大小:OVMF.4m.fd 固件映像的大小通常比标准的 OVMF 固件大。这可以容纳更多的UEFI代码和数据,因此可以支持更多的功能。
	- [Virtio](https://wiki.libvirt.org/Virtio.html)
		- Virtio is a virtualization standard for network and disk device drivers where just the guest's device driver "knows" it is running in a virtual environment, and cooperates with the hypervisor.
	- tap bridge
		- mac
			-
			  ```sh
			  
			  
			  # To make the change permanent, change net.ipv4.ip_forward = 0 to net.ipv4.ip_forward = 1 in /etc/sysctl.d/99-sysctl.conf.
			  
			  
			  env vm_name="win-2012" qemu-system-x86_64 -name "$vm_name" -net nic,macaddr=$(qemu-mac-hasher.py "$vm_name")
			  
			  qemu-system-x86_64 \
			  -machine type=q35,accel=kvm \
			  -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			  -smp 4 \
			  -m 4096 \
			  -drive if=pflash,format=raw,file=/home/xxl/vms/windows2012/OVMF.fd \
			  -drive file=/home/xxl/vms/windows2012/windows-server-2012.raw,format=raw,index=0,media=disk,if=virtio \
			  -device virtio-net-pci,netdev=net0,mac=52:54:a6:f5:48:c1 \
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0 \
			  -usb -device usb-tablet \
			  -vga qxl \
			  -monitor stdio
			  
			  
			  
			  
			  # windows esd文件
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=1,media=cdrom \
			    -drive file=/home/xxl/vms/win10-ltsc.iso,media=cdrom \
			    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  
			  
			  # 改成 virtio
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk \
			    -drive file=/home/xxl/vms/win10-ltsc/dummy.qcow2,if=virtio \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=2,media=cdrom \
			    -nic user,model=virtio-net-pci,hostfwd=tcp::55555-:3389 \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  qemu-system-x86_64 \
			    -machine type=q35,accel=kvm \
			    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			    -smp 4 \
			    -m 4096 \
			    -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=virtio \
			    -drive file=/home/xxl/vms/virtio-win-0.1.229.iso,index=2,media=cdrom \
			    -device virtio-net-pci,netdev=net0,mac=52:54:69:33:a2:7f \
			    -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0,vhost=on \
			    -usb -device usb-tablet \
			    -vga qxl \
			    -monitor stdio
			  
			  qemu-system-x86_64 \
			  -machine type=q35,accel=kvm \
			  -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
			  -smp 4 \
			  -m 4096 \
			  -drive if=pflash,format=raw,file=/home/xxl/vms/win10-ltsc/OVMF.4m.fd \
			  -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=virtio \
			  -device virtio-net-pci,netdev=net0,mac=52:54:69:33:a2:7f \
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0 \
			  -usb -device usb-tablet \
			  -vga std \
			  -monitor stdio  
			  
			  
			  
			  # pe 启动相关  
			  
			    -drive file=/home/xxl/vms/win10-ltsc/win10.cow,format=qcow2,media=disk,if=none \
			    -drive file=/home/xxl/vms/WePE_64_V1.2.iso,media=cdrom \
			    -drive file=/home/xxl/vms/win10-ltsc.iso,media=cdrom \  
			  
			     -drive file=/home/xxl/vms/WePE_64_V1.2.iso,index=1,media=cdrom \
			  
			  -device nvme,drive=nvm,serial=nvme-1 \
			  -device virtio-net-pci,netdev=net0,mac=52:54:a6:f5:48:c1
			  -netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0,vhost=on \
			  ```
		-
		  ```sh
		  
		  sudo ip link add name br0 type bridge
		  sudo ip addr flush dev eth0
		  sudo ip link set eth0 master br0
		  sudo ip tuntap add tap0 mode tap
		  sudo ip link set tap0 master br0
		  sudo ip link set up dev eth0
		  sudo ip link set up dev tap0
		  sudo ip link set up dev br0
		  
		  sudo dhclient -v br0
		  # 或者
		  sudo ip addr add 127.0.1.100/24 dev br0
		  sudo ip route add default via 127.0.1.1
		  
		  
		  bridge link show
		  brctl show
		  
		  
		  
		  
		  sudo ip link set tap0 nomaster
		  sudo ip tuntap del tap0
		  sudo ip link set eth0 nomaster
		  sudo ip link set down dev br0
		  sudo ip link del br0
		  sudo ip link set up dev eth0
		  sudo dhclient -v eth0
		  ```
	-
	- https://libvirt.org/index.html
	- https://virt-manager.org/
	- https://wiki.archlinux.org/title/Libvirt
	- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/index
	- # libvirt
		-
		  ```sh
		  
		  sudo -E pacman -S qemu virt-manager virt-viewer edk2-ovmf dnsmasq vde2 bridge-utils openbsd-netcat dmidecode libguestfs iptables-nft
		  
		  
		  
		  # 使用Spice协议下推荐使用QXL(QEMU Xorg Logical Display Interface)显卡,让Windows虚拟机图形页面更加流畅
		  # 查看Spice地址和端口号 
		   virsh dumpxml vmuuid|grep spice
		  # Spice客户端 virt-viewer
		  spice://hostip:port
		  
		  # 基于QXL显卡驱动的Spice协议在Windows虚拟机上安装
		  # 另外需手动更新显卡驱动程序,设备管理器-> 显示适配器-》标准VGA图形适配器-》择更新驱动程序-》挂载的virio中择Red Hat QXL驱动
		  
		  ```
		- 虚拟GPU-QXL(QEMU Xorg Logical Display Interface)
			- QXL(是一种高性能的虚拟显示卡,专为虚拟化环境设计,以提供接近物理硬件的图形性能。
			- PCI设备模拟:QXL作为虚拟PCI设备,可以被虚拟机识别和使用,就像物理GPU一样。
			- 多显示器支持:QXL支持多显示器配置,允许虚拟机使用多个虚拟显示器。
			- 与KVM的兼容性:QXL是为KVM环境设计的,因此它可以很好地与KVM虚拟化技术配合使用。
			- 优化性能:为了提高性能,可以在虚拟机中安装SPICE的增强工具,如`spice-vdagent`,它支持鼠标同步、共享剪贴板、音视频传输等功能20。

因为我没有很多时间处理,脱敏粗暴全局替换,有点开发基础的话,可以自行修复尝试

其实主要是没有时间,我自己的一套deepin工具使用方案,自己认为都很牛x,就是没时间脱敏整理。。。。。

比如说文管,终端,虚拟化,容器化。。。。。

Reply View the author
Amber
deepin
2024-12-05 18:01
#14

如果装win7以上性能会比较差吧(不过当时我是机械盘测试的,不好说)

Reply View the author
deepin
2024-12-05 21:05
#15

我不知道啊,我双系统hhh

Reply View the author
buyike
deepin
2024-12-05 21:07
#16

我不知道啊,我双系统hhh

已经过了双系统的时代了,现在玩的是单系统。

Reply View the author
花生米就豆腐干
deepin
2024-12-05 21:29
#17

VMWare无脑安装就行。最简单,最好

Reply View the author
thinking2019
deepin
2024-12-06 02:29
#18

果断VirtualBox啊!我现在使用的虚拟机里装了一个Win10,还有一个Ubuntu。用起来很方便!

applaud

Reply View the author
Oli
deepin
2024-12-06 06:28
#19

楼主可以出个教程

Reply View the author
y4h3z4
deepin
2024-12-06 09:21
#20

我用virtualBOX,安装win10+WPS用于会员签到,每天登录一下,签到结束就退出。本机16G内存,分了6G内存给虚拟机。

Reply View the author
1 / 2
To page