Virtualbox remote display updates remote as well as local screen - virtualbox

Folks,
I am running Virtualbox on Windows 7. The guest OS also is Windows 7.
I configured rdp connection at port 5000 (as stated in the documentation) and am able to connect to ip:5000 using Microsoft Remote Desktop client.
However, the problem is that the screen of the guest VM is simultaneously being shown on both, local as well as remote, windows.
Is there a way to just close the local window without shutting down the VM itself? Perhaps something similar to headless virtualbox on Linux.
Thank you in advance for your help.
Regards,
Peter

You can start a Virtualbox VM without GUI from the command line using:
VBoxHeadless --startvm [vmname]
There is also a section about running headless VMs in the Virtualbox manual: http://www.virtualbox.org/manual/ch07.html

Using the VBoxManage startvm command with the --type option is superior to VBoxHeadless as the former doesn't require the command prompt window to remain open (which largely defeats the purpose I think).
Below is and example of its output:
C:\>"C:\Program Files\Oracle\VirtualBox\VBoxManage" startvm "My Virtual Machine" --type headless
Waiting for VM "My Virtual Machine" to power on...
VM "My Virtual Machine" has been successfully started.
C:\>
Note that control is returned to the common prompt, allowing it to be closed without terminating the instance. The VM's status will also still be reported by the VirtualBox GUI.
The VBoxManage startvm command is documented in chapter 8 of the VirtualBox manual.

Related

VMWare Workstation won't suspend from command line

I'm trying to automate VMWare Desktop on Windows 7 to suspend all vm's before I do a backup job each night. I used to have a script that did this but I've noticed now that it won't suspend anymore with the same command that used to work.
If I do vmrun list I get a list of the running vms with no issue.
If I do vmrun suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" it just hangs and I have to kill the command with CTRL+C.
I've even tried a newer command using -T to specify it's workstation, ie vmrun -T ws suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and still no love.
If I have the vm already stopped, I can issue vmrun start "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and it starts fine.
As well as the suspend command, the stop command also does not work. I'm running VMWare Workstation 11.1.3 build-3206955 on Windows 7.
Any ideas?
Update:
I installed latest VMWare Tools on the guest, as well as the latest Vix on the Host so everything should be up to date.
I can start a vm using vmrun with no problem using vmrun -T ws start <path to vmx> but the command doesn't come back to the command prompt, so I'm assuming it's not getting confirmation from the vm that it is now running.
If I cancel the 'start' command and now try and suspend I'm getting the same lack of communication from the guest. If I manually suspend the vm, once it's suspended I get an 'Error: vm is not running' and the 'suspend' command finally times out and comes back.
So, it looks to me like there is no communication from vmrun to the guest about what state it's in etc. Is there a way to debug the communication from the host to the guest using vmrun or other means? Are there ports I need open in the guest OS?
So, I never did get vmrun to work properly on my main system, although I did get it behave ok on my laptop so there is something weird happening on this machine. I also installed a trial of the latest VMWare 12 and the same thing happens.
As a workaround, I ended up changing the power management settings in my guest OS so that it would 'sleep' after 1 hr of inactivity. When this happens VMWare detects it and automatically suspends the guest which is really what I'm looking for. Not the most slick solution but it does manage to unlock the files I need to be backed up in a nightly backup.

VirtualBox VM wouldn't start

This is my first time playing with the VirtualBox CLI. I'm trying to start a VM and then connect directly to its shell. I'm trying the following:
ram#nope:~/VirtualBox VMs> vboxmanage startvm my-machine --type headless
Waiting for VM "my-machine" to power on...
VM "my-machine" has been successfully started.
ram#nope:~/VirtualBox VMs> vboxmanage guestcontrol my-machine run bash
VBoxManage: error: Machine "my-machine" is not running (currently powered off)!
This is really frustrating because it's saying the machine was started, but then it doesn't work, with no error message.
Also, is my second message the appropriate one to connect to the shell in the guest? I basically want the same shell that's displayed to a user running the VM from the VirtualBox GUI. I also want to be able to script this and push commands automatically to the VM in a script.

