KVM Guest
As shown below, a virtual server running SLES 12 and a Ubuntu 16.04.1 are defined with:
SLES12:
- two virtual CPUs;
- 4 GB of virtual RAM;
- a virtual disk;
- a virtual network interface;
- a virtual console.
qemu-img create -f qcow2 /var/lib/libvirt/images/sles12.img 5G
[root@kvm1awb ~]# qemu-img create -f qcow2 /var/lib/libvirt/images/sles12_sp1_qcow2.img 10G
Formatting '/var/lib/libvirt/images/sles12_sp1_qcow2.img', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
qemu-img info /var/lib/libvirt/images/sles12_sp1_qcow2.img
[root@kvm01abassani ~]# qemu-img info /var/lib/libvirt/images/sles12_sp1_qcow2.img
image: /var/lib/libvirt/images/sles12_sp1_qcow2.img
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
Create network interfaces Dynamically adding a qeth device
- Verify that the qeth device driver modules are loaded. The following example shows loaded qeth modules:
[root@kvm1awb ~]# lsmod | grep qeth
qeth_l2 49601 3
qeth 142711 1 qeth_l2
qdio 67943 3 qeth,zfcp,qeth_l2
ccwgroup 19383 2 ctcm,qeth
Note: The qeth_13 module is loaded for OSA devices that are set with layer2=0. If the output of the lsmod command shows that the qeth modules are not loaded, issue the modprobe qeth command to load them.
- Use the cio_ignore command to remove the network channels from the list of ignored devices and make them visible to z/KVM. The format is the following:
cio_ignore -r read_device_bus_id,write_device_bus_id,data_device_bus_id
cio_ignore -r 0.0.f500,0.0.f501,0.0.f502
Use the znetconf -u command to sense and list candidate configurations for network devices:
[root@kvm01abassani ~]# znetconf -u
Scanning for network devices...
Device IDs Type Card Type CHPID Drv.
------------------------------------------------------------
...
0.0.4106,0.0.4107,0.0.4108 1731/01 OSA (QDIO) 01 qeth
...
0.0.570d,0.0.570e,0.0.570f 1731/01 OSA (QDIO) 0c qeth
...
0.0.11c2,0.0.11c3 3088/1e ficon channel 25 ctcm
...
0.0.0300,0.0.0301,0.0.0302 1731/05 HiperSockets f8 qeth
...
znetconf -a
[root@kvm1awb ~]# znetconf -a 0.0.4106 -o layer2=1 -o buffer_count=128
Scanning for network devices...
Successfully configured device 0.0.4106 (enccw0.0.4106)
[root@kvm1awb ~]# znetconf -a 0.0.570d -o layer2=1 -o buffer_count=128
Scanning for network devices...
Successfully configured device 0.0.570d (enccw0.0.570d)
List the configured network interfaces to display their interface names:
znetconf -c
[root@kvm1awb ~]# znetconf -c
Device IDs Type Card Type CHPID Drv. Name State
--------------------------------------------------------------------------------
0.0.4106,0.0.4107,0.0.4108 1731/01 OSD_1000 01 qeth enccw0.0.4106 online
0.0.570a,0.0.570b,0.0.570c 1731/01 OSD_1000 0C qeth enccw0.0.570a online
0.0.570d,0.0.570e,0.0.570f 1731/01 OSD_1000 0C qeth enccw0.0.570d online
Persistently adding a qeth device
To navigate to the network-scripts subdirectory, use the cd command:
[root@kvm1awb ~]# cd /etc/sysconfig/network-scripts
To find out the IDs of your network devices, use the lsqeth command: [root@kvm1awb network-scripts]# lsqeth -p devices CHPID interface cardtype port chksum prio-q'ing rtr4 rtr6 lay'2 cnt
0.0.4106/0.0.4107/0.0.4108 x01 enccw0.0.4106 OSD_1000 0 sw always_q_0 n/a n/a 1 128 0.0.570a/0.0.570b/0.0.570c x0C enccw0.0.570a OSD_1000 0 sw always_q_0 n/a n/a 1 128 0.0.570d/0.0.570e/0.0.570f x0C enccw0.0.570d OSD_1000 0 sw always_q_0 n/a n/a 1 128
[root@kvm1awb network-scripts]# ls -la
total 236
drwxr-xr-x. 2 root root 4096 Aug 13 00:12 .
drwxr-xr-x. 6 root root 4096 Aug 13 00:12 ..
-rw-r--r--. 1 root root 353 Aug 12 23:21 ifcfg-enccw0.0.570a
-rw-r--r--. 1 root root 254 Jan 15 2015 ifcfg-lo
lrwxrwxrwx. 1 root root 24 Aug 12 23:57 ifdown -> ../../../usr/sbin/ifdown
-rwxr-xr-x. 1 root root 627 Jan 15 2015 ifdown-bnep
-rwxr-xr-x. 1 root root 5817 Jan 15 2015 ifdown-eth
-rwxr-xr-x. 1 root root 781 Jan 15 2015 ifdown-ippp
-rwxr-xr-x. 1 root root 4201 Jan 15 2015 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Aug 12 23:57 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1762 Apr 4 2015 ifdown-ovs
-rwxr-xr-x. 1 root root 1642 Jan 15 2015 ifdown-post
-rwxr-xr-x. 1 root root 1068 Jan 15 2015 ifdown-ppp
-rwxr-xr-x. 1 root root 837 Jan 15 2015 ifdown-routes
-rwxr-xr-x. 1 root root 1444 Jan 15 2015 ifdown-sit
-rwxr-xr-x. 1 root root 1599 Nov 5 2014 ifdown-Team
-rwxr-xr-x. 1 root root 1556 Nov 5 2014 ifdown-TeamPort
-rwxr-xr-x. 1 root root 1462 Jan 15 2015 ifdown-tunnel
lrwxrwxrwx. 1 root root 22 Aug 12 23:57 ifup -> ../../../usr/sbin/ifup
-rwxr-xr-x. 1 root root 12616 Jan 15 2015 ifup-aliases
-rwxr-xr-x. 1 root root 859 Jan 15 2015 ifup-bnep
-rwxr-xr-x. 1 root root 1318 Jan 15 2015 ifup-ctc
-rwxr-xr-x. 1 root root 11502 Jan 15 2015 ifup-eth
-rwxr-xr-x. 1 root root 12039 Jan 15 2015 ifup-ippp
-rwxr-xr-x. 1 root root 10430 Jan 15 2015 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Aug 12 23:57 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 4828 Jun 18 2015 ifup-ovs
-rwxr-xr-x. 1 root root 642 Jan 15 2015 ifup-plip
-rwxr-xr-x. 1 root root 1043 Jan 15 2015 ifup-plusb
-rwxr-xr-x. 1 root root 2609 Jan 15 2015 ifup-post
-rwxr-xr-x. 1 root root 4154 Jan 15 2015 ifup-ppp
-rwxr-xr-x. 1 root root 1925 Jan 15 2015 ifup-routes
-rwxr-xr-x. 1 root root 3263 Jan 15 2015 ifup-sit
-rwxr-xr-x. 1 root root 1755 Nov 5 2014 ifup-Team
-rwxr-xr-x. 1 root root 1876 Nov 5 2014 ifup-TeamPort
-rwxr-xr-x. 1 root root 2682 Jan 15 2015 ifup-tunnel
-rwxr-xr-x. 1 root root 1740 Jan 15 2015 ifup-wireless
-rwxr-xr-x. 1 root root 4623 Jan 15 2015 init.ipv6-global
-rw-r--r--. 1 root root 15330 Jan 28 2016 network-functions
-rw-r--r--. 1 root root 26134 Jan 15 2015 network-functions-ipv6
Create new configuration files:
[root@kvm1awb network-scripts]# cp ifcfg-enccw0.0.570a ifcfg-enccw0.0.4106
[root@kvm1awb network-scripts]# cp ifcfg-enccw0.0.570a ifcfg-enccw0.0.570d
Activate the network interface
# ip link show
# ip link show <network-interface-name>
# ip addr add <IP-address> dev <network-interface-name>
# ip link set <network-interface-name> up
[root@kvm01abassani ~]# ip link show
[root@kvm1awb ~]# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enccw0.0.570a: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000
link/ether 02:00:00:6e:8e:ff brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
link/ether 52:54:00:74:92:05 brd ff:ff:ff:ff:ff:ff
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN mode DEFAULT qlen 500
link/ether 52:54:00:74:92:05 brd ff:ff:ff:ff:ff:ff
5: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT
link/ether 7a:0b:c6:43:e0:9e brd ff:ff:ff:ff:ff:ff
6: bond2: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT
link/ether 5a:1e:67:ba:92:e0 brd ff:ff:ff:ff:ff:ff
7: enccw0.0.4106: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000
link/ether 02:00:00:a9:96:11 brd ff:ff:ff:ff:ff:ff
8: enccw0.0.570d: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000
link/ether 02:00:00:4a:c3:27 brd ff:ff:ff:ff:ff:ff
[root@kvm1awb ~]# ip link set enccw0.0.4106 up
[root@kvm1awb ~]# ip link set enccw0.0.570d up
[root@kvm1awb ~]# ip link set enccw0.0.4106 qlen 2500
[root@kvm1awb ~]# ip link set enccw0.0.570d qlen 2500
[root@kvm01abassani ~]# ip link show enccw0.0.4106
6: enccw0.0.4106: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 2500
link/ether 02:00:00:ba:9a:0f brd ff:ff:ff:ff:ff:ff
To remove bond3 or other bond not more in use:
[root@kvm1awb ~]# echo "-bond3" > /sys/class/net/bonding_masters
[root@kvm1awb ~]# cat /sys/class/net/bonding_masters
bond0
Preparing a network interface for a direct MacVTap connection
Procedure:
- Create a bonded interface to provide high availability.
lsmod | grep bonding modprobe bonding lsmod | grep bonding
[root@kvm1awb ~]# lsmod | grep bonding
[root@kvm1awb ~]# modprobe bonding
[root@kvm1awb ~]# lsmod | grep bonding
bonding 160781 0
- Optional: Create a virtual LAN (VLAN) interface.
# ip link add link <base-network-if-name> name <vlan-network-if-name>
type vlan id <VLAN-ID>
# ip link add link bond0 name bond0.623 type vlan id 623
# ip link show bond0.623
17: bond0.623@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP mode DEFAULT group default
link/ether 02:00:00:f7:a7:c2 brd ff:ff:ff:ff:ff:ff
Defining a dynamic bond interface
- Define the bonded interface. If you configure the bonded interface in a configuration-XML that is intended for a migration, choose an interface name policy which you also provide on the destination host. This example shows how to set up bonded interface bond2. In your distribution, bond0 might be automatically created and registered. In this case, omit step 1 to make use of bond0.
[root@kvm1awb ~]# cat /sys/class/net/bonding_masters
bond0
[root@kvm1awb ~]# echo "+bond2" > /sys/class/net/bonding_masters
[root@kvm1awb ~]# cat /sys/class/net/bonding_masters
bond0 bond2
[root@kvm1awb network-scripts]# nmcli con add type bond con-name bond2 ifname bond2 mode active-backup
Connection 'bond2' (1cc877d0-06b2-48c6-8eb2-f9bd7566d961) successfully added.
[root@kvm1awb network-scripts]# cat /sys/class/net/bonding_masters
bond0 bond2
[root@kvm1awb network-scripts]# nmcli con add type bond-slave ifname enccw0.0.4106 master bond2
Connection 'bond-slave-enccw0.0.4106' (aa2fce3c-5b56-4cb8-84e5-bafa198eff98) successfully added.
[root@kvm1awb network-scripts]# nmcli con add type bond-slave i^Caster bond2
[root@kvm1awb network-scripts]# nmcli dev status
DEVICE TYPE STATE CONNECTION
virbr0 bridge connected virbr0
enccw0.0.4106 ethernet connected bond-slave-enccw0.0.4106
enccw0.0.570a ethernet connected enccw0.0.570a
virbr0-nic tap connected virbr0-nic
bond2 bond connecting (getting IP configuration) bond2
enccw0.0.570d ethernet disconnected --
bond0 bond unmanaged --
lo loopback unmanaged --
[root@kvm1awb network-scripts]# nmcli con add type bond-slave ifname enccw0.0.570d master bond2
Connection 'bond-slave-enccw0.0.570d' (0732979c-7dcd-4fa7-b438-6627e7e51c62) successfully added.
[root@kvm1awb network-scripts]# nmcli dev status
DEVICE TYPE STATE CONNECTION
virbr0 bridge connected virbr0
enccw0.0.4106 ethernet connected bond-slave-enccw0.0.4106
enccw0.0.570a ethernet connected enccw0.0.570a
enccw0.0.570d ethernet connected bond-slave-enccw0.0.570d
virbr0-nic tap connected virbr0-nic
bond2 bond connecting (getting IP configuration) bond2
bond0 bond unmanaged --
lo loopback unmanaged --
[root@kvm1awb /]# cd /etc/sysconfig/network-scripts
[root@kvm1awb network-scripts]# ls -la
total 248
drwxr-xr-x. 2 root root 4096 Aug 13 01:19 .
drwxr-xr-x. 6 root root 4096 Aug 13 00:12 ..
-rw-r--r--. 1 root root 323 Aug 13 01:14 ifcfg-bond2
-rw-r--r--. 1 root root 141 Aug 13 01:15 ifcfg-bond-slave-enccw0.0.4106
-rw-r--r--. 1 root root 141 Aug 13 01:16 ifcfg-bond-slave-enccw0.0.570d
-rw-r--r--. 1 root root 353 Aug 12 23:21 ifcfg-enccw0.0.570a
-rw-r--r--. 1 root root 254 Jan 15 2015 ifcfg-lo
Note that because no con-name was specified for the slaves, the name is derived from the interface name by prepending the type. nmcli supports only Ethernet slaves. To bring up a bond, the slaves must be brought up first as follows:
[root@kvm1awb network-scripts]# nmcli con up bond-slave-enccw0.0.4106
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/24)
[root@kvm1awb network-scripts]# nmcli con up bond-slave-enccw0.0.570d
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/25)
[root@kvm1awb network-scripts]# nmcli con up bond2
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/29)
[root@kvm1awb network-scripts]# nmcli dev status
DEVICE TYPE STATE CONNECTION
virbr0 bridge connected virbr0
enccw0.0.4106 ethernet connected bond-slave-enccw0.0.4106
enccw0.0.570a ethernet connected enccw0.0.570a
enccw0.0.570d ethernet connected bond-slave-enccw0.0.570d
virbr0-nic tap connected virbr0-nic
bond2 bond connecting (getting IP configuration) bond2
bond0 bond unmanaged --
lo loopback unmanaged --
System config files
[root@kvm1awb network-scripts]# cat ifcfg-bond2
DEVICE=bond2
BONDING_OPTS=mode=active-backup
TYPE=Bond
BONDING_MASTER=yes
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=bond2
UUID=1cc877d0-06b2-48c6-8eb2-f9bd7566d961
ONBOOT=yes
[root@kvm1awb network-scripts]# cat ifcfg-bond-slave-enccw0.0.4106
TYPE=Ethernet
NAME=bond-slave-enccw0.0.4106
UUID=aa2fce3c-5b56-4cb8-84e5-bafa198eff98
DEVICE=enccw0.0.4106
ONBOOT=yes
MASTER=bond2
SLAVE=yes
[root@kvm1awb network-scripts]# cat ifcfg-bond-slave-enccw0.0.570d
TYPE=Ethernet
NAME=bond-slave-enccw0.0.570d
UUID=0732979c-7dcd-4fa7-b438-6627e7e51c62
DEVICE=enccw0.0.570d
ONBOOT=yes
MASTER=bond2
SLAVE=yes
- Set the bonding parameters for the desired bonding mode.
Dedicate OSA devices planned for 802.3ad mode to a target LPAR. For more
information, see Open Systems Adapter-Express Customer's Guide and Reference,
SA22-7935-17.
[root@kvm1awb ~]# echo "active-backup 1" > /sys/class/net/bond2/bonding/mode [root@kvm1awb ~]# echo "100" > /sys/class/net/bond2/bonding/miimon [root@kvm1awb ~]# echo "active 1" > /sys/class/net/bond2/bonding/fail_over_mac
Others:
[root@kvm1awb ~]# ls -la /sys/class/net/bond2/bonding/
total 0
drwxr-xr-x. 2 root root 0 Aug 13 00:26 .
drwxr-xr-x. 6 root root 0 Aug 13 00:25 ..
-rw-r--r--. 1 root root 4096 Aug 13 00:28 active_slave
-r--r--r--. 1 root root 4096 Aug 13 00:28 ad_actor_key
-r--r--r--. 1 root root 4096 Aug 13 00:28 ad_aggregator
-r--r--r--. 1 root root 4096 Aug 13 00:28 ad_num_ports
-r--r--r--. 1 root root 4096 Aug 13 00:28 ad_partner_key
-r--r--r--. 1 root root 4096 Aug 13 00:28 ad_partner_mac
-rw-r--r--. 1 root root 4096 Aug 13 00:28 ad_select
-rw-r--r--. 1 root root 4096 Aug 13 00:28 all_slaves_active
-rw-r--r--. 1 root root 4096 Aug 13 00:28 arp_interval
-rw-r--r--. 1 root root 4096 Aug 13 00:28 arp_ip_target
-rw-r--r--. 1 root root 4096 Aug 13 00:28 arp_validate
-rw-r--r--. 1 root root 4096 Aug 13 00:28 downdelay
-rw-r--r--. 1 root root 4096 Aug 13 00:27 fail_over_mac
-rw-r--r--. 1 root root 4096 Aug 13 00:28 lacp_rate
-rw-r--r--. 1 root root 4096 Aug 13 00:26 miimon
-r--r--r--. 1 root root 4096 Aug 13 00:26 mii_status
-rw-r--r--. 1 root root 4096 Aug 13 00:26 min_links
-rw-r--r--. 1 root root 4096 Aug 13 00:26 mode
-rw-r--r--. 1 root root 4096 Aug 13 00:28 num_grat_arp
-rw-r--r--. 1 root root 4096 Aug 13 00:28 num_unsol_na
-rw-r--r--. 1 root root 4096 Aug 13 00:28 primary
-rw-r--r--. 1 root root 4096 Aug 13 00:28 primary_reselect
-rw-r--r--. 1 root root 4096 Aug 13 00:28 queue_id
-rw-r--r--. 1 root root 4096 Aug 13 00:28 resend_igmp
-rw-r--r--. 1 root root 4096 Aug 13 00:28 slaves
-rw-r--r--. 1 root root 4096 Aug 13 00:28 updelay
-rw-r--r--. 1 root root 4096 Aug 13 00:28 use_carrier
-rw-r--r--. 1 root root 4096 Aug 13 00:28 xmit_hash_policy
- Configure slave devices. Add slave interfaces to the bonded interface with the following commands:
[root@kvm1awb ~]# ip link set enccw0.0.4106 master bond2
RTNETLINK answers: Operation not permitted
- Activate the interface.
Create the Bond interface, using Kimchi:
Error:
GINNET0075E
At least one slave is required for the bond interface
Solution: You have to save each interface
Error received after creating the bond interface, and select Up as an action. GINNET0016E
Bring up interface bond1 failed ! GINNET0016E: Unable to activate the interface on 'bond1', 'Could not load file '/etc/sysconfig/network-scripts/ifcfg-bond1' Could not load file '/etc/sysconfig/network-scripts/ifcfg-bond1' Could not load file '/etc/sysconfig/network-scripts/ifcfg-bond1' ./network-functions: line 518: echo: write error: Operation not permitted ./network-functions: line 518: echo: write error: Operation not permitted Could not load file '/etc/sysconfig/network-scripts/ifcfg-bond1' ./network-functions: line 518: echo: write error: Operation not permitted ./network-functions: line 518: echo: write error: Operation not permitted Error: Connection activation failed: No compatible connection found for master device bond1. Error: Connection activation failed: No compatible connection found for master device bond1. '.
Persistent file is not available for interface bond0.
Error: GINNET0057E
Delete interface bond0 failed ! GINNET0057E: Persistent file is not available for an interface, 'bond0'
Error: Delete interface bond1 failed ! GINNET0017E: Unable to deactivate the interface on 'bond1', ''.
[root@kvm1awb ~]# cd /var/lib/libvirt/images/
[root@kvm1awb images]# ls
linux80.img linux80.xml.install linux81.img linux81.xml.install s12-initrd.boot s12-kernel.boot
[root@kvm1awb images]# virsh define linux81.xml.install
Domain linux81 defined from linux81.xml.install
[root@kvm1awb images]# virsh start linux81 --console
Domain linux81 started
Connected to domain linux81
Escape character is ^]
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.12.49-11-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) ) #1 SMP Wed Nov 11 20:52:43 UTC 2015 (8d714a0)
setup.289988: Linux is running under KVM in 64-bit mode
Zone ranges:
DMA [mem 0x00000000-0x7fffffff]
Normal [mem 0x80000000-0xffffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x00000000-0xffffffff]
PERCPU: Embedded 12 pages/cpu @0000000080039000 s18176 r8192 d22784 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 1034240
Kernel command line: HostIP=9.60.87.83/23 Hostname=linux81.domain Gateway=9.60.86.1 Layer2=1 Install=ftp://ftp:[email protected]/sles12sp1 UseVNC=1 VNCPassword=12345678 InstNetDevvirtio Manual=0
NMI ring buffer size: 131072 bytes
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Memory: 4089348K/4194304K available (4870K kernel code, 779K rwdata, 2876K rodata, 456K init, 1135K bss, 104956K reserved)
Write protected kernel read-only data: 0x100000 - 0x890fff
Hierarchical RCU implementation.
CONFIG_RCU_FANOUT set to non-default value of 32
RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=3.
NR_IRQS:260
console [ttyS1] enabled
allocated 8388608 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
pid_max: default: 32768 minimum: 301
Security Framework initialized
AppArmor: AppArmor initialized
Mount-cache hash table entries: 256
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
Initializing cgroup subsys hugetlb
ftrace: allocating 15962 entries in 63 pages
cpu.33a262: 2 configured CPUs, 0 standby CPUs
Brought up 2 CPUs
devtmpfs: initialized
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
AppArmor: AppArmor Filesystem Enabled
NET: Registered protocol family 2
TCP established hash table entries: 32768 (order: 7, 524288 bytes)
TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 32768 bind 32768)
TCP: reno registered
UDP hash table entries: 2048 (order: 4, 65536 bytes)
UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
NET: Registered protocol family 1
Unpacking initramfs...
Freeing initrd memory: 30156K (0000000002f00000 - 0000000004c73000)
hypfs.7f5705: The hardware system does not support hypfs
hypfs.7a79f0: Initialization of hypfs failed with rc=-61
kgr: successfully initialized
futex hash table entries: 1024 (order: 6, 262144 bytes)
Initialise system trusted keyring
audit: initializing netlink socket (disabled)
type=2000 audit(1471380404.147:1): initialized
HugeTLB registered 1 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 8045
alg: No test for stdrng (krng)
Key type asymmetric registered
Asymmetric key parser 'x509' registered
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
hvc_iucv.691dff: The z/VM IUCV HVC device driver cannot be used without z/VM
mousedev: PS/2 mouse device common for all mice
cio.b5d5f6: Channel measurement facility initialized using format extended (mode autodetected)
TCP: cubic registered
NET: Registered protocol family 10
Loading compiled-in X.509 certificates
Loaded X.509 cert 'SUSE Linux Enterprise Secure Boot Signkey: 3fb077b6cebc6ff2522e1c148c57c777c788e3e7'
Loaded X.509 cert 'SUSE Linux Enterprise Secure Boot Signkey: 3fb077b6cebc6ff2522e1c148c57c777c788e3e7'
registered taskstats version 1
AppArmor: AppArmor sha1 policy hashing enabled
Freeing unused kernel memory: 456K (0000000000954000 - 00000000009c6000)
Moving into tmpfs... done.
Integrating /parts/00_lib
loop: module loaded
insmod /modules/squashfs.ko
squashfs: version 4.0 (2009/01/31) Phillip Lougher
/parts/00_lib: type = squashfs.
mount: /parts/00_lib: we need a loop device
mount: using /dev/loop0
Integrating /parts/01_usr
/parts/01_usr: type = squashfs.
mount: /parts/01_usr: we need a loop device
mount: using /dev/loop1
>>> SUSE Linux Enterprise 12 SP1 installation program v5.0.61 (c) 1996-2015 SUSE LLC <<<
Starting udev... SCSI subsystem initialized
alua: device handler registered
emc: device handler registered
rdac: device handler registered
udevd[106]: starting version 210
udevd[106]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
vda: unknown partition table
ok
haveged: haveged starting up
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Loading basic drivers...NET: Registered protocol family 17
FS-Cache: Loaded
udevd[106]: Network interface NamePolicy= disabled on kernel commandline, ignoring.
FS-Cache: Netfs 'nfs' registered for caching
8021q: 802.1Q VLAN Support v1.8
ok
Starting hardware detection... ok
(If a driver is not working for you, try booting with brokenmodules=driver_name.)
Virtio Storage 0
drivers: virtio_blk*
Virtio Ethernet Card 0
drivers: virtio_net*
eth0: network config created
8021q: adding VLAN 0 to HW filter on device eth0
Loading Installation System (1/5) - 100%
Loading Installation System (2/5) - 100%
Loading Installation System (3/5) - 100%
Loading Installation System (4/5) - 100%
Loading Installation System (5/5) - 100%
starting syslogd (logging to /var/log/messages)... ok
starting klogd... ok
starting nscd... ok
IP addresses:
9.60.87.83
starting slpd to announce VNC...
starting yast...
Starting Installer
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console
Couldn't get a file descriptor referring to the console
Probing connected terminal...
Initializing virtual console...
Found a Linux console terminal on /dev/console (111 columns x 31 lines).
starting VNC server...
A log file will be written to: /var/log/YaST2/vncserver.log ...
***
*** You can connect to <host>, display :1 now with vncviewer
*** Or use a Java capable browser on http://<host>:5801/
***
(When YaST2 is finished, close your VNC viewer and return to this window.)
Active interfaces:
eth0 Link encap:Ethernet HWaddr 52:54:00:D9:94:EC
inet addr:9.60.87.83 Bcast:9.60.87.255 Mask:255.255.254.0
--
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
*** Starting YaST2 ***
From Windows workstation
Open VNC Viewer at 9.60.87.83:1
Accept the security warning:
Insert the VNC password 12345678:
Follow with SLES12 SP1 installation, business as usual:
[root@kvm1awb images]# virsh list
Id Name State
----------------------------------------------------
1 linux81 running
[root@kvm1awb images]# virsh destroy linux81
Domain linux81 destroyed
[root@kvm1awb images]# virsh undefine linux81
Domain linux81 has been undefined
Installing Ubuntu 16.04 as a KVM Guest:
Bibliography: https://wiki.ubuntu.com/S390X https://wiki.ubuntu.com/S390X/Installation%20In%20zKVM
cd /mnt
Get the last Ubuntu image:
curl ftp://anonymous:@91.189.92.174/cdimage/releases/16.04/release/ubuntu-16.04.1-server-s390x.iso > ubuntu-16.04.1-server-s390x.iso
mkdir UBUNTU mount -o loop /mnt/ubuntu-16.04.1-server-s390x.iso /mnt/UBUNTU
[root@kvm1awb mnt]# mkdir UBUNTU
[root@kvm1awb mnt]# mount -o loop /mnt/ubuntu-16.04.1-server-s390x.iso /mnt/UBUNTU
mount: /dev/loop0 is write-protected, mounting read-only
[root@kvm1awb mnt]# ls UBUNTU
boot dists install pics preseed ubuntu
boot.catalog doc md5sum.txt pool README.diskdefines ubuntu.ins
[root@kvm1awb mnt]#
Copy kernel e initrd
[root@kvm1awb mnt]# cp /mnt/UBUNTU/boot/kernel.ubuntu /var/lib/libvirt/images
[root@kvm1awb mnt]# cp /mnt/UBUNTU/boot/initrd.ubuntu /var/lib/libvirt/images
cd /var/lib/libvirt/images/ qemu-img create -f qcow2 ubuntu.img 5G
[root@kvm1awb mnt]# cd /var/lib/libvirt/images/
[root@kvm1awb images]# qemu-img create -f qcow2 ubuntu.img 5G
Formatting 'ubuntu.img', fmt=qcow2 size=5368709120 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
[root@kvm1awb images]# virsh list --all
Id Name State
----------------------------------------------------
3 ubuntu16041 running
- linux81 shut off
[root@kvm1awb images]# virsh shutdown ubuntu16041
Domain ubuntu16041 is being shutdown
[root@kvm1awb images]# virsh edit ubuntu16041
Domain ubuntu16041 XML configuration edited.
ibmsys1@ubuntu16041abassani:~$ uname -a
Linux ubuntu16041abassani 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:11:06 UTC 2016 s390x s390x s390x GNU/Linux
ibmsys1@ubuntu16041abassani:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 900M 0 900M 0% /dev
tmpfs 181M 2.7M 179M 2% /run
/dev/vda1 3.0G 870M 2.0G 31% /
tmpfs 904M 0 904M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 904M 0 904M 0% /sys/fs/cgroup
tmpfs 181M 0 181M 0% /run/user/1000
ibmsys1@ubuntu16041abassani:~$ free -m
total used free shared buff/cache available
Mem: 1806 28 1573 2 204 1730
Swap: 1953 0 1953
ibmsys1@ubuntu16041abassani:~$ cat /proc/cpuinfo
vendor_id : IBM/S390
# processors : 2
bogomips per cpu: 17006.00
features : esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx
cache0 : level=1 type=Data scope=Private size=128K line_size=256 associativity=8
cache1 : level=1 type=Instruction scope=Private size=96K line_size=256 associativity=6
cache2 : level=2 type=Data scope=Private size=2048K line_size=256 associativity=8
cache3 : level=2 type=Instruction scope=Private size=2048K line_size=256 associativity=8
cache4 : level=3 type=Unified scope=Shared size=65536K line_size=256 associativity=16
cache5 : level=4 type=Unified scope=Shared size=245760K line_size=256 associativity=15
processor 0: version = FF, identification = 1DC957, machine = 2965
processor 1: version = FF, identification = 1DC957, machine = 2965
Executing the command on Ubuntu Guest
dd if=/dev/zero of=/dev/null &
On Ubuntu Guest:
top - 20:03:33 up 8 min, 1 user, load average: 0.87, 0.34, 0.13
Tasks: 94 total, 2 running, 92 sleeping, 0 stopped, 0 zombie
%Cpu(s): 22.3 us, 27.6 sy, 0.0 ni, 50.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1850140 total, 1610472 free, 29860 used, 209808 buff/cache
KiB Swap: 2000892 total, 2000892 free, 0 used. 1771932 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
899 ibmsys1 20 0 2144 664 592 R 100.0 0.0 2:05.11 dd
1 root 20 0 6576 5444 3820 S 0.0 0.3 0:00.31 systemd
On the KVM for z Host:
top - 21:04:05 up 4:07, 1 user, load average: 0.95, 0.50, 0.30
Tasks: 199 total, 25 running, 174 sleeping, 0 stopped, 0 zombie
%Cpu(s): 12.5 us, 0.0 sy, 0.0 ni, 87.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 12091084 total, 5465004 free, 678264 used, 5947816 buff/cache
KiB Swap: 4194300 total, 4194300 free, 0 used. 11262240 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
**9665 qemu 20 0 2942428 391816 8660 S 99.7 3.2 2:41.47 qemu-system-s39**
3983 root 10 -10 673516 83636 8688 S 0.3 0.7 0:06.66 ovs-vswitchd
1 root 20 0 9704 6840 3984 S 0.0 0.1 0:01.57 systemd