Hi,
I am new to virt-install and just a regular user of UEFI, so forgive me if I ask something stupid.- if the first disk is "empty" (just created, not partitioned), then the system should boot from the second HDD, which contains an installer image,
- otherwise if an UEFI bootable system is found in the first HDD, then it should boot from that.
(it is also OK if I could change the boot order after the VM is booted (during installation it gets rebooted)
- it should happen without manual intervention (e.g. interactive boot menu), fully scripted.
INSTALLER_IMAGE_PATH=/path/to/installer-image.qcow2
virt-install --name my-vm --network default --connect qemu:///system --memory=4096 --cpu=host --vcpus=2 --os-type=linux --os-variant=generic --noautoconsole --events _on_poweroff_=preserve --disk pool=default,size=30 --disk $INSTALLER_IMAGE_PATH --boot loader=/usr/share/ovmf/x64/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/ovmf/x64/OVMF_VARS.fd,loader_secure=no
The "--boot
loader=/usr/share/ovmf/x64/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/ovmf/x64/OVMF_VARS.fd,loader_secure=no" magic I googled from somewhere, as the "--boot uefi" option did not work (gave "ERROR Error: --boot uefi: Did not find any UEFI binary path for arch 'x86_64'").
The OVMF file paths are based on the Arch linux ovmf package.
The OVMF file paths are based on the Arch linux ovmf package.
The problem with this is that the system does not boots the installer image, but I get an "UEFI Interactive Shell v2.2" screen.
If I switch the order of the two disks, then the installer image is booted (but that's not what I want):
# This one boots the installer image, but the order of the disks are reversed
virt-install --name my-vm --network default --connect qemu:///system --memory=4096 --cpu=host --vcpus=2 --os-type=linux --os-variant=generic --noautoconsole --events _on_poweroff_=preserve --disk $INSTALLER_IMAGE_PATH --disk pool=default,size=30 --boot loader=/usr/share/ovmf/x64/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/ovmf/x64/OVMF_VARS.fd,loader_secure=no
virt-install --name my-vm --network default --connect qemu:///system --memory=4096 --cpu=host --vcpus=2 --os-type=linux --os-variant=generic --noautoconsole --events _on_poweroff_=preserve --disk $INSTALLER_IMAGE_PATH --disk pool=default,size=30 --boot loader=/usr/share/ovmf/x64/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/ovmf/x64/OVMF_VARS.fd,loader_secure=no
(Also, it would be nice if usb boot would would be supported and I could change the boot order like disk, usb.)
$ virt-install --version
2.0.0
$ qemu-system-x86_64 --version
QEMU emulator version 3.1.0
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
2.0.0
$ qemu-system-x86_64 --version
QEMU emulator version 3.1.0
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
Regards,
Attila
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list