JosefJezek
5/12/2014 - 9:10 AM

OpenVZ

OpenVZ

OpenVZ

  • vzlist
  • vzctl

Mount

vzctl exec 102 mkdir /mnt/mymountpoint
mount --bind /mnt/mymountpoint /vz/root/102/mnt/mymountpoint
mount --bind /mnt/mymountpoint /var/lib/vz/private/113/mnt/mymountpoint
  • on proxmox host
#!/bin/sh
if ! mountpoint -q /mnt/mymountpoint; then
  echo "Mount /mnt/mymountpoint"
  eval "mount.cifs //example.com/public /mnt/mymountpoint -o username=user,password=pass,domain=example,iocharset=utf8,file_mode=0777,dir_mode=0777 -v"
  umount /var/lib/vz/private/113/mnt/mymountpoint/
  mount --bind /mnt/mymountpoint /var/lib/vz/private/113/mnt/mymountpoint/
fi

Ubuntu

Update template

cd /var/lib/vz/template/cache
mkdir -p etc/init
vi etc/init/tty.conf

gunzip centos-6-standard_6.3-1_amd64.tar.gz
tar -rf centos-6-standard_6.3-1_amd64.tar etc
gzip centos-6-standard_6.3-1_amd64.tar

rm etc/init/tty.conf
rmdir -p etc/init