Unable to access puppet enterprise web console

Hi I am beginner to puppet. I have setup learning puppet VM with virtual box 4.3.7 on win 7. Other puppet commands are running properly, but I am unable to access Puppet enterprise web console.
I have tried it using "https://ip_address_of_vm" on a web browser on win 7. I have tried to ping that ip address on command prompt, still its not connecting to it.
What should I do? Any kind of help is appreciable.
Make sure that the NIC is set to 'bridged' mode in VMWare/Virtualbox.
Also, can you ping the ipaddress?
To get mine to work, I changed my VirtualBox VM network settings to 'Host-only Adapter'.
facter ipaddress then returned a working IP.
I am running OSX 10.8.5 and VirtualBox 4.3.8

Can I bring up the GUI for a Vagrant managed Virtual box while the box is running?

I know that I can configure my Vagrantfile to boot my machine with a GUI according to http://docs.vagrantup.com/v2/virtualbox/configuration.html with:
config.vm.provider "virtualbox" do |v|
v.gui = true
end
But if I've started a box headless, is there any way to bring up a GUI while the machine is running? Virtualbox provides the small preview, so I suspect it is possible but I haven't found any documentation on how to do this.
Edit: Terry pointed out that I can vagrant reload after changing the setting above to get a gui, but that reboots the box. I'm still hoping there's a easy way to enable the gui without a reboot.
There are 3 ways I've found to get a gui on a running headless machine if you can see it in the VirtualBox Manager:
You can suspend the machine (Close|Save State or vagrant suspend) and then start it again. When you restart it, you will see the GUI.
or, if you don't want to stop the machine at all:
You can go to display settings and enable the Remote Display Server while it's running (you may want to change the default port), and then use an RDP viewer (On Windows use Remote Desktop Connection) to access the GUI.
[Edit July 2015] With VirtualBox 5.0, click on the headless VM, choose "Show", and it will bring up the gui.
You'll have to do vagrant reload after enabling gui.
But there is a trick (a bit risky in my opinion)
1. save the state of the VM VBoxManage controlvm NAME_OR_UUID savestate
2. star vbox gui and resume
BTW: BTW: Why do you need GUI for Vagrant managed (headless) running VMs? If you prefer GUI to manage headless VMs, try phpVirtualBox.
From my experience with vagrant once you start completely headless there is no way to boot the GUI, you have to boot it on start with the line you mention above.
If it's running on VirtualBox (what vagrant typically uses) :
preface: you can't without (shortly) interrupting the VM! So you can't just open it for a running instance in VirtualBox.
You may find http://www.toptensoftware.com/VBoxHeadlessTray/ helpful, it has minor bugs if you ask me but nice to have to save what you can do ...
... On console: you might simply do what #terry-wang wrote:
suspend machine by VBoxManage controlvm <NAME_OR_UUID> savestate
restart with gui option VBoxManage startvm <NAME_OR_UUID> --type gui
alternative: start gui manager yourself as terry wrote
revert / make headless from gui: VBoxManage startvm <NAME_OR_UUID> --type headless
Update on VirtualBox 5: VirtualBox GUI has the function to start in Background nativly included now, so still the tool is a shortcut but not even more needed to not be forced using the console
I use:
VBoxManage startvm <NAME_OR_UUID> --type separate
The type separate is experimental according to the documents, but it seems to work in bringing up the GUI after the VM has already been started headless.

How to make a VM instance running sneakily as if it is a remote server?

Both host and vm are xubuntu 12.04.
I know that VBoxManage startvm "name" will start a VM from command line but the GUI will pop up anyway. Is there a way to start this vm and make it running sneakily at the background? Thus I can access it as if it is a server. Previously I let the GUI up and do my job via the console of the host.
Thanks
I think you're looking for VBoxManage startvm "VM name" --type headless