简体   繁体   English

是否可以在具有x86_64架构的主机上运行具有ppc64le架构的VM?

[英]Is it possible to run VM with ppc64le architecture on a host machine with x86_64 architecture?

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. 我想测试一些需要在“ ppc64le”架构上运行的用例,但我没有具有ppc64le架构的主机。

My host system is of x86_64 architecture. 我的主机系统是x86_64体系结构。 Is it possible to run VM with 'ppc64le' architecture on my host machine with x86_64 architecture? 是否可以在具有x86_64架构的主机上运行具有'ppc64le'架构的VM?

Absolutely! 绝对! The only caveat is that since you're not running natively, the virtual machine needs to emulate the target (ppc64le) instruction set. 唯一需要注意的是,由于您不是在本地运行,因此虚拟机需要模拟目标(ppc64le)指令集。 This can be much slower than running native instructions. 这可能比运行本机指令慢得多。

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. 例如, virt-manager允许您在创建新的虚拟机时选择体系结构类型。 If you set this to ppc64el, you'll get a ppc64el machine. 如果将其设置为ppc64el,则将获得ppc64el机器。 Other options (like disk and network devices) can be set just like native VMs. 可以像设置本地VM一样设置其他选项(例如磁盘和网络设备)。

If you're not using any specific VM management tools, the following invocation of qemu will get a ppc64el machine going easily: 如果您未使用任何特定的VM管理工具,则以下qemu调用将使ppc64el计算机轻松运行:

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 to use a text console instead of an emulated graphics device. -nographic -serial pty使用文本控制台而不是模拟图形设备。 qemu will print the console pty on startup - something like /dev/pts/X . qemu将在启动时打印控制台pty-类似于/dev/pts/X Run screen /dev/pts/X to access it. 运行screen /dev/pts/X进行访问。

  • -M powernv -bios skiboot.lid to use the non-virtualised ppc64el machine model, which is closer to current OpenPOWER hardware. -M powernv -bios skiboot.lid以使用非虚拟化的ppc64el机器模型,该模型更接近当前的OpenPOWER硬件。 The skiboot.lid firmware may be included in your distro's install of qemu. skiboot.lid固件可能包含在发行版的qemu安装中。

  • -drive , -device and -netdev to configure virtual disks and networking. -drive-device-netdev来配置虚拟磁盘和网络。 These work in the same manner at x86 VMs on qemu. 这些在qemu上的x86 VM上以相同的方式工作。

I hosted centos7-ppc64le on my x86_64 machine(OS RHEL-7). 我在x86_64机器(OS RHEL-7)上托管了centos7-ppc64le。 I used qemu + virt-install for that. 我为此使用了qemu + virt-install。 First install qemu as 首先安装qemu作为

wget https://download.qemu.org/qemu-3.1.0-rc1.tar.xz
tar xvJf qemu-3.1.0-rc1.tar.xz
cd qemu-3.1.0-rc1
./configure        
make
make install

After installation check qemu-system-ppc64le is available from the command line. 安装后,可从命令行查看qemu-system-ppc64le。 Then install virt-manager,virt-install,virt-viewer and libvirt for managing the VM's. 然后安装virt-manager,virt-install,virt-viewer和libvirt来管理VM。 Then I started the VM as 然后我以

virt-install --name centos7-ppc64le \  
--disk centos7-ppc64le.qcow2  \
--machine pseries  \
--arch ppc64  \
--vcpus 2  \
--cdrom CentOS-7-ppc64le-Minimal-1804.iso \ 
--memory 2048 \
--network=bridge:virbr0 \ 
--graphics vnc 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何将 x86_64 汇编代码提升为 LLVM-IR? - How can i Lifting x86_64 assembly code to LLVM-IR? 是否可以在VMware vSphere中运行的Windows 7 x64上运行docker-machine和容器? - Is it possible to run docker-machine and containers on Windows 7 x64 running inside VMware vSphere? 是否可以在 GCP VM 上运行 android x86? - Is it possible to run android x86 on a GCP VM? 有没有办法创建一个使用 ARM CPU 而不是 x86/64 的 Azure 虚拟机? - Is there a way to create an Azure virtual machine which uses an ARM CPU as opposed to x86/64? QEMU没有创建第二个串口(Ubuntu x86-64来宾和主机) - QEMU doesn't create a second serial port (Ubuntu x86-64 guest and host) 如何在具有 Windows 主机的 MacOS VM 上运行/使用 Docker - How to run/use Docker on a MacOS VM having a Windows host machine 在x86-32处理器上运行x86-64 ASM - Running x86-64 ASM on a x86-32 processor 最简单的架构,可以虚拟化并运行Linux内核 - Simplest possible architecture that can be virtualized and run the Linux kernel 如何将特定于VM的代码编译为x86机器代码? - How can I compile VM-specific code into x86 machine code? 在虚拟机上找不到Mac OS x 64位? - Can't find Mac OS x 64 bit on virtual machine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM