Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
qemu-img create -f qcow2 -o preallocation=metadata nyttimage.qcow2 6G
virt-resize --expand /dev/sda1 originalimage.img nyttimage.qcow2

# Dette kødder til partisjonstabellen i imaget; såeh..
virt-rescue nyttimage.qcow2
mkdir /mnt
mount /dev/sda3 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install /dev/sda

Modifisering av image

Code Block
# git clone git@github.com:ntnusky/admintools.git
# Last ned qcow2-utgaven av imaget du skal modifisere
# Last ned cuda-installer, og rename til cuda.run
# Katalogen grid-image-build inneholder bygge-script for hhv CentOS og Ubuntu
# Scriptene er verifisert med CentOS 7 og Ubuntu Server 18.04

# ./create-centos-image.sh <originalimage.qcow2>
# ./create-ubuntu-image.sh <originalimage.qcow2>

...