qemu虚拟机安装aix7.2
注意:如果部分复制的命令不可用,可以手敲或者复制到记事本,在粘贴到命令行,我也不太清楚为什么会这样
镜像包自备,本教程使用aix7.2,也可联系站长获取镜像包。syisan@syisan.com
重要的事说三遍,看注释,看注释,看注释
一、当前配置:
虚拟机:qemu
宿主机:debian12
ldw@debian:/home/ldw~$ uname -ua
Linux debian 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux
ldw@debian:/home/ldw~$ df -Th | grep "^/dev"df -Th | grep "^/dev"
/dev/mapper/debian--vg-root ext4 456G 25G 409G 6% /
/dev/nvme0n1p2 ext2 456M 81M 351M 19% /boot
/dev/nvme0n1p1 vfat 511M 5.9M 506M 2% /boot/efi
ldw@debian:/home/ldw~$ free -h
total used free shared buff/cache available
19Gi 1.0Gi 17Gi 92Mi 1.4Gi 18Gi
979Mi 0B 979Mi
ldw@debian:/home/ldw~$ cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores: 2
ldw@debian:/home/ldw~$ /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
1
二、安装qemu
两种安装方式:
注意:请自行换源,本文不再赘述
1、使用apt安装
#使用apt安装
ldw@debian:/home/~$ sudo apt -y update
ldw@debian:/home/~$ sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils qemu-system-ppc64 vim
ldw@debian:/home/~$ qemu-system-x86_64 --version
ldw@debian:/home/~$ sudo apt remove -y qemu
2、使用源码编译安装(我使用源码编译安装)
ldw@debian:/home/~$ sudo apt update
ldw@debian:/home/~$ sudo apt install -y ninja-build pkg-config libglib2.0-dev meson libpixman* flex bison curl vim wget
ldw@debian:/home/~$ wget https://download.qemu.org/qemu-8.0.2.tar.xz #有可能需要科xue上wang或多试几次
ldw@debian:/home/~$ tar xvJf qemu-8.0.2.tar.xz
ldw@debian:/home/~$ cd qemu-8.0.2
ldw@debian:/home/qemu-8.0.2~$ sudo ./configure --build=x86_64 --host=x86_64 --target=x86_64
ldw@debian:/home/qemu-8.0.2~$ sudo make -j8 && sudo make install
#然后等待漫长的编译过程
三、创建虚拟硬盘
ldw@debian:/home/qemu-8.0.2~$ mkdir qemu-disk #在/home/qemu-8.0.2下创建目录
ldw@debian:/home/qemu-8.0.2~$ qemu-img create -f qcow2 qemu-disk/hdisk0.qcow2 100G #在qemu-disk目录下创建虚拟磁盘容量100G
Formatting 'qemu-disk/hdisk1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=107374182400 lazy_refcounts=off refcount_bits=16 #创建虚拟硬盘后的反馈
四、创建AIX虚拟机(从cdrom启动)
1、配置虚拟机
#直接全部复制在命令行运行
qemu-system-ppc64 -cpu POWER8 \ #cpu模拟power8
-machine pseries -m 4096 -serial stdio \ #内存4G
-drive file=/home/qemu-8.0.2/qemu-disk/hdisk0.qcow2,if=none,id=drive-virtio-disk0 \ #注意虚拟磁盘路径
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom /home/ldw/AIX_v7.2_Install_7200-05-06-2320_flash_042023_LCD8236415.iso \ #注意镜像包路径
-prom-env "boot-command=boot cdrom:" \ #从cdrom启动
-prom-env "input-device=/vdevice/vty@71000000" \
-prom-env "output-device=/vdevice/vty@71000000"
2、安装系统
#进入如下界面 系统启动成功
Welcome to AIX.
boot image timestamp: 19:32:36 04/21/2023
processor count: 1; memory size: 4096MB; kernel size: 51894692
boot device: /vdevice/v-scsi@71000003/disk@8200000000000000:\ppc\chrp\bootfile.exe
AIX vm,uuid property contains invalid data
processing splpar characteristic: MaxEntCap
processing splpar characteristic: DesMem
processing splpar characteristic: DesProcs
processing splpar characteristic: MaxPlatProcs
processing splpar characteristic: HostThrs
AKVM: hcall-multi-tce detected but overridden, allow with "multce" boot argument
-------------------------------------------------------------------------------
Star
#等待安装过程,时间较长,如果长时间无反应,手动按下回车
.
.
.
#来到如下界面
******* Please define the System Console. *******
Type a 1 and press Enter to use this terminal as the
system console. #键入1并按Enter键将此终端用作系统控制台。
Pour definir ce terminal comme console systeme, appuyez
sur 1 puis sur Entree.
Taste 1 und anschliessend die Eingabetaste druecken, um
diese Datenstation als Systemkonsole zu verwenden.
Premere il tasto 1 ed Invio per usare questo terminal
come console.
Escriba 1 y pulse Intro para utilizar esta terminal como
consola del sistema.
Escriviu 1 1 i premeu Intro per utilitzar aquest
terminal com a consola del sistema.
Digite um 1 e pressione Enter para utilizar este terminal
como console do sistema.
0c31 #此处按1,输入的1不显示
-------------------------------------------------------------------------------
.
.
.
HARDWARE SYSTEM MICROCODE
Licensed Internal Code - Property of IBM
(C) Copyright IBM Corp. 1990, 1994.
All rights reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted
by GSA ADP Schedule Contract with IBM Corp.
#此处提示版权信息,不用管
.
.
-------------------------------------------------------------------------------
>>> 1 Type 1 and press Enter to have English during install.
2 Entreu 2 i premeu Intro per veure la installaci en catal.
3 Entrez 3 pour effectuer l'installation en franais.
4 Fr Installation in deutscher Sprache 4 eingeben
und die Eingabetaste drcken.
5 Immettere 5 e premere Invio per l'installazione in Italiano.
6 Digite 6 e pressione Enter para usar Portugus na instalao.
7 Escriba 7 y pulse Intro para la instalacin en espaol.
88 Help ?
>>> Choice [1]: #默认选1,直接按回车,使用英文
.
.
-------------------------------------------------------------------------------
#来到如下界面
Welcome to Base Operating System
Installation and Maintenance
Type the number of your choice and press Enter. Choice is indicated by >>>.
>>> 1 Start Install Now with Default Settings #使用默认设置立即开始安装
2 Change/Show Installation Settings and Install #更改/显示安装设置并安装
3 Start Maintenance Mode for System Recovery #启动系统恢复维护模式
4 Make Additional Disks Available #使其他磁盘可用
5 Select Storage Adapters #选择存储适配器
88 Help ?
99 Previous Menu
>>> Choice [1]: 2 #此处选择2
.
.
.
-------------------------------------------------------------------------------
Installation and Settings
Either type 0 and press Enter to install with current settings, or type the
number of the setting you want to change and press Enter.
1 System Settings:
Method of Installation.............New and Complete Overwrite #安装方法:新的完全覆盖
Disk Where You Want to Install.....hdisk0 #您要安装的磁盘:hdisk0
2 Primary Language Environment Settings (AFTER Install):
Cultural Convention................English (United States)
Language ..........................English (United States)
Keyboard ..........................English (United States)
Keyboard Type......................Default
3 Security Model.......................Default
4 More Options (Software install options)
5 Select Edition.......................standard #要安装的版本
>>> 0 Install with the current settings listed above.
+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [0]: 1 此处选择1 回车
.
.
.
-------------------------------------------------------------------------------
Change Disk(s) Where You Want to Install
Type one or more numbers for the disk(s) to be used for installation and press
Enter. To cancel a choice, type the corresponding number and Press Enter.
At least one bootable disk must be selected. The current choice is indicated
by >>>.
Name Location Code Size(MB) VG Status Bootable
>>> 1 hdisk0 00-10 102400 rootvg Yes No
>>> 0 Continue with choices indicated above #继续上述选项
55 More Disk Options #更多磁盘选项
66 Disks not known to Base Operating System Installation #基本操作系统安装未知的磁盘
77 Display More Disk Information #显示更多磁盘信息
88 Help ?
99 Previous Menu
>>> Choice [0]: #我们只有一块磁盘,默认选择0,回车。物理环境下根据实际情况选择
.
.
.
-------------------------------------------------------------------------------
Installation and Settings
Either type 0 and press Enter to install with current settings, or type the
number of the setting you want to change and press Enter.
1 System Settings:
Method of Installation.............New and Complete Overwrite
Disk Where You Want to Install.....hdisk0 #我们只有一个磁盘,默认hdisk0.物理环境根据实际选择
2 Primary Language Environment Settings (AFTER Install):
Cultural Convention................English (United States)
Language ..........................English (United States)
Keyboard ..........................English (United States)
Keyboard Type......................Default
3 Security Model.......................Default
4 More Options (Software install options)
5 Select Edition.......................enterprise
>>> 0 Install with the current settings listed above.
+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [0]: 5 #此处选择5回车切换安装版本, 我们选择enterprise(企业版)
.
.
.
-------------------------------------------------------------------------------
Installation and Settings
Either type 0 and press Enter to install with current settings, or type the
number of the setting you want to change and press Enter.
1 System Settings:
Method of Installation.............New and Complete Overwrite
Disk Where You Want to Install.....hdisk0
2 Primary Language Environment Settings (AFTER Install):
Cultural Convention................English (United States)
Language ..........................English (United States)
Keyboard ..........................English (United States)
Keyboard Type......................Default
3 Security Model.......................Default
4 More Options (Software install options)
5 Select Edition.......................enterprise
>>> 0 Install with the current settings listed above.
+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [0]: 4 #此处选择4回车 进入软件安装选项
.
.
.
-------------------------------------------------------------------------------
Install Options
1. Graphics Software................................................ Yes
2. System Management Client Software................................ Yes
3. OpenSSH Client Software.......................................... No
4. OpenSSH Server Software.......................................... No
5. Enable System Backups to install any system...................... Yes
(Installs all devices)
>>> 6. Install More Software
0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [6]: 3 #选择3 后回车
.
.
.
-------------------------------------------------------------------------------
Install Options
1. Graphics Software................................................ Yes
2. System Management Client Software................................ Yes
3. OpenSSH Client Software.......................................... Yes
4. OpenSSH Server Software.......................................... No
5. Enable System Backups to install any system...................... Yes
(Installs all devices)
>>> 6. Install More Software
0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [6]: 4 #选择4 后回车
.
.
.
-------------------------------------------------------------------------------
Install Options
1. Graphics Software................................................ Yes
2. System Management Client Software................................ Yes
3. OpenSSH Client Software.......................................... Yes
4. OpenSSH Server Software.......................................... Yes
5. Enable System Backups to install any system...................... Yes
(Installs all devices)
>>> 6. Install More Software
0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [6]: #此处已经默认选择了6,直接按回车
.
.
-------------------------------------------------------------------------------
Install More Software
1. Kerberos_5 (Expansion Pack)....................................... No
2. Server (Volume 2)................................................. No
>>> 0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [0]: 1 #选择1 回车
.
.
.
-------------------------------------------------------------------------------
Install More Software
1. Kerberos_5 (Expansion Pack)....................................... Yes
2. Server (Volume 2)................................................. No
>>> 0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [0]: 2 #选择2回车
.
.
.
-------------------------------------------------------------------------------
Install More Software
1. Kerberos_5 (Expansion Pack)....................................... Yes
2. Server (Volume 2)................................................. Yes
>>> 0 Install with the current settings listed above.
88 Help ?
99 Previous Menu
>>> Choice [0]: #此处默认选择0,直接回车
.
.
.
-------------------------------------------------------------------------------
#安装摘要
Overwrite Installation Summary
Disks: hdisk0 #磁盘hdisk0
Cultural Convention: en_US #习惯 美国
Language: en_US #语言 美国
Keyboard: en_US #键盘 美国
Graphics Software: Yes #图形软件
System Management Client Software: Yes #系统管理客户端软件
OpenSSH Client Software: Yes #OpenSSH客户端软件
OpenSSH Server Software: Yes #OpenSSH服务器软件
Enable System Backups to install any system: Yes #启用系统备份以安装任何系统
Selected Edition: enterprise #版本:企业版
Optional Software being installed: #正在安装的可选软件:
Kerberos_5
Server
>>> 1 Continue with Install
+-----------------------------------------------------
88 Help ? | WARNING: Base Operating System Installation will
99 Previous Menu | destroy or impair recovery of ALL data on the
| destination disk hdisk0.
>>> Choice [1]: #默认选择1 回车
.
.
-------------------------------------------------------------------------------
#等待安装完成
Installing Base Operating System
Please wait...
Approximate Elapsed time
% tasks complete (in minutes)
18 6 Installing additional software.
0c54
.
.
.
.
#提示版权信息及安装进度
. . . . . << Copyright notice for xlsmp.rte >> . . . . . . .
Licensed Materials - Property of IBM
5725C7401
Copyright IBM Corp. 1997, 2018.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for xlsmp.rte >>. . . .
Filesets processed: 1 of 785 #已处理的文件集
System Installation Time: 8 minutes #系统安装时间 Tasks Complete: 18% #安装进度百分比
installp: APPLYING software for:
xlsmp.aix61.rte 5.1.0.0
.
.
.
.
#因为是虚拟机安装,安装过程中会出现以下提示 无法将引导列表设置为:hdisk0。必须在主机KVM中设置引导设备。
#按1继续,无法将引导列表设置为:hdisk0。
Set_Bootlist: Could not set the bootlist to:
hdisk0 .
The boot device must be set in the host KVM.
Press 1 to continue: Set_Bootlist: Could not set the bootlist to:
hdisk0 .
The boot device must be set in the host KVM.
Press 1 to continue: Set_Bootlist: Could not set the bootlist to:
hdisk0 .
The boot device must be set in the host KVM.
Press 1 to continue:1 #按1继续
注意:安装完成重启,这里会进入一个无限循环启动的过程,所以这里需要ctrl + c结束掉,重新从disk中启动
qemu-system-ppc64 -cpu POWER8 \
-machine pseries -m 4096 -serial stdio \
-drive file=/home/qemu-8.0.2/qemu-disk/hdisk1.qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=drive-virtio-disk0 \
-cdrom /home/ldw/AIX_v7.2_Install_7200-05-06-2320_flash_042023_LCD8236415.iso \
-prom-env "boot-command=boot disk:" \ #这里把改为disk
-prom-env "input-device=/vdevice/vty@71000000" \
-prom-env "output-device=/vdevice/vty@71000000"
#重新启动虚拟机,启动设备改为disk
#重新启动后进入以下界面
-------------------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 14:55:07 07/13/2024
processor count: 1; memory size: 4096MB; kernel size: 51894692
boot device: /pci@800000020000000/scsi@2/disk@100000000000000
AIX vm,uuid property contains invalid data
processing splpar characteristic: MaxEntCap
processing splpar characteristic: DesMem
processing splpar characteristic: DesProcs
processing splpar characteristic: MaxPlatProcs
processing splpar characteristic: HostThrs
AKVM: hcall-multi-tce detected but overridden, allow with "multce" boot argument
-------------------------------------------------------------------------------
#等待继续安装
.
.
.
#到达此处提示,等待时间较长,耐心等待,如果时间过长卡死,ctrl+c中断运行。重新启动虚拟机。
The current volume is: /dev/hd10opt
Primary superblock is valid.
Performing all automatic mounts
Multi-user initialization completed
Checking for srcmstr active...complete
Starting tcpip daemons:
0513-059 The syslogd Subsystem has been started. Subsystem PID is 4129154.
0513-059 The sendmail Subsystem has been started. Subsystem PID is 4587920.
0513-059 The portmap Subsystem has been started. Subsystem PID is 4653458.
0513-059 The inetd Subsystem has been started. Subsystem PID is 4718996.
0513-059 The snmpd Subsystem has been started. Subsystem PID is 3998122.
0513-059 The hostmibd Subsystem has been started. Subsystem PID is 4260236.
0513-059 The snmpmibd Subsystem has been started. Subsystem PID is 4391310.
0513-059 The aixmibd Subsystem has been started. Subsystem PID is 4325772.
Finished starting tcpip daemons.
Starting NFS services:
0513-059 The biod Subsystem has been started. Subsystem PID is 4850074.
[STOP] DSO is not supported on KVM systems
[STOP] DSO is not supported on KVM systems
[STOP] DSO is not supported on KVM systems
0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 3735984.
Completed NFS services.
Unable to disable probevue : A system call received a parameter that is not valid.
Unable to enable probevue : Reserved errno was encountered
.
.
.
-------------------------------------------------------------------------------
Set Terminal Type
The terminal is not properly initialized. Please enter a terminal type
and press Enter. Some terminal types are not supported in
non-English languages.
ibm3101 tvi912 vt330 aixterm
ibm3151 tvi920 vt340 dtterm
ibm3161 tvi925 wyse30 xterm
ibm3162 tvi950 wyse50 lft
ibm3163 vs100 wyse60 sun
ibm3164 vt100 wyse100
ibmpc vt320 wyse350
+-----------------------Messages------------------------
| If the next screen is unreadable, press Break (Ctrl-c)
88 Help ? | to return to this screen.
|
>>> Choice []: vt100 #输入vt100 回车
#如有下方报错无需理会
error: rpmdb: Thread/process 4456734/1 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 - (-30974)
error: cannot open Packages database in /opt/freeware/packages
error: rpmdb: Thread/process 4456734/1 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 - (-30974)
error: cannot open Packages database in /opt/freeware/packages
error: rpmdb: Thread/process 4456734/1 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 - (-30974)
error: cannot open Packages database in /opt/freeware/packages
error: rpmdb: Thread/process 4456734/1 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 - (-30974)
error: cannot open Packages database in /opt/freeware/packages
.
.
.
-------------------------------------------------------------------------------
Software License Agreements
Move cursor to desired item and press Enter.
Show Installed License Agreements
Accept License Agreements #接受许可协议
F1=Helpssing F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
#此处按方向键,选中Accept License Agreements,回车后继续
.
.
-------------------------------------------------------------------------------
Accept License Agreements
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
ts [Entry Fields]
ACCEPT Installed License Agreements on #按TAB键,此处切换为yes后回车
F1=Help F2=Refresh F3=Cancel F4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
.
.
-------------------------------------------------------------------------------
#进入如下界面
COMMAND STATUS
Command: OK stdout: no stderr: no
Before command completion, additional instructions may appear below.
F1=Help F2=Refresh F3=Cancel Esc+6=Command
Esc+8=Image Esc+9=Shell Esc+0=Exit /=Find
n=Find Next
#按ESC+0退出当前页
.
.
-------------------------------------------------------------------------------
Software Maintenance Agreement
Move cursor to desired item and press Enter.
View Software Maintenance Terms and Conditions
Accept Software Maintenance Terms and Conditions
F1=Helpssing F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
.
.
.
-------------------------------------------------------------------------------
Installation Assistant
Move cursor to desired item and press Enter.
Set Date and Time #设置时间
Set root Password #设置root密码
Configure Network Communications #配置网络通信
Install Software Applications #安装软件应用程序
System Workload Partition Software Maintenance #系统工作负载分区软件维护
Using SMIT (information only) #使用SMIT
Tasks Completed - Exit to Login #任务已完成-退出登录
F1=Helpssing F2=Refresh F3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
#使用方向键选中Tasks Completed - Exit to Login,回车。可以根据实际情况配置其他项目。
.
.
-------------------------------------------------------------------------------
AIX Version 7
Copyright IBM Corporation, 1982, 2022.
Console login:
The '/usr/lpp/diagnostics/bin/diagd' command is not supported on this system.
0513-059 The lldpd Subsystem has been started. Subsystem PID is 5243190.
0513-059 The ecpvdpd Subsystem has been started. Subsystem PID is 5505460.
#这里按下回车
-------------------------------------------------------------------------------
AIX Version 7
Copyright IBM Corporation, 1982, 2022.
Console login: root #输入root用户即可登录(我并未设置密码,所以密码为空)
*******************************************************************************
* *
* *
* Welcome to AIX Version 7.2! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
#uname -a #获取系统详情
AIX localhost 2 7 000000000000
如有错误,欢迎大佬指正,联系站长:syisan@syisan.com
评论区