Skip to content

Qemu machine setup for ZSO - Advanced topics in operating systems 2021/2022 at MIMUW

Notifications You must be signed in to change notification settings

TomaszDomagala/zso-qemu-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Setup

  • make backing-image.qcow2 - downloads the backing image and extracts it
  • qemu-img resize backing-image.qcow2 +10G - increases the size of the backing image
  • make run-backing-image - runs the backing image for initial setup
  • login with root:root
  • lsblk - confirm the backing image size
  • fdisk /dev/sda
  • d 3 - delete the 3rd partition
  • n 3 - create a new partition, use default options
  • w - write changes
  • reboot - reboot the machine, reload the partition table
  • resize2fs /dev/sda3 - resize the partition
  • Change /etc/ssh/sshd_config to: PermitRootLogin yes, PasswordAuthentication yes
  • Setup ssh keys for zso, from host: ssh-copy-id -p 2222 zso@localhost
  • Setup ssh keys for root, from host: ssh-copy-id -p 2222 root@localhost
  • Copy your own ssh keys to the machine to use git and ssh: scp -P 2222 -r ~/.ssh zso@localhost:~
  • apt-get update && apt-get install -y rsync
  • close the virtual machine
  • make current-image.qcow2 - creates the current image, backed by the backing image
  • make run-current-image - runs the current image

You can add aliases to ssh config to simplify commands. In ~/.ssh/config:

Host zso-zso
  HostName localhost
  Port 2222
  User zso

Host root-zso
  HostName localhost
  Port 2222
  User root

Sources: https://sandilands.info/sgordon/increasing-kvm-virtual-machine-disk-using-lvm-ext4

About

Qemu machine setup for ZSO - Advanced topics in operating systems 2021/2022 at MIMUW

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published