Tag Archives: serial console

Accessing Physical Serial Port Via Openvz on Proxmox 1.9


Berikut adalah cara untuk mengakses physical Serial Port melalui openvz yang di install di Proxmox 1.9. Percobaan dilakukan dengan mendeteksi modem WAVECOM via guest(debian lenny) yang di install di proxmox.

1. Login ke Host dan assign ke guest yang akan mengakses serial Console.

proxmox:/etc/vz/conf# vzctl set 107 –devnodes ttyS0:rw –save

“107 adalah VMID dari guest (debianlenny)”

proxmox:/var/lib/vz/images/107# apt-get install wvdial

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libuniconf4.4 libwvstreams4.4-base libwvstreams4.4-extras libxplc0.3.13 ppp
The following NEW packages will be installed:
libuniconf4.4 libwvstreams4.4-base libwvstreams4.4-extras libxplc0.3.13 ppp
wvdial
0 upgraded, 6 newly installed, 0 to remove and 7 not upgraded.
Need to get 1874kB of archives.
After this operation, 4604kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.debian.org lenny/main libxplc0.3.13 0.3.13-1 [40.5kB]
Get:2 http://ftp.debian.org lenny/main libwvstreams4.4-base 4.4.1-1.1 [419kB]
Get:3 http://ftp.debian.org lenny/main libwvstreams4.4-extras 4.4.1-1.1 [608kB]
Get:4 http://ftp.debian.org lenny/main libuniconf4.4 4.4.1-1.1 [333kB]
Get:5 http://ftp.debian.org lenny/main ppp 2.4.4rel-10.1 [364kB]
Get:6 http://ftp.debian.org lenny/main wvdial 1.60.1+nmu2 [109kB]
Fetched 1874kB in 8s (228kB/s)
Preconfiguring packages …
Selecting previously deselected package libxplc0.3.13.
(Reading database … 28495 files and directories currently installed.)
Unpacking libxplc0.3.13 (from …/libxplc0.3.13_0.3.13-1_amd64.deb) …
Selecting previously deselected package libwvstreams4.4-base.
Unpacking libwvstreams4.4-base (from …/libwvstreams4.4-base_4.4.1-1.1_amd64.deb) …
Selecting previously deselected package libwvstreams4.4-extras.
Unpacking libwvstreams4.4-extras (from …/libwvstreams4.4-extras_4.4.1-1.1_amd64.deb) …
Selecting previously deselected package libuniconf4.4.
Unpacking libuniconf4.4 (from …/libuniconf4.4_4.4.1-1.1_amd64.deb) …
Selecting previously deselected package ppp.
Unpacking ppp (from …/ppp_2.4.4rel-10.1_amd64.deb) …
Removing any system startup links for /etc/init.d/ppp …
Selecting previously deselected package wvdial.
Unpacking wvdial (from …/wvdial_1.60.1+nmu2_amd64.deb) …
Processing triggers for man-db …
Setting up libxplc0.3.13 (0.3.13-1) …
Setting up libwvstreams4.4-base (4.4.1-1.1) …
Setting up libwvstreams4.4-extras (4.4.1-1.1) …
Setting up libuniconf4.4 (4.4.1-1.1) …
Setting up ppp (2.4.4rel-10.1) …
Setting up wvdial (1.60.1+nmu2) …

Success! You can run “wvdial” to connect to the internet.
(You can also change your configuration by editing /etc/wvdial.conf)

