lost and found ( for me ? )

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Windows SSH Client: MTPutty (Multi-Tabbed PuTTY)

You can open multiple ssh terminals in one tabbed GUI with MTPutty as below.

very useful.

SNMP MIB browser for Windows : Unbrowse SNMP

about Unbrowse SNMP
http://www.unleashnetworks.com/products/unbrowse-snmp.html

The installation is very easy.
download setup_unbrowse_R_1_6_0_1328.msi and just click it.
I’ve installed it on Windows 7 32bit ver.





when compiling private MIBs
File -> Add MIBs



How to use vmnetcfg on VMware player 3.1 WIndows ver.

By default , vmnetcfg will not be installed on vmware player 3.x.
However vmnetcfg exists in an installer file ( exe file ).
So you can use vmnetcfg on vmwre player 3.x by extracting it from installer file.

I’ve already installed vmware player 3.1 w/o vmnetcfg.
The following is how to add vmnetcfg.

1.

open a command prompt and move to the directory where vmware installer exists.
type the following command.
>C:\vmware_player\VMware-player-3.1.4-385536.exe /e .\netcfg


2.

netcft directory will be created in the same directory where an installer file exists.


3.

open network.cab file which is in netfcfg directory.
you will find vmnetcfg.exe.


4.

copy vmnetcfg.exe file to the direcotry where you have installed vmwre player.
In my case , move vmnetcfg.exe to “C:\Program Files (x86)\VMware\VMware Player” directory.


5.

click vmnetcfg.exe.
you can use virtual network editor.


KVM : how to install WIndows 2008 R2 with virtIO disk and ethernet.

Win2008 R2のVM作成時に virtio のドライバを読み込ませて、virtio デバイス上にインストールする方法

root@hat1:~# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 10.10"

root@hat1:~# uname -r
2.6.35-24-server

root@hat1:~# kvm -version
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard


[ 手順 ]

1.virtioドライバを準備
2.virt-managerでWin2008用のVMの箱(?)を準備
3.virt-mangaerで 2.で追加した NIC , Disk を削除
4. virt-managerで新規に virtio NIC , Disk を作成
5. virt-managerでフロッピーデバイスを追加。Win2008インストール中にvirtio driverをインストールするため
6. Win2008 をインストール
7. インストール後、Win2008のデバイスマネージャで Disk , NIC が virtiio になっていることを確認する。



・virtio とは?

ざっくりいうと、準仮想デバイス。完全仮想化によるI/Oのオーバヘッドを軽くする。
VMware の VMware Tools と同等。詳しい違いはわからぬので、グーグル先生に訪ねてみてください。



[ let’s try step by step ]



1. virtio ドライバをダウンロード

とりあえず、iso と vfd ダウンロード
root@hat1:~# wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.11-0.iso

root@hat1:~# wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.11-0.vfd


-- メモ: 今回は下記をやる必要なし 

Win 2008 , Vista , 7 の 64bit版はデバイスドライバにデジタル署名が必要。
デジタル署名されてい場合をインストールする場合、 起動時に F8 ->  “ドライバ署名の強制を無効にする”を選択し起動する。
# VM起動したら、F8を押しっぱ、っていう感じ






今回、ダウンロードした virtio drivers は署名されているって書いてあるので、たぶん上記の”ドライバー署名の強制を無効にする”はやらなくて大丈夫なはず。

Binary Drivers

Binary drivers are provided by some Linux distributions including WHQL Certified drivers.
For Windows 7 and Windows Server 2008 drivers need to be signed by the packager.
In addition these platforms require WHQL certified and signed drivers.
http://msdn.microsoft.com/en-us/library/ff547565.aspx
http://msdn.microsoft.com/en-us/library/ff547534%28VS.85%29.aspx
If your distribution does not provide binary drivers the Fedora Project package can be downloaded from the following link.
Download Latest VirtIO Win drivers from Fedora
Note: These drivers are signed but not WHQL Certified


