virt-install

Differences between revisions 1 and 2
Revision 1 as of 2018-11-02 19:35:19
Size: 1946
Editor: manjo
Comment:
Revision 2 as of 2018-11-02 19:36:40
Size: 2054
Editor: manjo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
virt-install is a command line tool for creating virtual machines, it uses the libvirt hypervisor to create the guests. You could use this mechanism to validate the install of Ubuntu release ISO images on a virtual disk. virt-install is a command line tool for creating virtual machines, it uses the libvirt hypervisor to create the guests. You could use this mechanism to validate the install of Ubuntu release ISO images on a virtual disk. The instructions below uses examples to use virt-install to install the Ubuntu Bionic ARM64 server release.

Ubuntu ISO install using virt-install

virt-install is a command line tool for creating virtual machines, it uses the libvirt hypervisor to create the guests. You could use this mechanism to validate the install of Ubuntu release ISO images on a virtual disk. The instructions below uses examples to use virt-install to install the Ubuntu Bionic ARM64 server release.

Perquisites

Set up archives

If your system is running Ubuntu Xenial release you might want to consider using the latest cloud archive. Cloud archive will provide you the latest versions of packages you would need for installing the ISO on a virtual disk. For example to use the queens cloud-archive do the following.

$ sudo add-apt-repository -y cloud-archive:queens
$ sudo apt update

Install packages

$ sudo apt install -y virt-manager qemu-efi

Download the Ubuntu ISO

Download the ISO that you wish to use for your install. For Bionic release and ARM64 architecture you would do the following.

$ wget http://cdimage.ubuntu.com/ubuntu-server/daily/current/bionic-server-arm64.iso

Create a virtual disk to install the ISO

$ qemu-img create -f raw bionic-image1.img +2G

Install Bionic using virt-install

The following command is to install the ARM64 Ubuntu Bionic ISO onto the virtual disk. Please modify the example given below to suite your architecture, VM name, server ip etc.

$ sudo virt-install --machine=virt --arch=aarch64 --boot loader=/usr/share/qemu-efi/QEMU_EFI.fd --name=bionic-vm2 --virt-type=kvm --boot cdrom,hd --network=default,model=virtio --disk path=/home/ubuntu/bionic-image1.img,format=raw,device=disk,bus=virtio,cache=none --memory=2048 --vcpu=1 --cdrom=./bionic-server-arm64.iso --graphics vnc,listen=10.228.68.8 --check all=off

Connect to installer

From a remote system you could use vinagre to connect to the target's ip address, or use virsh console on the local system (install server) to start the install process.

UEFI/virt-install (last edited 2018-11-02 19:36:40 by manjo)