salt.modules.img

Virtual machine image management tools

salt.modules.img.bootstrap(location, size, fmt)

HIGHLY EXPERIMENTAL Bootstrap a virtual machine image

location:
The location to create the image
size:
The size of the image to create in megabytes
fmt:
The image format, raw or qcow2
CLI Example::
salt '*' qemu_nbd.bootstrap /srv/salt-images/host.qcow 4096 qcow2
salt.modules.img.mnt_image(location)

Mount the named image and return the mount point

CLI Example:

salt '*' img.mount_image /tmp/foo
salt.modules.img.seed(location, id_='', config=None)

Make sure that the image at the given location is mounted, salt is installed, keys are seeded, and execute a state run

CLI Example:

salt '*' img.seed /tmp/image.qcow2
salt.modules.img.umount_image(mnt)

Unmount an image mountpoint

CLI Example:

salt '*' img.umount_image /mnt/foo

Previous topic

salt.modules.hosts

Next topic

salt.modules.iptables