Qemu install SLE 15.0 s390x

回复
admin
网站管理员
帖子: 13
注册时间: 周四 3月 15, 2018 3:56 pm
来自: 广东深圳
联系:

Qemu install SLE 15.0 s390x

帖子 admin » 周五 9月 07, 2018 10:26 pm

First, you need to compile the latest version of qemu 3.0.0
# xz -d qemu-3.0.0.tar.xz
# tar -xvf qemu-3.0.0.tar
# cd qemu-3.0.0
# ./configure --prefix=/usr/local/qemu --target-list=s390x-softmmu,s390x-linux-user
# make -j8
# make install
Next, extract can use qemu to boot kernel kernel and initrd files
# mkdir -p /data/vm/linux_s390x
Mount -t iso9660 -o loop SLE-12-SP2-Server-DVD-s390x-GM-DVD1.iso /mnt
cd /mnt/boot/s390x
cp initrd /data/vm/linux_s390x
cd /mnt/suse/s390x/
Mkdir -p /data/vm/linux_s390x/tot
cp kernel-default-4.12.14-23.1.s390x.rpm /data/vm/linux_s390x/tot
cd /data/vm/linux_s390x/tot
rpm2cpio kernel-default-4.12.14-23.1.s390x.rpm |cpio -ivd
cd /data/vm/linux_s390x/tot/boot
cp vmlinux-4.12.14-23-default /data/vm/linux_s390x/kernel
Create an installation operating system script
# cat install_suse15_s390x.sh
#!/bin/bash
/usr/local/qemu/bin/qemu-system-s390x -M s390-ccw-virtio -smp 2 -m 4G --nographic --device virtio-scsi --drive file=/iso/SLE-15-Installer- DVD-s390x-GM-DVD1.iso,format=raw,if=none,id=c1 --device scsi-cd,drive=c1 --drive file=/iso/SLE-15-Packages-s390x-GM-DVD1 .iso,format=raw,if=none,id=c2 --device scsi-cd,drive=c2 --hda suse15_s390x.img --kernel kernel --initrd initrd -net nic -net tap,ifname=tap10
Run the installation script to install
sh install_suse15_s390x.sh
After the installation is complete, copy the system /boot/initrd-4.12.14-23-default to the host's /data/vm/linux_s390x directory via scp.
Create an operating system script to start a new installation
# cat start_suse15_s390x.sh
#!/bin/bash
/usr/local/qemu/bin/qemu-system-s390x -M s390-ccw-virtio -smp 4 -m 4G --nographic \
--hda suse15_s390x.img --kernel kernel --initrd initrd-4.12.14-23-default -append "root=/dev/vda1" \
--device virtio-scsi --drive file=/iso/SLE-15-Installer-DVD-s390x-GM-DVD1.iso,format=raw,if=none,id=c1 --device scsi-cd,drive= C1 --drive file=/iso/SLE-15-Packages-s390x-GM-DVD1.iso,format=raw,if=none,id=c2 --device scsi-cd,drive=c2 \
-net nic -net tap,ifname=tap10
Run the startup script to boot into the newly installed SLE 15.0 s390x via qemu
sh start_suse15_s390x.sh

回复