proxmox:/var/lib/vz/images/107# wvdialconf /etc/wvdial.conf
Editing `/etc/wvdial.conf’.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 — OK
ttyS0<*1>: ATQ0 V1 E1 Z — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyS0<*1>: Modem Identifier: ATI — WAVECOM MODEM
ttyS0<*1>: Speed 4800: AT — OK
ttyS0<*1>: Speed 9600: AT — OK
ttyS0<*1>: Speed 19200: AT — OK
ttyS0<*1>: Speed 38400: AT — OK
ttyS0<*1>: Speed 57600: AT — OK
ttyS0<*1>: Speed 115200: AT — OK
ttyS0<*1>: Max speed is 115200; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
Modem Port Scan<*1>: S2 S3

Found a modem on /dev/ttyS0.
Modem configuration written to /etc/wvdial.conf.
ttyS0<Info>: Speed 115200; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”

debianfax:~# apt-get install wvdial
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libpcap0.8 libuniconf4.4 libwvstreams4.4-base libwvstreams4.4-extras libxplc0.3.13 ppp
The following NEW packages will be installed:
libpcap0.8 libuniconf4.4 libwvstreams4.4-base libwvstreams4.4-extras libxplc0.3.13 ppp wvdial
0 upgraded, 7 newly installed, 0 to remove and 35 not upgraded.
Need to get 1927kB of archives.
After this operation, 4325kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libpcap0.8 libxplc0.3.13 libwvstreams4.4-base libwvstreams4.4-extras libuniconf4.4 ppp wvdial
Install these packages without verification [y/N]? y
Get:1 http://debian.indika.net.id lenny/main libpcap0.8 0.9.8-5 [94.4kB]
Get:2 http://debian.indika.net.id lenny/main libxplc0.3.13 0.3.13-1 [38.4kB]
Get:3 http://debian.indika.net.id lenny/main libwvstreams4.4-base 4.4.1-1.1 [417kB]
Get:4 http://debian.indika.net.id lenny/main libwvstreams4.4-extras 4.4.1-1.1 [602kB]
Get:5 http://debian.indika.net.id lenny/main libuniconf4.4 4.4.1-1.1 [331kB]
Get:6 http://debian.indika.net.id lenny/main ppp 2.4.4rel-10.1 [337kB]
Get:7 http://debian.indika.net.id lenny/main wvdial 1.60.1+nmu2 [108kB]
Fetched 1927kB in 1s (1226kB/s)
Preconfiguring packages …
Selecting previously deselected package libpcap0.8.
(Reading database … 27225 files and directories currently installed.)
Unpacking libpcap0.8 (from …/libpcap0.8_0.9.8-5_i386.deb) …
Selecting previously deselected package libxplc0.3.13.
Unpacking libxplc0.3.13 (from …/libxplc0.3.13_0.3.13-1_i386.deb) …
Selecting previously deselected package libwvstreams4.4-base.
Unpacking libwvstreams4.4-base (from …/libwvstreams4.4-base_4.4.1-1.1_i386.deb) …
Selecting previously deselected package libwvstreams4.4-extras.
Unpacking libwvstreams4.4-extras (from …/libwvstreams4.4-extras_4.4.1-1.1_i386.deb) …
Selecting previously deselected package libuniconf4.4.
Unpacking libuniconf4.4 (from …/libuniconf4.4_4.4.1-1.1_i386.deb) …
Selecting previously deselected package ppp.
Unpacking ppp (from …/ppp_2.4.4rel-10.1_i386.deb) …
Removing any system startup links for /etc/init.d/ppp …
Selecting previously deselected package wvdial.
Unpacking wvdial (from …/wvdial_1.60.1+nmu2_i386.deb) …
Processing triggers for man-db …
Setting up libpcap0.8 (0.9.8-5) …
Setting up libxplc0.3.13 (0.3.13-1) …
Setting up libwvstreams4.4-base (4.4.1-1.1) …
Setting up libwvstreams4.4-extras (4.4.1-1.1) …
Setting up libuniconf4.4 (4.4.1-1.1) …
Setting up ppp (2.4.4rel-10.1) …
Setting up wvdial (1.60.1+nmu2) …

Success! You can run “wvdial” to connect to the internet.
(You can also change your configuration by editing /etc/wvdial.conf)

GUEST (DEBIANLENNY)

debianfax:~#

debianfax:~# wvdialconf
Editing `/etc/wvdial.conf’.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 — OK
ttyS0<*1>: ATQ0 V1 E1 Z — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyS0<*1>: Modem Identifier: ATI — WAVECOM MODEM
ttyS0<*1>: Speed 4800: AT — OK
ttyS0<*1>: Speed 9600: AT — OK
ttyS0<*1>: Speed 19200: AT — OK
ttyS0<*1>: Speed 38400: AT — OK
ttyS0<*1>: Speed 57600: AT — OK
ttyS0<*1>: Speed 115200: AT — OK
ttyS0<*1>: Max speed is 115200; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK

Found a modem on /dev/ttyS0.
Modem configuration written to /etc/wvdial.conf.
ttyS0<Info>: Speed 115200; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0″

Atau langsung bisa jg dengan mengedit file konfigurasi si guest dalam case ini container 107.

proxmox:/etc/vz/conf# vim /etc/vz/conf/107.conf

Pada baris paling bawah tambahkan parameter:

DEVNODES=”ttyS0:rw ”

Terimakasih

Advertisements
shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: