OVH Community, your new community space.

vzctl - tworzenie VPS z poziomu użytkownika


desavil
10-03-2012, 16:38
Dzięki. Macie jeszcze jakieś propozycje?
Bo z tym coś mi nie wychodzi.

@edit
Rozwiązałem to za pomocą sudo i pliku /etc/sudoers

no4b
10-03-2012, 15:59
http://libvirt.org/

desavil
10-03-2012, 15:08
Wiecie może jak stworzyć serwer VPS na wizualizacji OpenVZ z poziomu dodanego do systemu użytkownika, nie roota?

Próbowałem i wyskakuje takie coś:
Kod:
user@serwer:~$ /usr/sbin/vzctl create 2 --ostemplate debian-6.0-x86_64
Creating container private area (debian-6.0-x86_64)
vzquota : (error) Quota getstat syscall for id 2: Operation not permitted
vzquota init failed [3]
vzquota : (error) Can't open quota file for id 2, maybe you need to reinitialize quota: No such file or directory
vzquota : (error) Quota getstat syscall for id 2: Operation not permitted
vzquota init failed [3]
vzquota on failed [61]
tar: ./dev/mixer1: Cannot mknod: Operation not permitted
tar: ./dev/ram6: Cannot mknod: Operation not permitted
tar: ./dev/ttyp0: Cannot mknod: Operation not permitted
tar: ./dev/ptyp7: Cannot mknod: Operation not permitted
tar: ./dev/kmem: Cannot mknod: Operation not permitted
tar: ./dev/null: Cannot mknod: Operation not permitted
tar: ./dev/ttypf: Cannot mknod: Operation not permitted
tar: ./dev/audioctl: Cannot mknod: Operation not permitted
tar: ./dev/ptyp1: Cannot mknod: Operation not permitted
tar: ./dev/ptmx: Cannot mknod: Operation not permitted
tar: ./dev/smpte2: Cannot mknod: Operation not permitted
tar: ./dev/tty9: Cannot mknod: Operation not permitted
tar: ./dev/ram11: Cannot mknod: Operation not permitted
tar: ./dev/dsp1: Cannot mknod: Operation not permitted
tar: ./dev/mixer3: Cannot mknod: Operation not permitted
tar: ./dev/mpu401stat: Cannot mknod: Operation not permitted
tar: ./dev/tty4: Cannot mknod: Operation not permitted
tar: ./dev/ttyp3: Cannot mknod: Operation not permitted
tar: ./dev/tty2: Cannot mknod: Operation not permitted
tar: ./dev/midi0: Cannot mknod: Operation not permitted
tar: ./dev/full: Cannot mknod: Operation not permitted
tar: ./dev/ram12: Cannot mknod: Operation not permitted
tar: ./dev/ttypa: Cannot mknod: Operation not permitted
tar: ./dev/ram0: Cannot mknod: Operation not permitted
tar: ./dev/midi02: Cannot mknod: Operation not permitted
tar: ./dev/urandom: Cannot mknod: Operation not permitted
tar: ./dev/zero: Cannot mknod: Operation not permitted
tar: ./dev/midi01: Cannot mknod: Operation not permitted
tar: ./dev/dsp: Cannot mknod: Operation not permitted
tar: ./dev/rmidi0: Cannot mknod: Operation not permitted
tar: ./dev/sndstat: Cannot mknod: Operation not permitted
tar: ./dev/ttyp7: Cannot mknod: Operation not permitted
tar: ./dev/ptyp5: Cannot mknod: Operation not permitted
tar: ./dev/agpgart: Cannot mknod: Operation not permitted
tar: ./dev/loop6: Cannot mknod: Operation not permitted
tar: ./dev/ttyp8: Cannot mknod: Operation not permitted
tar: ./dev/loop3: Cannot mknod: Operation not permitted
tar: ./dev/ram16: Cannot mknod: Operation not permitted
tar: ./dev/ptyp0: Cannot mknod: Operation not permitted
tar: ./dev/dsp3: Cannot mknod: Operation not permitted
tar: ./dev/ram13: Cannot mknod: Operation not permitted
tar: ./dev/smpte3: Cannot mknod: Operation not permitted
tar: ./dev/tty8: Cannot mknod: Operation not permitted
tar: ./dev/audio3: Cannot mknod: Operation not permitted
tar: ./dev/random: Cannot mknod: Operation not permitted
tar: ./dev/tty3: Cannot mknod: Operation not permitted
tar: ./dev/mpu401data: Cannot mknod: Operation not permitted
tar: ./dev/ram8: Cannot mknod: Operation not permitted
tar: ./dev/midi00: Cannot mknod: Operation not permitted
tar: ./dev/ttyp9: Cannot mknod: Operation not permitted
tar: ./dev/ttype: Cannot mknod: Operation not permitted
tar: ./dev/ptyp6: Cannot mknod: Operation not permitted
tar: ./dev/ram4: Cannot mknod: Operation not permitted
tar: ./dev/ptypd: Cannot mknod: Operation not permitted
tar: ./dev/ram10: Cannot mknod: Operation not permitted
tar: ./dev/audio2: Cannot mknod: Operation not permitted
tar: ./dev/ptyp2: Cannot mknod: Operation not permitted
tar: ./dev/midi3: Cannot mknod: Operation not permitted
tar: ./dev/mixer: Cannot mknod: Operation not permitted
tar: ./dev/ptyp4: Cannot mknod: Operation not permitted
tar: ./dev/tty6: Cannot mknod: Operation not permitted
tar: ./dev/ptyp9: Cannot mknod: Operation not permitted
tar: ./dev/ptypb: Cannot mknod: Operation not permitted
tar: ./dev/rmidi3: Cannot mknod: Operation not permitted
tar: ./dev/ttyp1: Cannot mknod: Operation not permitted
tar: ./dev/ram1: Cannot mknod: Operation not permitted
tar: ./dev/midi2: Cannot mknod: Operation not permitted
tar: ./dev/tty5: Cannot mknod: Operation not permitted
tar: ./dev/ttypc: Cannot mknod: Operation not permitted
tar: ./dev/mem: Cannot mknod: Operation not permitted
tar: ./dev/tty7: Cannot mknod: Operation not permitted
tar: ./dev/ptyp8: Cannot mknod: Operation not permitted
tar: ./dev/tty0: Cannot mknod: Operation not permitted
tar: ./dev/smpte0: Cannot mknod: Operation not permitted
tar: ./dev/ttyp5: Cannot mknod: Operation not permitted
tar: ./dev/ram9: Cannot mknod: Operation not permitted
tar: ./dev/loop0: Cannot mknod: Operation not permitted
tar: ./dev/ptypf: Cannot mknod: Operation not permitted
tar: ./dev/dsp2: Cannot mknod: Operation not permitted
tar: ./dev/ram15: Cannot mknod: Operation not permitted
tar: ./dev/loop2: Cannot mknod: Operation not permitted
tar: ./dev/ttyp6: Cannot mknod: Operation not permitted
tar: ./dev/ptypa: Cannot mknod: Operation not permitted
tar: ./dev/ttypd: Cannot mknod: Operation not permitted
tar: ./dev/rmidi1: Cannot mknod: Operation not permitted
tar: ./dev/audio1: Cannot mknod: Operation not permitted
tar: ./dev/ram5: Cannot mknod: Operation not permitted
tar: ./dev/ttyp4: Cannot mknod: Operation not permitted
tar: ./dev/loop5: Cannot mknod: Operation not permitted
tar: ./dev/tty: Cannot mknod: Operation not permitted
tar: ./dev/audio: Cannot mknod: Operation not permitted
tar: ./dev/loop7: Cannot mknod: Operation not permitted
tar: ./dev/ptyp3: Cannot mknod: Operation not permitted
tar: ./dev/console: Cannot mknod: Operation not permitted
tar: ./dev/ram14: Cannot mknod: Operation not permitted
tar: ./dev/ttyp2: Cannot mknod: Operation not permitted
tar: ./dev/midi03: Cannot mknod: Operation not permitted
tar: ./dev/ptype: Cannot mknod: Operation not permitted
tar: ./dev/ptypc: Cannot mknod: Operation not permitted
tar: ./dev/ram7: Cannot mknod: Operation not permitted
tar: ./dev/port: Cannot mknod: Operation not permitted
tar: ./dev/midi1: Cannot mknod: Operation not permitted
tar: ./dev/loop4: Cannot mknod: Operation not permitted
tar: ./dev/tty1: Cannot mknod: Operation not permitted
tar: ./dev/rmidi2: Cannot mknod: Operation not permitted
tar: ./dev/ram2: Cannot mknod: Operation not permitted
tar: ./dev/loop1: Cannot mknod: Operation not permitted
tar: ./dev/ram3: Cannot mknod: Operation not permitted
tar: ./dev/ttypb: Cannot mknod: Operation not permitted
tar: ./dev/smpte1: Cannot mknod: Operation not permitted
tar: ./dev/sequencer: Cannot mknod: Operation not permitted
tar: ./dev/mixer2: Cannot mknod: Operation not permitted
tar: Exiting with failure status due to previous errors
vps-create ERROR: Error in tar --numeric-owner -z -xf /home/vps/templates/cache/debian-6.0-x86_64.tar.gz
vzquota : (error) Can't open quota file for id 2, maybe you need to reinitialize quota: No such file or directory
vzquota off failed [11]
Creation of container private area failed
Nie mam już pomysłu jak mogę to zrobić w inny sposób. Potrzebuję tego ponieważ piszę panel do obsługi mojego VPSa z poziomu strony www (PHP) i wtedy bym sobie tworzył zarządzał itp. a tak to niemożna nic zrobić.

Myślałem, nad stworzeniem pliku w bash, który by tworzył maszynę, a z poziomu PHP bym go uruchamiał, tylko jak go uruchomię to znów będzie on tak samo uruchomiony jak z poziomu usera nie root'a.

Rozmyślam jeszcze nad użyciem ssh2_connect, no ale tutaj znów muszę podać hasło roota, co jest mega mega niebezpieczne. Chyba że użyję klucza?

Od razu mówię, nie piszcie mi tutaj informacji typu: użyj gotowego panelu, np. HyperVM, skorzystaj z proxmoxa, użyj crona, socketa, to jest niebezpieczne itp... Takie rozwiązania mnie nie interesują.

Pozdrawiam.