Creating an Image from an ISO File

User documentation

  • Last Updated: 08/10/2018

Note: This guide should only be followed by very advanced users. Most people should follow the "Getting Lab Images" guide in the wiki.

Preparing the images

First, grab the iso you want to use as the install medium:

root@richweb-host Fri Jul 27 09:28:01 EDT 2018
 /d/drive1 > wget

Next, create your install disk with appropriate size:

root@richweb-host Fri Jul 27 09:31:44 EDT 2018
 /d/drive1 > fallocate -l 3G 3cx_guest.img

Running the install command

Now, you can run the virt-install command. -c specifies the iso location, and -f specifies the image file location.

root@richweb-host Fri Jul 27 09:33:27 EDT 2018
 /d/drive1 > virt-install -r 2048 --accelerate -n 3cx-guest   \
                 -f /data/images/3cx-guest.img   \
                 --connect qemu:///system    \
                 --vcpus=1   \
                 --bridge=vmbr10   \
                 --os-variant debianwheezy   \
                 -c /data/drive1/debian-amd64-netinst-3cx.iso    \
                 --graphics vnc

Accessing the console of the VM

Use X forwarding to open the console of the vm with virt-manager now.

 ~> ssh root@ -X
Linux richweb-host 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 Richmond VA:              804.747.8592
Huy C. Phan     804.307.6940

* State Law (Article 7.1 of Title 18.2 of the Code of Virginia)     *
* classifies damage to computer hardware or software (18.2-152.4),  *
* unauthorized examination (18.2-152.5), or unauthorized use (18.2- *
* 152.6) of computer systems as (Misdemeanor) crimes.  Computer     *
* Fraud (18.2-152.3) and use of a computer as an instrument of      *
* forgery (18.2-152.14) can be felonies.  Richweb's                 *
* internal procedures for enforcement of its policy are independent *
* of possible prosecution under the law.                            *

Last login: Fri Jul 27 09:31:27 2018 from

root@richweb-host Fri Jul 27 09:37:44 EDT 2018
 ~ > virt-manager

root@richweb-host Fri Jul 27 09:37:48 EDT 2018
 ~ >

Now, a window from which you can select and view your VM should pop up. If you are using PuTTY not Linux, you'll have to set up X forwarding manually. You can follow this guide:

You can now complete the installation through virt-manager and reboot the VM once finished.