Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

../core/vcpu.cc:650 SaveStateTo() panic-error: failed to get MSR(4) index=0x3a errno=2, No such file or directory #4

Open
spobit opened this issue Jan 19, 2024 · 14 comments

Comments

@spobit
Copy link

spobit commented Jan 19, 2024

我正在试用它, 所以按照你的build进行下去, i440 与 q35 也切换了, 但还是出了问题.

$ ./mvisor -c ../config/1.yaml
[0.000] ../core/vcpu.cc:650 SaveStateTo() panic-error: failed to get MSR(4) index=0x3a errno=2, No such file or directory

1.yaml:

name: Default configuration
base: q35.yaml

machine:
  memory: 4G
  vcpu: 2
  # Set vcpu thread priority value [-20, 19]
  # A higher value means a lower priority
  priority: 1
  # Turn on BIOS output and performance measurement
  debug: No
  # Turn on hypervisor to lower CPU usage (Hyper-V is used for Windows)
  hypervisor: Yes

objects:
  - name: cmos
    # gmtime for linux, localtime for windows
    rtc: localtime

  - class: qxl
  - class: spice-agent
  - class: qemu-guest-agent
  - class: usb-tablet

  - class: virtio-network
    backend: uip
    mac: 00:50:00:11:22:33
    map: tcp:0.0.0.0:8022-:22

  - class: ata-cdrom 
    image: /home/spobit/Desktop/en_windows_7_professional_x86_dvd.iso
  
  - class: ata-cdrom
    image: /home/spobit/Desktop/virtio-win-0.1.240.iso

  - class: ata-disk
    image: /home/spobit/Desktop/mvisor-master/share/empty.qcow2
    snapshot: No
  
  # - class: floppy
  #   image: /data/images/floppy.img

  # - class: virtio-block
  #   image: /data/empty.qcow2
  #   snapshot: No

  # - class: virtio-fs
  #   path: /tmp/fuse
  #   disk_name: mvisor-fs
  #   disk_size: 2G
  #   inode_count: 200

  # - class: vfio-pci
  #   sysfs: /sys/bus/mdev/devices/c2e088ba-954f-11ec-8584-525400666f2b
  #   debug: Yes

  # - class: virtio-vgpu
  #   memory: 1G
  #   staging: No
  #   blob: No
  #   node: /dev/dri/renderD131

只是改了vcpu为2, ata-cdrom, ata-disk, hypervisor, 其它配制什么都没改变.

@nooodles2023
Copy link
Collaborator

请问host用的是什么系统?

@spobit
Copy link
Author

spobit commented Jan 19, 2024

host:
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22631 N/A Build 22631

vmware guest: centos8.5.2111
Linux 192.168.33.138 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@nooodles2023
Copy link
Collaborator

我有点没看明白,你是在vmware内运行mvisor么?
用来运行mvisor的linux系统4.18.0-348.7.1.el8_5.x86_64版本有些低了,建议升级内核到4.18.0-408.el8.x86_64或者更高版本。
注意,在vmware内运行要确保打开虚拟机嵌套,这样mvisor才能正确使用到硬件加速

@spobit
Copy link
Author

spobit commented Jan 19, 2024

是的, 在vmware里运行. 我这里面有kvm, 应该是打开了.

os的选择是指导里给的,我可以用其它系统,还是升级centos8的内核?
image

@nooodles2023
Copy link
Collaborator

nooodles2023 commented Jan 19, 2024

vmware里再运行mvisor算是嵌套了一层虚拟化效率会有些低,如果有条件的话建议再装有linux系统的主机上运行。
确保内核更新到这个版本,或者更新的也可以,目前我们使用最多的也是centos+408这个版本的内核
image

@spobit
Copy link
Author

spobit commented Jan 19, 2024

vmware里再运行mvisor算是嵌套了一层虚拟化效率会有些低,如果有条件的话建议再装有linux系统的主机上运行。 确保内核更新到这个版本,或者更新的也可以,目前我们使用最多的也是centos+408这个版本的内核 image

ok. 我只是纯粹的感兴趣,性能不用考虑.

我可以用 centos stream 吗?

@nooodles2023
Copy link
Collaborator

vmware里再运行mvisor算是嵌套了一层虚拟化效率会有些低,如果有条件的话建议再装有linux系统的主机上运行。 确保内核更新到这个版本,或者更新的也可以,目前我们使用最多的也是centos+408这个版本的内核 image

ok. 我只是纯粹的感兴趣,性能不用考虑.

我可以用 centos stream 吗?

可以的

@spobit
Copy link
Author

spobit commented Jan 19, 2024

怎么选择都错, 是要参加硬盘? 有没有详细的安装文档.

image
image

@nooodles2023
Copy link
Collaborator

nooodles2023 commented Jan 19, 2024

安装virtio里面的磁盘驱动后,就会出现可以安装系统的磁盘
https://cloud.tencent.com/developer/article/2294817
你可以直接搜索qemu安装win7的流程,都是一样的

@spobit
Copy link
Author

spobit commented Jan 19, 2024

ok

@spobit
Copy link
Author

spobit commented Jan 23, 2024

虽然完成了, 但是环境确实难搞.
image

@nooodles2023
Copy link
Collaborator

哪个步骤比较难处理?

@spobit
Copy link
Author

spobit commented Jan 23, 2024

系统太老了, 上了 aliyun huaweicloud, 还是有不少软件是手动安装的, qemu-img 有问题, 实在升级不了, 在ubuntu上做的系统盘. 当然还有 great wall.

@78
Copy link
Collaborator

78 commented Jan 24, 2024

Win7可以考虑i440fx,这样安装系统的时候,USB都很好的支持。
mvisor的q35默认配的是usb 3.0,适合win10之后的系统。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants