Difference between revisions of "Mount ISO image in a OpenVZ container"
Line 10: | Line 10: | ||
vzctl set <CT_ID> --devnodes fuse:rw --save | vzctl set <CT_ID> --devnodes fuse:rw --save | ||
− | + | OR alternative you can run the next commands on node: | |
+ | vzctl set <CT_ID> --devices c:10:229:rw --save | ||
+ | vzctl exec <CT_ID> mknod /dev/fuse c 10 229 | ||
+ | |||
+ | Run inside VPS | ||
+ | fuseiso image.iso /mnt/disk | ||
+ | |||
+ | NOTE that depending on OS inside container some things may be differ: | ||
+ | for Debian and Ubuntu, install fuseiso and fuse-utils packages (available in repository) | ||
+ | for RHEL/CentOS 3/4/5, use DAG's packages fuse-iso and fuse | ||
+ | |||
+ | For example for Debian 8 it's also necessary to run the next command inside container before install fuse: | ||
+ | mknod /dev/fuse c 10 229 | ||
+ | It may not work if run on the node using vzctl exec in some cases. SO just keep in mind this. | ||
+ | |||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 16:20, 18 November 2016
This page describes how to mount ISO image inside a container.
Original page can be found here: http://openvz.org/Mount_ISO_image_in_a_container
You need to install fuseiso and fuse into container.
To mount an ISO image, do next command inside container:
Run on a node:
vzctl set <CT_ID> --devnodes fuse:rw --save
OR alternative you can run the next commands on node:
vzctl set <CT_ID> --devices c:10:229:rw --save vzctl exec <CT_ID> mknod /dev/fuse c 10 229
Run inside VPS
fuseiso image.iso /mnt/disk
NOTE that depending on OS inside container some things may be differ: for Debian and Ubuntu, install fuseiso and fuse-utils packages (available in repository) for RHEL/CentOS 3/4/5, use DAG's packages fuse-iso and fuse
For example for Debian 8 it's also necessary to run the next command inside container before install fuse:
mknod /dev/fuse c 10 229
It may not work if run on the node using vzctl exec in some cases. SO just keep in mind this.