new_iso_image.md 1.01 KB
Newer Older
Francesc Guasch's avatar
Francesc Guasch committed
1
# How to add a new ISO image
Francesc Guasch's avatar
Francesc Guasch committed
2
3
4

ISO images are required to create KVM virtual machines. They can be placed or downloaded at run time.

Francesc Guasch's avatar
Francesc Guasch committed
5
## Placing your own ISO image
Francesc Guasch's avatar
Francesc Guasch committed
6
7
8

Copy the .iso file to the KVM storage, it is /var/lib/libvirt/images by default. Make sure everybody can read it

Francesc Guasch's avatar
Francesc Guasch committed
9
10
11
12
13
    # chown 07500 file.iso

Get the md5 for the ISO file, you will need it for the next step:

    # md5sum file.iso
Francesc Guasch's avatar
Francesc Guasch committed
14

Francesc Guasch's avatar
Francesc Guasch committed
15
16
Add an entry to the SQL table:

17
18
    mysql> INSERT INTO iso_images (name, description, arch, xml, xml_volume, md5, device)
            VALUES ('name','the description', 'i386', 'name.xml' ,'name-vol.xml','bbblamd5sumjustgenerated','/var/lib/libvirt/images/file.iso');
Francesc Guasch's avatar
Francesc Guasch committed
19
20

## XML file
Francesc Guasch's avatar
Francesc Guasch committed
21

Francesc Guasch's avatar
Francesc Guasch committed
22
23
24
25
A XML template file is required if you want to create machines from this ISO. In the directory etc/xml there are examples. You can make new ones creating a new machine from another tool like virt-manager. Once it is down dump the xml with

    # virsh dumpxml machine name.xml

Francesc Guasch's avatar
Francesc Guasch committed
26
## XML Volume file
Francesc Guasch's avatar
Francesc Guasch committed
27
28

Create a new xml volume file based in another one from etc/xml.