Configuring an ISO image as IPL device

Boot a guest from an ISO 9660 image following the EL Torito specification.

Before you begin

Usually, your distribution provides an ISO image of the installation DVD.

Procedure

  1. Configure a virtual SCSI-attached CD/DVD drive as a persistent device, which contains the ISO image as virtual DVD.

    See Configuring a virtual SCSI-attached CD/DVD drive.

    You can also configure the ISO image as a storage device, but usually you might want to take advantage of the capability to change the virtual media.

  2. Per default, the guest is booted from the first specified disk device in the current libvirt-internal configuration. To avoid possible errors, explicitly specify the boot device with the boot element in the disk device definition (see <boot>).
    boot order attribute: <number>

    The guest is booted from the disk with the lowest specified boot order value.

  3. For guests that are to run in IBM® Secure Execution mode and cannot use the launchSecurity element in the virtual server configuration, ensure that the device uses the guest's bounce buffer, see Preparing the virtual server.

Example

  1. Specify the ISO image.
    Configure the ISO image as a virtual DVD:
    <devices>
       ...
       <controller type="scsi" model="virtio-scsi" index="4"/>
       <disk type="file" device="cdrom">
          <driver name="qemu" type="raw" io="native" cache="none"/>
          <source file="/var/lib/libvirt/images/Linux­DVD1.iso"/>
          <target dev="sda" bus="scsi"/>
          <address type="drive" controller="4" bus="0" target="0" unit="0"/>
          <readonly/>
          <boot order="1"/>
       </disk>
       ...
    </devices>
    When you start the virtual server, it will be booted from this ISO image:
    # virsh start vserv1 --console
    Domain vserv1 started
    Initializing cgroup subsys cpuacct
    Linux version 3.12.49­11-default (geeko@buildhost) (gcc version 4.8.5
     (SUSE Linux) ) #1 SMP Fri Sep 15 20:52:43 UTC 2022 (8d714a0)
    setup.289988: Linux is running under KVM in 64­bit mode
    Zone ranges:
     DMA      [mem 0x00000000­0x7fffffff]
     Normal   empty
    ...
  2. Provide a disk for the guest installation:
    <disk type="block" device="disk">
        <driver name="qemu" type="raw" cache="none" io="native" iothread="2"/>
        <source dev="/dev/mapper/36005076305ffc1ae00000000000021d7"/>
        <target dev="vdb" bus="virtio"/>
        <address type="ccw" cssid="0xfe" ssid="0x0" devno="0xe716"/>
    </disk>