[vbox-dev] VM state change
achim at sun.com
Fri Mar 5 05:37:19 PST 2010
If you want to do something on an already running VM, you have to do OpenExistingSession. Check the VBoxManage source code.
PowerShell integration is a good idea, best would be to auto-generate the integration based on our XIDL, the way we do it for all the other APIs.
On Mar 5, 2010, at 11:19 , ravikanth at ravichaganti.com wrote:
> I am new to VirtualBox and exploring the COM interfaces to see how I can
> manage vBox VM from PowerShell cmdline. So far, I am able to CreateVM,
> RegisterVM, UnregisterVM and List virtual machines. Also, I could open a
> remote session using OpenRemoteSession. However, I would like to be able
> to change the state of VM without opening a remote session. Using
> openRemoteSession brings up the console window and I do not want to do that.
> Here is a set of commands I am currently running
> #Initialize COM
> $vBox = New-Object -ComObject VirtualBox.VirtualBox
> $vBoxSession = New-Object -ComObject VirtualBox.Session
> #Get VM1 in to $vm
> $vm = $vBox.Machines
> #Open a remote session
> I can use now use the "$vBoxSession.Console" (PowerDown, etc) to change
> the PowerState. Is there a way I can just Power on/off, Pause and resume a
> virtual machine in the remote session (GUI) without opening the console?
> Thanks for your time,
> PS: I am aware of vBoxManage.exe but my idea of creating a PowerShell
> library is to make it easy to manage VB guests over PowerShell remoting
> vbox-dev mailing list
> vbox-dev at virtualbox.org
More information about the vbox-dev