sudo apt install -y qemu-kvm libvirt-clients libvirt-daemon-system
sudo adduser $USER libvirt
sudo adduser $USER libvirt-qemu
sudo adduser $USER kvm
sudo su -l $USER
sudo pacman -S virt-viewer virt-manager virt-install qemu
sudo yum install -y qemu-kvm qemu-img libvirt libvirt-python libvirt-client virt-install
sudo usermod -aG libvirt,kvm,qemu $USER
sudo systemctl start libvirtd
sudo systemctl status libvirtd
sudo systemctl enable libvirtd
sudo rmmod kvm_intel
sudo rmmod kvm
sudo modprobe kvm
sudo modprobe kvm_intel
sudo systemctl start libvirtd
sudo systemctl status libvirtd
sudo systemctl enable libvirtd
sudo virt-xml $VMNAME --edit --features hyperv_relaxed=on,hyperv_vapic=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=8191
sudo virt-xml $VMNAME --edit --clock hypervclock_present=yes
似乎过不了xml检查,但是好像也没事
- PCI Bus 选 Virtio SCSI
- Block Device 选 Virtio
安装 viostor 和 vioscsi
安装 Balloon
- Enable Spice Channel and Spice server
- Graphics: use QXL
- Enable resize on Virt Manager
- 在Windows内装上 keytweak
- 把里面键位调得和外面一样
- 我不知道为什么这件事要做两次,大概VM拿到的按键信息是 原始键位 和 Host键位 的混合
然后我选ich6(和电脑上比较像)
在Linux上搭samba太麻烦了,windows自带,只在内网开启。这样虽然Windows无法访问Linux文件,但是Linux可以。 其实有spice的拖拽,这个方向是不需要samba的……
sudo pacman -S gvfs-smb
ctrl + l 然后输入 smb://$ip
DOMAIN=
sudo dd if=x | gzip | ssh oldhost bash -c 'gunzip -c | sudo dd of=y'
sudo virsh dumpxml $DOMAIN >$DOMAIN.xml
# 做必要的修改
sudo virsh define $DOMAIN.xml
grub
console=ttyS0
virsh edit $domain
<interface type='direct' trustGuestRxFilters='yes'>
sudo dmesg | grep -e DMAR -e IOMMU
https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe