{"id":42847099,"url":"https://github.com/mvallim/cloud-image-ubuntu-from-scratch","last_synced_at":"2026-01-30T11:58:48.481Z","repository":{"id":46137222,"uuid":"236230055","full_name":"mvallim/cloud-image-ubuntu-from-scratch","owner":"mvallim","description":"This procedure shows how to create a cloud image Ubuntu from scratch to run on Cloud environments (EC2, GCE, Azure, QEMU and VirtualBox).","archived":false,"fork":false,"pushed_at":"2024-09-15T18:16:27.000Z","size":865,"stargazers_count":81,"open_issues_count":1,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-15T19:37:21.322Z","etag":null,"topics":["aws","azure","cloud","ec2","gce","google","image","qemu","scratch","virtualbox"],"latest_commit_sha":null,"homepage":"https://mvallim.github.io/cloud-image-ubuntu-from-scratch/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvallim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-25T21:07:17.000Z","updated_at":"2024-09-15T18:16:30.000Z","dependencies_parsed_at":"2023-01-18T01:45:43.716Z","dependency_job_id":null,"html_url":"https://github.com/mvallim/cloud-image-ubuntu-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mvallim/cloud-image-ubuntu-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvallim%2Fcloud-image-ubuntu-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvallim%2Fcloud-image-ubuntu-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvallim%2Fcloud-image-ubuntu-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvallim%2Fcloud-image-ubuntu-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvallim","download_url":"https://codeload.github.com/mvallim/cloud-image-ubuntu-from-scratch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvallim%2Fcloud-image-ubuntu-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T11:55:24.701Z","status":"ssl_error","status_checked_at":"2026-01-30T11:54:13.194Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","azure","cloud","ec2","gce","google","image","qemu","scratch","virtualbox"],"created_at":"2026-01-30T11:58:47.799Z","updated_at":"2026-01-30T11:58:48.472Z","avatar_url":"https://github.com/mvallim.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to create a Cloud image Ubuntu from scratch\n\nThis procedure shows how to create a cloud image Ubuntu from scratch to run on Cloud environments (EC2, GCE, Azure, QEMU, OpenStack and VirtualBox).\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"images/header.png\"\u003e\n\u003c/p\u003e\n\n## Prerequisites (GNU/Linux Debian/Ubuntu)\n\nInstall applications we need to build the environment.\n\n```shell\nsudo apt-get install \\\n   debootstrap \\\n   qemu-utils \\\n   qemu-system \\\n   genisoimage\n```\n\n```shell\nmkdir $HOME/cloud-image-ubuntu-from-scratch\n```\n\n## Create loop device\n\n1. Access build directory\n\n   ```shell\n   cd $HOME/cloud-image-ubuntu-from-scratch\n   ```\n\n2. Create empty virtual hard drive file (`30Gb`)\n\n   ```shell\n   dd if=/dev/zero of=cloud-ubuntu-image.raw bs=1 count=0 seek=32212254720 status=progress\n   ```\n\n3. Create partitions on file\n\n   ```shell\n   sed -e 's/\\s*\\([\\+0-9a-zA-Z]*\\).*/\\1/' \u003c\u003c EOF | sudo fdisk cloud-ubuntu-image.raw\n   o # clear the in memory partition table\n   n # new partition\n   p # primary partition\n   1 # partition number 1 \n       # default - start at beginning of disk\n   +512M # 512 MB boot parttion\n   n # new partition\n   p # primary partition\n   2 # partion number 2\n       # default, start immediately after preceding partition\n       # default, extend partition to end of disk\n   a # make a partition bootable\n   1 # bootable partition is partition 1 -- /dev/loop0p1\n   p # print the in-memory partition table\n   w # write the partition table\n   q # and we're done\n   EOF\n   ```\n\n4. Start loop device\n\n   ```shell\n   sudo losetup --show -fP cloud-ubuntu-image.raw\n   ```\n   \n   A similar output to this\n\n   ```text\n   /dev/loop18\n   ```\n\n   Check loop device\n\n   ```shell\n   sudo losetup -l /dev/loop18\n   ```\n\n   A similar output to this\n\n   ```text\n   NAME        SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                                                            DIO LOG-SEC\n   /dev/loop18         0      0         0  0 /home/scratch/cloud-image-ubuntu-from-scratch/cloud-ubuntu-image.raw   0     512\n   ```\n\n5. Check partitions on loop device\n\n   ```shell\n   sudo fdisk -l /dev/loop18\n   ```\n\n   A similar output to this\n\n   ```text\n   Disk /dev/loop18: 30 GiB, 32212254720 bytes, 62914560 sectors\n   Units: sectors of 1 * 512 = 512 bytes\n   Sector size (logical/physical): 512 bytes / 512 bytes\n   I/O size (minimum/optimal): 512 bytes / 512 bytes\n   Disklabel type: dos\n   Disk identifier: 0x64e50bc1\n\n   Device        Boot   Start      End  Sectors  Size Id Type\n   /dev/loop18p1 *       2048  1050623  1048576  512M 83 Linux\n   /dev/loop18p2      1050624 62914559 61863936 29.5G 83 Linux\n   ```\n\n## Format partitions loop device\n\n   1. Format device loop0p1 (/boot)\n\n      ```shell\n      sudo mkfs.ext4 /dev/loop18p1\n      ```\n\n      A similar output to this\n\n      ```text\n      mke2fs 1.47.0 (5-Feb-2023)\n      Discarding device blocks: done                            \n      Creating filesystem with 131072 4k blocks and 32768 inodes\n      Filesystem UUID: 08b9e410-eb6d-4ba7-8a83-c3c960bca98c\n      Superblock backups stored on blocks: \n      \t32768, 98304\n      \n      Allocating group tables: done                            \n      Writing inode tables: done                            \n      Creating journal (4096 blocks): done\n      Writing superblocks and filesystem accounting information: done\n      ```\n\n   2. Format device loop0p2 (/)\n\n      ```shell\n      sudo mkfs.ext4 /dev/loop18p2\n      ```\n\n      A similar output to this\n\n      ```text\n      mke2fs 1.47.0 (5-Feb-2023)\n      Discarding device blocks: done                            \n      Creating filesystem with 7732992 4k blocks and 1933312 inodes\n      Filesystem UUID: 1c8f95b7-ea0f-4b62-a6ca-2da0c42209e2\n      Superblock backups stored on blocks: \n      \t32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \n      \t4096000\n      \n      Allocating group tables: done                            \n      Writing inode tables: done                            \n      Creating journal (32768 blocks): done\n      Writing superblocks and filesystem accounting information: done   \n      ```\n\n## Mount loop devices\n\n1. Access build directory\n\n   ```shell\n   cd $HOME/cloud-image-ubuntu-from-scratch\n   ```\n\n2. Create `chroot` directory\n\n   ```shell\n   mkdir chroot\n   ```\n\n3. Mount `root` partition\n\n   ```shell\n   sudo mount /dev/loop18p2 chroot/\n   ```\n\n4. Mount `boot` partition\n\n   First you need create directory...\n\n   ```shell\n   sudo mkdir chroot/boot\n   ```\n\n   ... and mount `boot` partition\n\n   ```shell\n   sudo mount /dev/loop18p1 chroot/boot\n   ```\n\n## Bootstrap and Configure Ubuntu\n\n* Checkout bootstrap\n\n  ```shell\n  sudo debootstrap \\\n     --arch=amd64 \\\n     --variant=minbase \\\n     --components \"main,universe\" \\\n     --include \"ca-certificates,cron,iptables,isc-dhcp-client,libnss-myhostname,ntp,ntpdate,rsyslog,ssh,sudo,dialog,whiptail,man-db,curl,dosfstools,e2fsck-static\" \\\n     bionic \\\n     $HOME/cloud-image-ubuntu-from-scratch/chroot \\\n     http://us.archive.ubuntu.com/ubuntu/\n  ```\n\n  \u003e **debootstrap** is used to create a Debian base system from scratch, without requiring the availability of **dpkg** or **apt**. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be **chrooted** into.\n\n* Configure external mount points\n\n  ```shell\n  sudo mount --bind /dev $HOME/cloud-image-ubuntu-from-scratch/chroot/dev\n  \n  sudo mount --bind /run $HOME/cloud-image-ubuntu-from-scratch/chroot/run\n  ```\n\n  As we will be updating and installing packages (grub among them), these mount points are necessary inside the chroot environment, so we are able to finish the installation without errors.\n\n## Define chroot environment\n\n*A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally cannot access) files outside the designated directory tree. The term \"chroot\" may refer to the chroot system call or the chroot wrapper program. The modified environment is called a chroot jail.*\n\n\u003e Reference: https://en.wikipedia.org/wiki/Chroot\n\n1. **Access chroot environment**\n\n   ```shell\n   sudo chroot $HOME/cloud-image-ubuntu-from-scratch/chroot\n   ```\n\n2. **Configure mount points, home and locale**\n\n   ```shell\n   mount none -t proc /proc\n\n   mount none -t sysfs /sys\n\n   mount none -t devpts /dev/pts\n\n   export HOME=/root\n\n   export LC_ALL=C\n   ```\n\n   These mount points are necessary inside the chroot environment, so we are able to finish the installation without errors.\n\n3. **Set a custom hostname**\n\n   ```shell\n   echo \"ubuntu-image\" \u003e /etc/hostname\n   ```\n\n4. **Configure apt sources.list**\n\n   ```shell\n   cat \u003c\u003cEOF \u003e /etc/apt/sources.list\n   deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse\n   deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse\n\n   deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse\n   deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse\n\n   deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse\n   deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse\n   EOF\n   ```\n\n5. **Configure `fstab`**\n\n   ```shell\n   cat \u003c\u003cEOF \u003e /etc/fstab\n   # /etc/fstab: static file system information.\n   #\n   # Use 'blkid' to print the universally unique identifier for a\n   # device; this may be used with UUID= as a more robust way to name devices\n   # that works even if disks are added and removed. See fstab(5).\n   #\n   # \u003cfile system\u003e         \u003cmount point\u003e   \u003ctype\u003e  \u003coptions\u003e                       \u003cdump\u003e  \u003cpass\u003e\n   /dev/sda2               /               ext4    errors=remount-ro               0       1\n   /dev/sda1               /boot           ext4    defaults                        0       2\n   EOF\n   ```\n\n6. **Update indexes packages**\n\n   ```shell\n   apt-get update\n   ```\n\n7. **Install systemd**\n\n   ```shell\n   apt-get install -y systemd-sysv\n   ```\n\n   \u003e **systemd** is a system and service manager for Linux. It provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.\n\n8. **Configure machine-id and divert**\n\n   ```shell\n   dbus-uuidgen \u003e /etc/machine-id\n\n   ln -fs /etc/machine-id /var/lib/dbus/machine-id\n   ```\n\n   \u003e The `/etc/machine-id` file contains the unique machine ID of the local system that is set during installation or boot. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. This ID may not be all zeros.\n\n   ```shell\n   dpkg-divert --local --rename --add /sbin/initctl\n\n   ln -s /bin/true /sbin/initctl\n   ```\n\n   \u003e **dpkg-divert** is the utility used to set up and update the list of diversions.\n\n9. **Install packages needed for system**\n\n   ```shell\n   apt-get install -y \\\n       os-prober \\\n       ifupdown \\\n       network-manager \\\n       locales \\\n       build-essential \\\n       module-assistant \\\n       cloud-init \\\n       grub-pc \\\n       grub2 \\\n       linux-generic\n   ```\n\n   The next steps will appear, as a result of the packages that will be installed from the previous step, this will happen without anything having to be informed or executed.\n\n   1. Configure grub\n      \u003cp align=\"center\"\u003e\n        \u003cimg src=\"images/grub-configure-01.png\"\u003e\n      \u003c/p\u003e\n\n   2. Don’t select any options\n      \u003cp align=\"center\"\u003e\n        \u003cimg src=\"images/grub-configure-02.png\"\u003e\n      \u003c/p\u003e\n\n   3. Only confirm “Yes”\n      \u003cp align=\"center\"\u003e\n        \u003cimg src=\"images/grub-configure-03.png\"\u003e\n      \u003c/p\u003e\n\n10. **Configure `interfaces`**\n\n    ```shell\n    cat \u003c\u003cEOF \u003e /etc/network/interfaces\n    # This file describes the network interfaces available on your system\n    # and how to activate them. For more information, see interfaces(5).\n\n    source /etc/network/interfaces.d/*\n\n    # The loopback network interface\n    auto lo\n    iface lo inet loopback\n    EOF\n    ```\n\n11. **Reconfigure packages**\n\n    1. Generate locales\n\n       ```shell\n       dpkg-reconfigure locales\n       ```\n\n       1. *Select locales*\n          \u003cp align=\"center\"\u003e\n            \u003cimg src=\"images/locales-select.png\"\u003e\n          \u003c/p\u003e\n\n       2. *Select default locale*\n          \u003cp align=\"center\"\u003e\n            \u003cimg src=\"images/locales-default.png\"\u003e\n          \u003c/p\u003e   \n\n    2. Configure network-manager\n\n       ```shell\n       cat \u003c\u003cEOF \u003e /etc/NetworkManager/NetworkManager.conf\n       [main]\n       rc-manager=none\n       plugins=ifupdown,keyfile\n       dns=systemd-resolved\n      \n       [ifupdown]\n       managed=false\n       EOF\n       ```\n\n    4. Reconfigure network-manager\n\n       ```shell\n       dpkg-reconfigure network-manager\n       ```\n\n12. **Install `grub`**\n\n    1. Install\n\n       ```shell\n       grub-install /dev/loop0\n       ```\n\n       A similar output to this\n\n       ```text\n       Installing for i386-pc platform.\n       Installation finished. No error reported.\n       ```\n\n    2. Update grub configuration\n\n       ```shell\n       update-grub\n       ```\n\n       A similar output to this\n\n       ```text\n       Sourcing file `/etc/default/grub'\n       Generating grub configuration file ...\n       Found linux image: /boot/vmlinuz-4.15.0-74-generic\n       Found initrd image: /boot/initrd.img-4.15.0-74-generic\n       Adding boot menu entry for EFI firmware configuration\n       done\n       ```\n       \n    2. Update packages\n\n       ```shell\n       apt-get -y upgrade\n       ```\n\n## VirtualBox\n\nIf you plan to use this image in **VirtualBox**, install **VirtualBox Guest Additions**\n\n   1. Download VirtualBox Guest Additions\n\n       ```shell\n       curl --progress-bar https://download.virtualbox.org/virtualbox/6.1.38/VBoxGuestAdditions_6.1.38.iso -o VBoxGuestAdditions_6.1.38.iso\n       ```\n\n   2. Mount ISO\n\n       ```shell\n       mount -o loop VBoxGuestAdditions_6.1.38.iso /mnt\n       ```\n\n   3. Install\n\n       ```shell\n       /mnt/VBoxLinuxAdditions.run --nox11\n       ```\n\n       Output like this\n\n       ```text\n       Verifying archive integrity... All good.\n       Uncompressing VirtualBox 6.1.38 Guest Additions for Linux........\n       VirtualBox Guest Additions installer\n       Copying additional installer modules ...\n       Installing additional modules ...\n       depmod: ERROR: could not open directory /lib/modules/4.19.0-6-amd64: No such file or directory\n       depmod: FATAL: could not search modules: No such file or directory\n       VirtualBox Guest Additions: Starting.\n       VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel \n       modules.  This may take a while.\n       VirtualBox Guest Additions: To build modules for other installed kernels, run\n       VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup \u003cversion\u003e\n       VirtualBox Guest Additions: or\n       VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all\n       VirtualBox Guest Additions: Kernel headers not found for target kernel \n       4.19.0-6-amd64. Please install them and execute\n         /sbin/rcvboxadd setup\n       modprobe vboxguest failed\n       The log file /var/log/vboxadd-setup.log may contain further information.\n       Running in chroot, ignoring request: daemon-reload\n       ```\n\n   4. Generate modules inside `chroot` environment\n\n       ```shell\n       ls -al /lib/modules\n       ```\n\n       Output\n\n       ```text\n       total 12\n       drwxr-xr-x  3 root root 4096 Jan 25 22:29 .\n       drwxr-xr-x 14 root root 4096 Jan 25 22:29 ..\n       drwxr-xr-x  5 root root 4096 Jan 25 22:29 4.15.0-74-generic\n       ```\n\n       Use the same name listed before 4.15.0-74-generic\n\n       ```shell\n       rcvboxadd quicksetup 4.15.0-74-generic\n       ```\n\n       Output like this\n\n       ```text\n       VirtualBox Guest Additions: Building the modules for kernel 4.15.0-74-generic.\n       update-initramfs: Generating /boot/initrd.img-4.15.0-74-generic\n       Warning: /sbin/fsck.vfat doesn't exist, can't install to initramfs, ignoring.\n       ```\n\n   5. Umount and remove ISO\n\n       ```shell\n       umount /mnt\n\n       rm -rf VBoxGuestAdditions_6.1.38.iso\n       ```\n\n   6. Fix `vboxadd-service`\n\n       ```shell\n       sed -i -e 's/ systemd-timesyncd.service//g' /lib/systemd/system/vboxadd-service.service\n       ```\n\n## Azure\n\nIf you plan to use this image in **Azure**, install the **Azure agent**\n\n   1. Install the latest package version\n\n       ```shell\n       apt-get install walinuxagent\n       ```\n\n   2. Ensure auto update is enabled\n\n       First, check to see if it is enabled:\n\n       ```shell\n       cat /etc/waagent.conf | grep AutoUpdate.Enabled\n       ```\n\n       Find 'AutoUpdate.Enabled'. If you see this output, it is enabled:\n\n       ```text\n       # AutoUpdate.Enabled=y\n       ```\n\n   3. To enable run:\n\n       ```shell\n       sudo sed -i 's/# AutoUpdate.Enabled=n/AutoUpdate.Enabled=y/g' /etc/waagent.conf\n       ```\n\n## Cleanup the chroot environment\n\n   1. If you installed software, be sure to run\n\n       ```shell\n       truncate -s 0 /etc/machine-id\n       ```\n\n   2. Remove the diversion\n\n       ```shell\n       rm /sbin/initctl\n\n       dpkg-divert --rename --remove /sbin/initctl\n       ```\n\n   3. Clean up\n\n       ```shell\n       apt-get clean\n\n       rm -rf /tmp/* ~/.bash_history\n\n       umount /proc\n\n       umount /sys\n\n       umount /dev/pts\n\n       export HISTSIZE=0\n\n       exit\n       ```\n\n## Unbind mount points\n\n```shell\nsudo umount $HOME/cloud-image-ubuntu-from-scratch/chroot/dev\n\nsudo umount $HOME/cloud-image-ubuntu-from-scratch/chroot/run\n```\n\n## Umount loop partitions\n\n```shell\nsudo umount $HOME/cloud-image-ubuntu-from-scratch/chroot/boot\n\nsudo umount $HOME/cloud-image-ubuntu-from-scratch/chroot\n```\n\n## Leave loop device\n\n```shell\nsudo losetup -D\n```\n\n## Conclusion\n\nAt the end the image produced is in `cloud-ubuntu-image.raw`.\n\nNow you can use this raw image and import it into your favorite cloud.\n\nEach cloud has a process for importing which we will not deal with here.\n\n## Test image\n\n1. **Convert `raw` image to `qcow2`**\n\n   ```shell\n   qemu-img convert -f raw cloud-ubuntu-image.raw -O qcow2 ubuntu-image.qcow2\n   ```\n\n2. **Create a simple `user-data` intilizer `cloud-init`**\n\n   Generate hash passwd 'ubuntu'\n\n   ```shell\n   openssl passwd -6 ubuntu\n   ```\n\n   Output\n\n   ```text\n   $6$vcSilJc5EkAaj/sE$RfHgGqzKQ/iVHvFObi8acrKFeLUcNAHH7YPT7hP7euIB5m8p.rbxxntrgyFalFG6eKlKE/OLCq6L2Fu/NWZi4/\n   ```\n\n   Use this value on user-data yml file\n\n   ```shell\n   cat \u003c\u003cEOF \u003e user-data\n   #cloud-config\n\n   users:\n   - name: ubuntu\n     passwd: \\$6\\$vcSilJc5EkAaj/sE\\$RfHgGqzKQ/iVHvFObi8acrKFeLUcNAHH7YPT7hP7euIB5m8p.rbxxntrgyFalFG6eKlKE/OLCq6L2Fu/NWZi4/\n     lock_passwd: false\n     sudo: ['ALL=(ALL) NOPASSWD:ALL']\n     shell: /bin/bash\n\n   power_state:\n     mode: reboot\n     timeout: 30\n     condition: true\n   EOF\n   ```\n\n3. **Create a simple `meta-data` intilizer `cloud-init`**\n\n   ```shell\n   cat \u003c\u003cEOF \u003e meta-data\n   local-hostname: instance-test\n   EOF\n   ```\n\n4. **Create a disk to attach with Cloud-Init configuration**\n\n   ```shell\n   genisoimage \\\n      -output instance-test-cidata.iso \\\n      -input-charset utf-8 \\\n      -volid cidata \\\n      -joliet \\\n      -rock \\\n      user-data meta-data\n   ```\n\n   Output\n\n   ```text\n   Total translation table size: 0\n   Total rockridge attributes bytes: 331\n   Total directory bytes: 0\n   Path table size(bytes): 10\n   Max brk space used 0\n   183 extents written (0 MB)\n   ```\n\n5. **Launch virtual machine**\n\n   ```shell\n   qemu-system-x86_64 \\\n      -m 512 \\\n      -hda ubuntu-image.qcow2 \\\n      -cdrom instance-test-cidata.iso \\\n      -enable-kvm \\\n      -net nic \\\n      -net user\n   ```\n\n6. **Login on image**\n\n   Use user `ubuntu` and password `ubuntu`, previously configured in step **2**\n\n   \u003cp align=\"center\"\u003e\n      \u003cimg src=\"images/qemu.png\"\u003e\n   \u003c/p\u003e\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [GitHub](https://github.com/mvallim/cloud-image-ubuntu-from-scratch) for versioning. For the versions available, see the [tags on this repository](https://github.com/mvallim/cloud-image-ubuntu-from-scratch/tags).\n\n## Authors\n\n* **Marcos Vallim** - *Initial work, Development, Test, Documentation* - [mvallim](https://github.com/mvallim)\n\nSee also the list of [contributors](CONTRIBUTORS.txt) who participated in this project.\n\n## License\n\nThis project is licensed under the Apache License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvallim%2Fcloud-image-ubuntu-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvallim%2Fcloud-image-ubuntu-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvallim%2Fcloud-image-ubuntu-from-scratch/lists"}