O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Follow these steps outlined to install a new Debian Linux distribution on the raw image:

  1. Mount the root partition from the Network Block Device (NBD) device and ensure that it was mounted successfully:
root@kvm:~# mount /dev/nbd0p2 /mnt/    root@kvm:~# mount | grep mnt    /dev/nbd0p2 on /mnt type ext4 (rw) root@kvm:~#
  1. Install the latest stable Debian distribution on the root partition mounted on /mnt from the specified public repository:
root@kvm:~# debootstrap --arch=amd64 --include="openssh-server vim" stable /mnt/ http://httpredir.debian.org/debian/    ...    I: Base system installed successfully.    root@kvm:~#
  1. Ensure the root filesystem was created, by listing all the files at the mounted location:
root@kvm:~# ls -lah /mnt/ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required