--メモ  ここまで



isoとvfd のvirtioドライバをダウンロードしたけどvdfだけでよかったかも。
vfdはフロッピーイメージ(表現正しい?)
root@hat1:~# file virtio-win-1.1.11-0.vfd
virtio-win-1.1.11-0.vfd: DOS floppy 1440k, x86 hard disk boot sector


2.virt-managerでWin2008用のVMの箱(?)を準備



まずは virt-manager で win 2008 R2用の VM を作成。このときのDisk , NIC は virtio ではない。



3.virt-mangaerで 2.で追加した NIC , Disk を削除



virt-manager でDiskとNIC を削除 ( Disk と NIC がない )



4. virt-managerで新規に virtio NIC , Disk を作成



新規にDiskとNICを作成。virtio で作成する

Disk追加 ( Virtio Disk )NIC追加 ( virtio )






5. virt-managerでフロッピーデバイスを追加
 ( Win2008インストール中にvirtio driverをインストールするため )



あとは、virtio driver をインストール用のフロッピ or CD-ROM を作成。
フロッピードライブを作成。参照先は virtioドライバ ( vfd ) を指定。



Boot options は CD-ROM ( win2008R2のISO)を最初に読み込むようにする。



上記を実施した後の xml ファイル。
root@hat1:~# virsh dumpxml win2008-R2-1

root@hat1:~# virsh dumpxml win2008-R2-1
<domain type='kvm'>
  <name>win2008-R2-1</name>
  <uuid>8484661a-d1c4-8496-7ece-3d4454348dc2</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.12'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <boot dev='fd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/media/disk1/KVM_images/ja_windows_server_2008_r2_standard_enterprise_datacenter_and_web_x64_dvd_x15-59766.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/win2008-R2-1.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw'/>
      <source file='/media/disk1/KVM_images/virtio-win-1.1.11-0.vfd'/>
      <target dev='fda' bus='fdc'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='fdc' index='0'/>
    <interface type='bridge'>
      <mac address='52:54:00:48:05:e3'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='vga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>


6. Win2008 をインストール



では、Win 2008 R2 をインストール。

インストールするデバイスが見つからず、ドライバのインストール画面が表示されるので、フロッピー →
Win2008 フォルダ → OK



VirtIO Ethernet と SCSI を選択してインストール


どうでしょうか。。。。



おー、ディスク( virtio ) 認識した。




あとはサクサクインストール。



7. インストール後、Win2008のデバイスマネージャで Disk , NIC が virtiio になっていることを確認する。



インストール後のデバイスマネージャ
Disk , NIC が VirtIO になっている




get things done!

Windows 2000 server ファイル アクセスログ記録

Windows 2000 server ファイル アクセスログ記録 ( いまごろ、win 2000 server ... )

ファイル名を指定して実行 -> mmc
コンソール -> スナップインの追加と削除 -> 追加 -> グループポリシー
グループポリシーオブジェクトはローカルコンピュータ -> 完了
コンソールルート -> ローカルコンピュータポリシー -> セキュリティの設定 -> ローカルポリシー -> 監査ポリシー


オブジェクト アクセスの監視 をダブルクリック

成功、失敗のチェックボックスを on にする。



開始するフォルダの設定

監視したいフォルダのプロパティ -> セキュリティ -> 詳細設定 -> 監査
監査対象のユーザ、グループを入力
関西したい項目をチェック -> OK



OKを押して完了。

イベントビューア -> セキュリティ ログにログが記録される。

KVM: Windows用 パラバーチャル ネットワーク ドライバ

Windows VM 用の paravirtual network ドライバのインストール方法

[root@arizona ~]# cat /etc/fedora-release
Fedora release 11 (Leonidas)

[root@arizona ~]# rpm -qa | grep qemu
qemu-img-0.10.6-9.fc11.x86_64
qemu-common-0.10.6-9.fc11.x86_64
qemu-kvm-0.10.6-9.fc11.x86_64
qemu-system-x86-0.10.6-9.fc11.x86_64

