[Users] How to mount devpts?

Jun OKAJIMA okajima at digitalinfra.co.jp
Fri Oct 24 19:24:40 EDT 2008


Thanks!

What I am trying is,
in short,  A CD bootable OpenVZ with Ubuntu.
So, using precreated template is not a solution for me.

Same concept ISO image with KNOPPIX has been released
from SW Soft, and I am working on same one with Ubuntu.

And, I want not to change ISO as far as possible,
because people want to run that famous and familiar OS on VE,
not special customized minor OS.
To achive this, I need to mount loop-backed ISO image
on /var/lib/vz/private/101/.

Stopping udev and it will work? Thanks. thanks!.
I will try it.

              --- Okajima, Jun. Tokyo, Japan.


2008/10/25 Scott Dowdle <dowdle at montanalinux.org>:
> Jun,
>
> [top posting]
>
> Ummm, that isn't supposed to work.  You can't just mount an iso image into a container's / directory (aka private directory) and expect to be able to run that as a container.  You need to use an OS Template... which is a stripped down install of the distro that has been modified to run inside of a container.
>
> If you want to migrate a physical machine to a container there is a wiki article on the subject here:
>
> http://wiki.openvz.org/Physical_to_container
>
> If you are wanting to create an OS Template for Ubuntu from scratch, you can find a wiki article on that subject here:
>
> http://wiki.openvz.org/Ubuntu_Hardy_template_creation
>
> If you just want an OS Template for Ubuntu, you can find them for download in the official and the contrib OS Template directories:
>
> http://download.openvz.org/template/precreated/
> http://download.openvz.org/template/precreated/contrib/
>
> I have seen some of the templates for download have problems because they started up udev... so if you run into that problem, just keep udev from starting and it goes away.
>
> If you want a fancy / easy way to build an OS Template for Ubuntu, check out vzpkg2 and pkg-cacher.  You can find info on those in the archive of this mailing list from last month.
>
>
> ----- "Jun OKAJIMA" <okajima at digitalinfra.co.jp> wrote:
>> I tried to use Ubuntu ISO image as VE,
>> and failed.
>>
>> What I did is below.
>> In short, mounting devpty on host (hardware node) side FS
>> is okay, but VE side FS is not okay.
>>
>> Any help?
>>
>>           --- Okajima, Jun. Tokyo, Japan.
>>               http://www.digitalinfra.co.jp/
>>               http://www.machboot.com/
>>               http://www.colinux.org/
>>
>>
>>
>> 1. Install Ubuntu 8.04 hardy to VMware.
>> 2. Install OpenVZ kernel and vzctl and vzquota from apt-line.
>> 3. Reboot with OpenVZ kernel.
>> and I did like this.
>> First, insert Hardy ISO image to VMware virtual CD-ROM drive.
>> [HN]# vzctl set 777
>> [HN]# mount -t squashfs -o loop,ro /media/cdrom01 \
>>       /var/lib/private/777
>> [HN]# vzctl start 777
>>       -> OK.
>> [HN]# vzctl enter 777
>>       -> Fail. 777 does not have devpty.
>> "Unable to open pty: No such file or directory"
>> [HN]# vzctl exec 777 mount -v -t devpts none /dev/pts
>>       -> Fail.
>>      "mount: none already mounted or /dev/pts busy"
>> [HN]# vzctl exec 777 ls -la /dev/pty
>>       -> Nothing there.
>> [HN]# vzctl exec 777 mount -v -t devpty none /mnt
>>       -> also fails. The problem occurs on all dirs.
>> [HN]# grep devpty /proc/filesystems
>>       -> Okay.
>> [HN]# cat /proc/mounts | grep devpty
>>       -> Okay.
>> [HN]# ls -la /dev/devpty (checking host FS)
>>       -> Okay.
>> [HN]# mkdir /tmp/devpty_test
>> [HN]# mount -t devpty none /tmp/devpty_test
>> [HN]# ls -la /tmp/devpty_test
>>       -> Okay.
>>          On the host system, devpts works well.
>> _______________________________________________
>> Users mailing list
>> Users at openvz.org
>> https://openvz.org/mailman/listinfo/users
>
> --
> Scott Dowdle
> 704 Church Street
> Belgrade, MT 59714
> (406)388-0827 [home]
> (406)994-3931 [work]
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://openvz.org/mailman/listinfo/users
>


More information about the Users mailing list