開発機の作成(仮想PC編)

Debianインストール時は、VirtualBoxのネットワークはNATがよいです。

CD/DVD-ROM に debian-500-i386-netinst.iso をマウントする

rootでログイン

export LANG=c

aptitude update

aptitude install telnet telnetd

/etc/network/interfaces を編集

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.100.205
        netmask 255.255.255.0
        network 192.168.100.0
        broadcast 192.168.100.255
        gateway 192.168.100.210
        dns-nameservers 192.168.100.210

/etc/resolv.conf を編集
Windowsのコマンドプロンプトを起動して

ipconfig /all

を実行します。

       ...
       IP Address. . . . . . . . . . . . : 172.16.1.11
       Subnet Mask . . . . . . . . . . . : 255.255.0.0
       Default Gateway . . . . . . . . . : 172.16.0.1
       DHCP Server . . . . . . . . . . . : 172.16.0.1
       DNS Servers . . . . . . . . . . . : 172.16.0.1
                                           172.16.0.10
                                           202.234.56.78
       ...

表示された項目から「DNS Server」の項目を見つけておきます。
仮想PCのLinux側のresolv.confを編集します。

vi /etc/resolv.conf

↓resolv.conf

nameserver 172.16.0.1
nameserver 172.16.0.10
nameserver 202.234.56.78

先ほど調べたDNS serverの情報の中から最低でも1つを登録します。

一旦仮想PCの電源を切ります。

ホスト ネットワーク アダプタ のインストール
仮想NIC (VirtualBox TAP Adapter)を新規に追加します。

ネットワークをホストインターフェースTAPに

CD/DVD-ROM に VBoxGuestAdditions_2.1.4.iso をマウントする

仮想PCの起動

mount /dev/hdc /mnt -t iso9660
cd /mnt
mount vboxsf /home/kaihatsu/projects -t vbox
projects  /home/kaihatsu/projects vboxsf 0 2

CDをリマウントして再起動

Windows の telnet ソフト(TeraTermなど)からログイン

仮想PCを活用するへ戻る

Last-modified: 2009-05-29 (金) 18:19:49 (5436d)