22.16.158. salt.modules.qemu_nbd

22.16.158.1. Qemu Command Wrapper

The qemu system comes with powerful tools, such as qemu-img and qemu-nbd which are used here to build up kvm images.

salt.modules.qemu_nbd.clear(mnt)

Pass in the mnt dict returned from nbd_mount to unmount and disconnect the image from nbd. If all of the partitions are unmounted return an empty dict, otherwise return a dict containing the still mounted partitions

CLI Example:

salt '*' qemu_nbd.clear '{"/mnt/foo": "/dev/nbd0p1"}'
salt.modules.qemu_nbd.connect(image)

Activate nbd for an image file.

CLI Example:

salt '*' qemu_nbd.connect /tmp/image.raw
salt.modules.qemu_nbd.init(image)

Mount the named image via qemu-nbd and return the mounted roots

CLI Example:

salt '*' qemu_nbd.init /srv/image.qcow2
salt.modules.qemu_nbd.mount(nbd)

Pass in the nbd connection device location, mount all partitions and return a dict of mount points

CLI Example:

salt '*' qemu_nbd.mount /dev/nbd0

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.16.157. salt.modules.qemu_img

Next topic

22.16.159. salt.modules.quota

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.