Attach cdrom to OpenVZ

dad311

Member
Jul 20, 2009
41
1
6
Is it possible to attach the HN cdrom or DVD to a OpenVZ CT? If so can some explain the best way and how?

My cdrom on the HN is located at /dev/sr0

Ive tried vzctl set 107 --devnodes sr0:rw, but vzctl tells me the 107 container is not running and values will not be saved. And yes CT 107 is running Im typing on it now.


Thanks.
 
Last edited:
Hey buddy !

will this help

cd /var/lib/vz/template/iso
wget http://www.myurl.com/myiso.iso Then we mount the file on promox
mount -t iso9660 -o loop /var/lib/vz/template/iso/myiso.iso /mnt/pbxiaf
Now we copy the folder to the vm, make sure you put in the correct VID for your container.
cp -R /mnt/pbxiaf /var/lib/vz/private/$VID/usr/src
Now the files you need should be in /usr/src on the guest.
To Unmount and remove use
umount -d /mnt/pbxiaf
rm -rf /mnt/pbxiaf
thats it

I used it to build pbxiaf silver

also i spied this

If you just want to mount additional things inside of your VE, as long as they are already accessible from the hardware node, you can just use:
mount --bind {hn mountoint} /vz/root/{VEID}/desired/mount/point

You can do this within multiple VPSes too. --bind mounting works in non-OpenVZ enviroment too.

Please note that the /vz/root/{VEID} is empty when your VPS isn't running so you have to do your bind mount at some point after the VPS has started up and the /vz/root{VEID} area is alive.

linky
http://forum.openvz.org/index.php?t=msg&goto=39808&

Hope it helps

Col
 
Last edited: