lost and found ( for me ? )

Showing posts with label ESX. Show all posts
Showing posts with label ESX. Show all posts

python : pysphere small timps

small tips

When connecting to a vCenter Server which has integrated with Windows Active Directory ,
Specify the user name as “<Domain name>\<user name>” notation like this.


# python
>>> from pysphere import VIServer
>>> server = VIServer()
>>> server.connect("vCetnter’s IP","Domain name\user","password")
>>> print server.get_server_type()
VMware vCenter Server
>>> server.disconnect()

How to install VMware tools on Windows 2008R2 server core

Win 2008 R2 server core を ESX にインストールしてみた。。
起動後、コマンドプロンプトしかないんだー。

VMWare tools のインストールめもめも~。

ログオン後はこんな感じ。






VMWare toolsのインストール

vSphere client -> インベントリ -> 仮想マシン -> VMware tools のインストール

VMware tools ディレクトリが CD-ROM ドライブにマウントされるので、CD-ROM ドライブに
移動。

コマンドプロンプト

D: <- CD-ROM ドライブに移動
D:\>setup.exe <- vmware tools のインストール

GUI が起動するので、インストール。

インストール中の画面。




リブート後、VMware tools がインストールされていることを確認。

vSphere client の サマリで確認

VMware tools OK となっていれば、インストールされていることを意味する。





Above n' beyond の OceanLab の Remix いいなー。

not fly ESX 4 within KVM...

できるかトライ。
結果は。。。 NG 。リブートくりかえすー。

vmdk を KVMのVMイメージに変換。

[root@arizona ~]# file Virtual\ Machine.vmdk
Virtual Machine.vmdk: VMware4 disk image

では、変換。

変換方法は下記を参照。

http://blog.bodhizazen.net/linux/convert-vmware-vmdk-to-kvm-qcow2-or-virtualbox-vdi/

[root@arizona ~]# qemu-img convert

Virtual\ Machine.vmdk -O qcow2 esx4-copy.img
[root@arizona ~]# echo $?
0
[root@arizona ~]#

一応、コマンドはエラーなく処理された。

[root@arizona ~]# file esx4-copy.img
esx4-copy.img: Qemu Image, Format: Qcow , Version: 2

では起動。。できるか~。。。

go!

[root@arizona ~]# qemu-kvm -m 2047 -hda esx4-copy.img

だめだー、リブート繰り返すー。



rawイメージでもだめだー。リブートくりかえすー。

[root@arizona ~]# file raw-esx4-copy.img
raw-esx4-copy.img: x86 boot sector; partition 1: ID=0x5, starthead 0, startsector 8192, 1835008 sectors; partition 2: ID=0x6, starthead 0, startsector 1843200, 8386560 sectors; partition 3: ID=0xfb, starthead 63, startsector 10229760, 115599360 sectors; partition 4: ID=0x4, active, starthead 1, startsector 32, 8160 sectors, code offset 0x31

そういえば、ESX用の xml ファイル作成してないなー。。

[root@arizona qemu]# pwd
/etc/libvirt/qemu

VMWare の vmx に該当するファイル。。

[root@arizona qemu]# ls
centos4.xml networks win2003R2.xml winxppro-vm.xml

install ESX 4 within VMWare Server 2

ESX をインストールできる条件を満たすPCを持っていないので、VMWare Server 上に ESX をインストールした
のでメモメモ。
もち、サポート外。

- 条件

BIOS , CPUが VT に対応していること。
ESX用 (VM ) にメモリを2GB以上アサインできること ( 2GB以下だと、インストール中にメモリが足りんぞーって怒られる )
vmx ファイルに下記を記述する。

--
monitor_control.enable_svm = "true" <- 追加 for AMD's CPU
monitor_control.restrict_backdoor = "true" <-追加
--

Intel CPU の場合は monitor_control.enable_vt32 = "true"
とする。

ではトライ

OS: Win XP Pro 32bit
VMWare Server 2
CPU: AMD Athlon 64 x2
total memory: 4GB ( 実際は 3GB ちょい認識だけど、4GBのメモリが入ってる )

インストール中の画面




インストール後。ESX が起動した画面。 
上の画像と見た目があまり変わらないので違いがわかりにくい。。。



ちなみに、vmx ファイルはこんな感じ~。

--
.encoding = "Shift_JIS"
config.version = "8"
virtualHW.version = "7"
floppy0.present = "false"
mks.enable3d = "true"
pciBridge0.present = "true"
pciBridge4.present = "true"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "true"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "true"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "true"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "true"
nvram = "Virtual Machine.nvram"
virtualHW.productCompatibility = "hosted"
ft.secondary0.enabled = "true"
tools.upgrade.policy = "useGlobal"
powerType.powerOff = "soft"
powerType.powerOn = "hard"
powerType.suspend = "hard"
powerType.reset = "soft"

displayName = "Virtual Machine"
extendedConfigFile = "Virtual Machine.vmxf"

scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
memsize = "2048"
scsi0:0.present = "true"
scsi0:0.fileName = "Virtual Machine.vmdk"
scsi0:0.writeThrough = "true"
ide1:0.present = "true"
ide1:0.fileName = "G:\storage1\VMware-VMvisor-Installer-4.0.0-171294.x86_64.iso"
ide1:0.deviceType = "cdrom-image"
ide1:0.allowGuestConnectionControl = "false"
ethernet0.present = "TRUE"
ethernet0.allowGuestConnectionControl = "FALSE"
ethernet0.virtualDev = "e1000"
ethernet0.features = "1"
ethernet0.wakeOnPcktRcv = "false"
ethernet0.networkName = "Bridged"
ethernet0.addressType = "generated"
guestOS = "otherlinux-64" <- VM の OS は other linux 64bit
uuid.location = "56 4d 97 72 87 0e b3 19-6d 3c a8 86 48 34 9d a1"
uuid.bios = "56 4d 97 72 87 0e b3 19-6d 3c a8 86 48 34 9d a1"
vc.uuid = "52 8b 5c 15 ff 8f 06 23-38 7c 00 9a 9a ce df 25"

monitor_control.enable_svm = "true" <- 追加したよー
monitor_control.restrict_backdoor = "true" <- 追加したよー

ethernet0.generatedAddress = "00:0c:29:34:9d:a1"
scsi0:0.redo = ""
vmotion.checkpointFBSize = "134217728"
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "16"
ethernet0.pciSlotNumber = "32"
vmci0.pciSlotNumber = "33"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "1211407777"

tools.remindInstall = "TRUE"
--

久々に steve vai 聞いたら、これまたさいこー。
ultra zone いいなー。。Jibboom とか、Asian sky とか、など、etc , and so on...
just go for it !

Asian sky の歌詞に出てくる中国語(?) 、なんて言ってるんだろー。
n' i , in the asian sky !!!

Cheers!