インストール前



- ドライバをダウンロード。

http://www.linux-kvm.com/ -> Windows paravirtual drivers -> Network ISO

[root@arizona ~]# file /var/lib/libvirt/images/NETKVM-20081229.iso
/var/lib/libvirt/images/NETKVM-20081229.iso: ISO 9660 CD-ROM filesystem data 'CDROM

- Windows XP を virtio option で起動。

-net nic,model=virtio オプションを指定。

[root@arizona ~]# qemu-kvm -m 512 -smp 1 -net nic,model=virtio -net tap,vlan=0 -boot c -drive file=/var/lib/libvirt/images/winxp-vm.img,if=ide,index=0,boot=on -drive file=/var/lib/libvirt/images/NETKVM-20081229.iso,if=ide,media=cdrom,index=2

VM起動後にインストーラが自動が走る。


マウントした、iso から、xp 用の paravirtual driver を指定する。


インストール完了。
ドライバが Qumranet ParaVirtualized Ethernet Adapter になる。


仮想マシンマネージャ(GUI) で virtio 指定できるみたい。。

Add Hardware -> Network のデバイスモデルに virtio があった。


仮想マシンマネージャを使って、 VM を paravirtual ドライバで起動したときのオプションはこんな感じ。

[root@arizona ~]# ps aux | grep kvm
root 5451 23.5 13.4 967832 541376 ? Sl 11:18 1:57 /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name winxp-vm -uuid 3870f9f5-0025-4a83-37de-45f8a6b6f4b5 -monitor pty -pidfile /var/run/libvirt/qemu//winxp-vm.pid -localtime -boot c -drive file=/var/lib/libvirt/images/winxp-vm.img,if=ide,index=0,boot=on -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=54:52:00:3f:eb:58,vlan=0,model=virtio -net tap,fd=17,vlan=0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -soundhw es1370

windows : torrent クライアント

μ torrent 結構いいかも。

iso をダウンロードするときに使用しています。
複数コネクション張るので、メインページでhttpでダウンロードするより,はるかに早い。


マルチブート winxp , centOS , fedora : grubの設定

grub: how to create multiple-boot an environment of WinXP , CentOS 5.3 n' Fedora 11

/dev/sda というディスクがあり、このディスクに winxp , centos , fedora のマルチブート環境を作る場合のOSのインストールの順番、grub の設定について。

[インストールの順番]

1. winxp
2, centOS 5.3
3, fedora 11

fedora の grub から、winxp , centOS , fefora を起動することになる。

winxp を最初にインストールするのは、winxp インストール時に /dev/sda にブートローダを
インストールし、grub が上書きされてしまうため。

centOS を Fedora より最初にインストールするのは、centOS の grub が Fedora を起動できないみたい。どうも、grub のバージョンが古いからみたい。

fedora -> centOS という順番でインストールし、centOS の grub で fedora を起動しようとすると、下記のエラーが出た。

Error 2
: Bad file or directory type

ext3 で、特に bad file or directory type でもないんだけど、こんなエラーになる。

[ grub のバージョン ]

- centOS の grub

[root@arizona ~]# cat /etc/redhat-release
CentOS release 5.3 (Final)

[root@arizona ~]# grub --version
grub (GNU GRUB 0.97)

[root@arizona ~]# rpm -qa | grep grub
grub-0.97-13.2

- fedora の grub

[root@arizona ~]# cat /etc/redhat-release
Fedora release 11 (Leonidas)

[root@arizona ~]# grub --version
grub (GNU GRUB 0.97)

[root@arizona ~]# rpm -qa | grep grub
grubby-6.0.87-4.fc11.x86_64
grub-0.97-51.fc11.x86_64


[ centOS , fedora インストール時の grub のインストール先について ]

centOS , fedora インストール時に /dev/sda を選択する。

