1 頁 (共 1 頁)

ESX

文章發表於 : 2010年 3月 11日, 17:39
super
I have been testing with ESX 4 U1 and noticed that you cannot connect to the host with web access or the vSphere client until the web access service is manually started. I did see that this was a known issue in the release notes for ESX 4 U1 however KB 1011921 says to set the run level for this service using chkconfig to fix the issue. I have done the following:

  • Started the service (service vmware-webAccess start)
  • Set the run level (chkconfig --level 345 vmware-webAccess on)
  • Verified the service status and run level settings
All is good until the host is rebooted. Then the run levels are all reset and the service has to be started manually.

Re: ESX

文章發表於 : 2010年 3月 11日, 17:40
super
1. 在ESX Server伺服器上,依畫面指示按下「Alt+F1」,登入Service Console。

2. 切換到ssh目錄下,並編輯「sshd_config」,這個檔案。指令如下:
cd etc/ssh
vi sshd_config

3. 在「sshd_config」中找到「PermitRootLogin」這一行,並將後面的「no」改成「yes」
修改後再按下「Shift+q」切換到「:」命令模式,之後在:輸入「wq」,表示儲存修改並離開vi編輯程式。

4. 回到Service Console後,重新啟動sshd服務,指令是:
service sshd restart

VMware Storage相關指令

文章發表於 : 2010年 3月 11日, 22:08
super
參數使用
-a 新增vSwitch
-A 新增portgroup
-l 列出
-L 連結實體網卡
-d 刪除vSwitch
-D 刪除portgroup

port的使用
903:Workstation與VM間的console session
2049:NFS storage
2050-5000 & 8042-8045:HA
3260:iSCSI
8000:VMotion
2700:License server


檢視switch
esxcfg-vswitch -l

檢視SC
esxcfg-vswif -l

檢視網路卡vmnic
esxcfg-nics -l

建立vSwitch (內部)
esxcfg-vswitch -a vSwitch1

新增portgroup
esxcfg-vswitch -A Network1 vSwitch1

建立vSwitch(單張網卡)
esxcfg-vswitch -a vSwitch2 -A Network2
esxcfg-vswitch -L vmnic1 vSwitch2

新增多張網卡到該vSwitch上
esxcfg-vswitch -L vmnic2 vSwitch2

砍掉vSwitch
esxcfg-vswitch -d vSwitch2

為VLAN NIC teaming建立portgroup
esxcfg-vswitch -a vSwitch2
esxcfg-vswitch -A account vSwitch2
esxcfg-vswitch -A sales vSwitch2
esxcfg-vswitch -A rnd vSwtich2
esxcfg-vswitch -L vmnic1 vSwitch2
esxcfg-vswitch -L vmnic2 vSwitch2
設定VLAN id
esxcfg-vswitch -v 10 -p account vSwitch2
esxcfg-vswitch -v 20 -p sales vSwitch2
esxcfg-vswitch -v 30 -p rnd vSwitch2

service mgmt-vmware restart


建立VMKernel Switch
esxcfg-vswitch -a vSwitch3
esxcfg-vswitch -A "VMKernel" vSwitch3
esxcfg-vswitch -L vmnic3 vSwtich3
esxcfg-vmknic -a "VMKernel" -i 1.1.1.1 -n 255.0.0.0
esxcfg-route 1.1.1.254


更改SC IP Address
esxcfg-vswif -i 10.10.1.1 -n 255.0.0.0 vswif0
改變GW
/etc/sysconfig/network
改變DNS
/etc/resolv.conf
重啟介面
service network restart

更改網卡工作速率
esxcfg-nics -l
esxcfg-nics -s 100 -d half vmnic0

重新建立vswif0介面
esxcfg-vswitch -a vSwitch0
esxcfg-vswitch -p "SC" vSwitch0
esxcfg-vswitch -L vmnic0 vSwitch0
esxcfg-vswitch -a vswif0 -p "SC" -i 1.1.1.1 -n 255.0.0.0

移除vSwitch中的網卡
esxcfg-vswitch -U vmnic? vSwitch?

刪除portgroup
esxcfg-vswitch -D sales vSwtich?


防火牆

檢視防火牆設定
esxcfg-firewall -q outgoing
esxcfg-firewall -q incoming

改變安全級別成Medium
esxcfg-firewall --allowOutgoing -blockIncoming

啟用單一服務
esxcfg-firewall -e sshClient

關閉單一服務
esxcfg-firewall -d sshClient

啟用非標準port
esxcfg-firewall -o 22,tcp,out,ssh