是否可以在具有x86_64架构的主机上运行具有ppc64le架构的VM? [英] Is it possible to run VM with ppc64le architecture on a host machine with x86_64 architecture?

查看:361
本文介绍了是否可以在具有x86_64架构的主机上运行具有ppc64le架构的VM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测试一些需要在'ppc64le'架构上运行的用例,但是我没有带ppc64le架构的主机.

I want to test some use-cases which need to run on 'ppc64le' architecture but I don't have a host machine with ppc64le architecture.

我的主机系统是x86_64体系结构.可以在具有x86_64架构的主机上运行具有'ppc64le'架构的VM吗?

My host system is of x86_64 architecture. Is it possible to run VM with 'ppc64le' architecture on my host machine with x86_64 architecture?

推荐答案

绝对!唯一需要注意的是,由于您不是在本地运行,因此虚拟机需要模拟目标(ppc64le)指令集.这比运行本机指令要慢得多.

Absolutely! The only caveat is that since you're not running natively, the virtual machine needs to emulate the target (ppc64le) instruction set. This can be much slower than running native instructions.

执行此操作的方法将取决于您用来管理虚拟机实例的工具.例如,virt-manager允许您在创建新的虚拟机时选择体系结构类型.如果将其设置为ppc64el,则将获得ppc64el机器.可以像设置本地VM一样设置其他选项(例如磁盘和网络设备).

The way to do this will depend on which tools you're using to manage your virtual machine instances. For example, virt-manager allows you to select the architecture type when you're creating a new virtual machine. If you set this to ppc64el, you'll get a ppc64el machine. Other options (like disk and network devices) can be set just like native VMs.

如果您未使用任何特定的VM管理工具,则以下qemu调用将使ppc64el计算机轻松运行:

If you're not using any specific VM management tools, the following invocation of qemu will get a ppc64el machine going easily:

qemu-system-ppc64le \
    -M pseries                            # use the pseries machine model \
    -m 4G                                 # with 4G of RAM \
    -hda ubuntu-18.04-server-ppc64el.iso  # Ubuntu installer as a virtual disk

根据您的使用情况,您可能还需要使用以下选项:

Depending on your usage, you may want to use the following options too:

  • -nographic -serial pty使用文本控制台而不是模拟图形设备. qemu将在启动时打印控制台pty-类似于/dev/pts/X.运行screen /dev/pts/X进行访问.

  • -nographic -serial pty to use a text console instead of an emulated graphics device. qemu will print the console pty on startup - something like /dev/pts/X. Run screen /dev/pts/X to access it.

-M powernv -bios skiboot.lid使用非虚拟化的ppc64el机器模型,该模型更接近当前的OpenPOWER硬件. skiboot.lid固件可能包含在发行版的qemu安装中.

-M powernv -bios skiboot.lid to use the non-virtualised ppc64el machine model, which is closer to current OpenPOWER hardware. The skiboot.lid firmware may be included in your distro's install of qemu.

-drive-device-netdev来配置虚拟磁盘和网络.这些在qemu上的x86 VM上以相同的方式工作.

-drive, -device and -netdev to configure virtual disks and networking. These work in the same manner at x86 VMs on qemu.

这篇关于是否可以在具有x86_64架构的主机上运行具有ppc64le架构的VM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