centOS をインストールした後は、centOS の grub になり、
fedora をインストールした後は、centOS の grub が上書きされ、fedora の grub となる。

[ 例 ]

/dev/sda1 に winxp
/dev/sda3 に fedora
/dev/sda4 に centOS

をインストールした例

winxp -> centOS -> fedora という順番でインストールする。

[root@arizona ~]# fdisk /dev/sda -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes

デバイス Boot Start End Blocks Id System
/dev/sda1 1 10199 81920128+ 7 HPFS/NTFS <- winxp
Partition 1 does not end on cylinder boundary.
/dev/sda2 10199 10263 512000 83 Linux
/dev/sda3 * 10263 35759 204800000 83 Linux <- fedora
/dev/sda4 35760 38913 25334505 5 拡張領域
/dev/sda5 35760 35886 1020096 83 Linux <- centOS

centOS インストール後の centOS の grub.conf

[root@arizona ~]# cat /etc/grub.conf ( CentOS )
default=2
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz <- hd0,4 = /dev/sda4 = centOS の grub.conf
hiddenmenu
title CentOS (2.6.18-164.el5xen)
root (hd0,4)
kernel /xen.gz-2.6.18-164.el5
module /vmlinuz-2.6.18-164.el5xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.18-164.el5xen.img
title CentOS (2.6.18-164.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-164.el5.img
title WinXP
rootnoverify (hd0,0)
chainloader +1


Fefora 11 インストール後、CentOS が起動できるように、fedoraの grub.conf に centOS を追加する。
centOS の grub.conf の内容を fedora の grub.conf にそのままコピペすればOK!

fedora の grub.conf

[root@arizona ~]# cat /etc/grub.conf ( Fedora )
default=1
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz <- hd0,2 = /dev/sda3 = fedora の grub.conf
hiddenmenu
title Fedora (2.6.30.8-64.fc11.x86_64)
root (hd0,2) <- /dev/sda3
kernel /boot/vmlinuz-2.6.30.8-64.fc11.x86_64 ro root=UUID=5064c72a-c4f4-4396-acd4-d43c29d67368 rhgb quiet
initrd /boot/initrd-2.6.30.8-64.fc11.x86_64.img
title WinXP
rootnoverify (hd0,0) <- /dev/sda1
chainloader +1
title CentOS (2.6.18-164.el5xen) <- 追加
root (hd0,4) <- /dev/sda5
kernel /xen.gz-2.6.18-164.el5
module /vmlinuz-2.6.18-164.el5xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.18-164.el5xen.img
title CentOS (2.6.18-164.el5) <- 追加
root (hd0,4) <- /dev/sda5
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-164.el5.img

これで、すべてのOS を起動できるようになる。
centOSのカーネルをアップグレードした場合は、fedora の grub.conf に追加する必要がある。

hope this helps :D

VMware Server on Windows XP

Host: Win XP Pro
Guest: Cent OS 4.7

X , Gnome のインストール方法

VMware上に CentOSをインストールし(X , Gnome はなし) 、その後、vnc で接続したく
なったので。

# cat /etc/redhat-release
CentOS release 4.7 (Final)

# yum groupinstall "X Window System" "GNOME Desktop Environment" -y

インストール後、startx で確認。

# startx

問題なく起動すればこれで終了。

ランレベルを CLI から GUI に変える方法。

/etc/inittab の

id:3:initdefault: 



id:5:initdefault: 

にかえる。

vnc で gnome を起動する方法。

vnc は /root/.vnc/xstartup を読み込むので、シンボリックリンクを
はって、xinitrc を読み込ませるようにする。

vnc が startx 起動時のスクリプト ( xinitrc ) を読み込むように
シンボリックリンクをはっている。

# cd /root/.vnc/
# mv xstartup org.xstartup
# ln -s /etc/X11/xinit/xinitrc xstartup

# vncserver

UltraVNC Viewer で接続したときの画面。