jeunium jeunium's Library tagged → View Popular
How To Install VMware Tools on Ubuntu 8.04 Guests / Ubuntu Tutorials : Hardy – Intrepid – Jaunty – Karmic
"sudo aptitude install build-essential linux-headers-generic"
VMware: VIX API Blog: Call VIX more easily from .NET (plus PowerShell goodness)
"# Before using this sample, download the Daniel Doubrovkine's VIX
# interoperability library from
# http://www.codeproject.com/KB/library/VMWareTasks.aspx
# and change the variable below to point to it.
$vestrisDir = "C:\Vestris.VMWareTasks"
# Run a script inside a VM using VIX. This should work against ESX 3.5
# U2 or higher, as well as VMware Server and Workstation. See below
# for an example.
function Invoke-Script {
param ($hostCred, $guestCred, $vm, $command, $args)
$vmo = get-vm $vm
$vmView = $vmo | get-view
$vmx = $vmView.config.files.vmpathname
$hostNet = $hostCred.GetNetworkCredential()
$guestNet = $guestCred.GetNetworkCredential()
add-type -path "$vestrisDir\1.0\Bin\Vestris.VMWareLib.dll"
add-type -path "$vestrisDir\1.0\Bin\Interop.VixCOM.dll"
$myHost = new-object vestris.vmwarelib.vmwarevirtualhost
$myHost.ConnectToVMWareVIServer("https://" +
$defaultVIServer.Name + "/sdk", 0, $hostNet.UserName,
$hostNet.Password)
$vm = $myHost.Open($vmx)
$vm.Login($guestNet.UserName, $guestNet.Password)
$vm.Execute($command, $args)
}
# Login stuff.
$ip = read-host "Enter the IP of your VC / ESX server"
write-host "Enter login and password to VC / ESX"
$hostCred = get-credential
write-host "Enter login and password to your VM"
$guestCred = get-credential
# Connect to ESX/VC
connect-viserver $ip -credential $hostCred
# This sample restarts the print spooler.
$command = "c:\windows\system32\net.exe"
$args = "restart spooler"
Invoke-Script -hostCred $hostCred -guestCred $guestCred `
-vm "Windows2k3SP2" -command $command -args $args"
Selected Tags
Related Tags
vixapi (5)
virtualization (5)
xen (4)
vmware_server (3)
vmware_tools (3)
vmware_time_sync (2)
how_to_rename_a_linux_nic (2)
conversion (2)
virtual_appliances (2)
mobile (1)
ubuntu_server (1)
mac_os_x (1)
services (1)
cloud_computing (1)
virtualbox (1)
emulator (1)
dos (1)
buntu_stuff (1)
linux_system_beep (1)
Sponsored Links
Top Contributors
Groups interested in vmware
-
vmware
vmware
Items: 3 | Visits: 17
Created by: Brant Chen
-
VMWare
Items: 8 | Visits: 4
Created by: billy littlejohn
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo