Posted by : 小p 30 5月 2013


這段時間對於VIM有點興趣,稍微研究了一下,就順手作個筆記囉~

在連線的部分,需要有ESX IP,User 帳號,User Password
import com.vmware.vim25.mo.ServiceInstance;
public void connectEsxServer(String Esxip, String EsxUserId, String EsxPWD) throws Exception {
   String EsxUrl;
   ServiceInstance si;
   EsxUrl = "https://" + Esxip+ "/sdk"
   si = new ServiceInstance(new URL(EsxUrl), EsxUserId, EsxPWD,true);
   if (si == null) {
       System.out.println("Host not found");
   return;
  }
 }

利用這個方式,便可以透過ServiceInstance 來與Esx Server建立連線

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

CATEGORIES

Archives

小Pの日本旅遊經驗值

Popular Posts

Bloggerads

- Copyright © 一期一會 -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -