You are not logged in.
on my (also headless) server, I would like to have a Virtual Machine (Windows) running constantly, via this method (https://wiki.archlinux.org/index.php/Vi … _a_service) so that should the Server itself reboot, the virtual machine will start up as well. However while I would like the machine to be running & doing its thing in the background without interaction, I would also from time to time like to access the GUI of that machine, ideally over a network as the parent Arch server itself will be headless & won't have X or anything like that installed. What's the best way to go about this? Install a VNC server within the virtual machine? or is there another tool that will let me access & control the running VM on another machine directly over the network, ideally a tool that will run on Windows, without interfering with the virtualised OS?
Update: Of course - running VNC on the virtualised OS would mean that if the virtualised OS can't boot for some reason, I wouldn't be able to control it, so it would be nice if there was something independent of the virtualised OS.
Last edited by bergqvistjl (2016-01-23 18:44:25)
Offline
How about just using VirtualBox's built-in VNC server, it doesn't depend on the client OS.
Offline
AFAIK VirtualBox only supports RDP - but here I'm only reciting results from a quick duckduckgo-search - and given your Windows-requirement this wouldn't be too much of a problem either, I think.
However, Qemu has got a built-in VNC server. And Xen, too.
Offline
libvirt is fully written to handle this with spice protocol. install libvirt/qemu/kvm on host with spice enabled and spice-vdagent additions installed in the guest along with xf86-video-qxl (unfortunately on Arch spice-vdagent/xf86-video-qxl is in the AUR, not in official repos ***).
then on a client you install virtviewer package and run virt-viewer http://linux.die.net/man/1/virt-viewer
some extra tweaks to get it to work (policykit, ssh user, firewall).
*** edit: you said windows, so you have to download the windows guest driver from spice website
Last edited by samlung (2016-01-24 20:48:37)
Offline
How about just using VirtualBox's built-in VNC server, it doesn't depend on the client OS.
AFAIK VirtualBox only supports RDP - but here I'm only reciting results from a quick duckduckgo-search - and given your Windows-requirement this wouldn't be too much of a problem either, I think.
However, Qemu has got a built-in VNC server. And Xen, too.
Yeah, as long as I can control the VM's existing logged-in session as I would say a real PC, then RDP will be fine too. I would like to be able to log into an existing session though that's already running in the background. i.e. as if i was on a real PC that had it's monitor turned off & I just turn on the monitor. As what i'd want to be running on the PC will only work if the user is already logged into the desktop. Basically when I connect, I don't want to start a new login.
Last edited by bergqvistjl (2016-01-28 17:19:30)
Offline
I don't know about the "user-friendly" hypervisors like VMWare and VirtualBox, but you could run qemu as a systemd service, either as a user-service or as a system service, depending on what the VM should be capable of doing.
For a user service, something like
[Unit]
Description=My personal VM
[Service]
ExecStart=/usr/bin/qemu -monitor tcp::12345,server,nowait -vnc :0 -other-qemu-options
ExecStop=%h/.local/bin/script_that_sends_system_powerdown_into_localhost_port_12345
[Install]
WantedBy=default.target
as $XDG_CONFIG_HOME/systemd/user/qemu.service and lingering enabled should start the VM at boot-up, and (hopefully) shutdown the VM at the host's shutdown. It's not very elegant, but you get the idea (in general it's recommended to wrap qemu into a script).
This way you don't need to log into the host system at all, as the VM gets launched on its own, with VNC running on display :0 (port 5900, feel free to adapt).
Offline