Nutanix Acropolis supports many different operating systems from both Windows and Linux world. The easiest way to deploy either Windows or Linux box on Nutanix Acropolis is to use image (template). Nutanix Acropolis has build in image service which supports different type of disks formats such as vmdk, vdi, vhd, iso, qcow2. Im this blog post I will show how to deploy Red Had 7 form qcow2 image.
- Download qcow2 RHEL 7.0 image from Red Hat and upload to Linux system where guestfish tools are installed. I will use guestfish tools to enable root user and set password for it, as by default root user is disabled in qcow2 images downloaded from Red Hat.
- Mount image
[root@kvn01 tmp]# guestfish --rw -a ./rhel-guest-image-7.0-20140618.1.x86_64.qcow2 Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> run ><fs> list-filesystems /dev/sda1: xfs ><fs> mount /dev/sda1 / ><fs> vi /etc/shadow
[box type=”info”] Do not exit from vi, you have to paste encrypted password for user root first.[/box]
- On second terminal run command openssl command to generate hashtag for new root password
[root@kvn01 ~]# openssl passwd -1 nutanix/4u $1$A51GS.na$.nR2Y.WlYJILFkdlJ2NZh1 [root@kvn01 ~]#
- Paste root password hashtag into /etc/shadows
- save file and exit from guesfish tools
- Create new image in Nutanix Acropolis, use modified qcow2 image as disk
- Deploy RHEL 7.0 VM from new image onto Nutanix Acropolis
- Launch console and log in to VM with root password
As you can see and watch (video below) there is no need to convert qcow to RAW format as image services takes care of everything for you 🙂