Spinning up VMs remotely on Ubuntu Server

Hi, so I want to create VM's while I'm away from my server. (windows vm specifically)

Its Ubuntu server 16.04 so I don't want to install any hyper visor.

I've heard you can forward QEMU over VNC but I've never had good luck with VNC.

also take in mind all ports will need to be forwarded through the 30k range.


Hope this helps and hopefully with proper port forwarding you should be bale to get a vnc console. Are you wanting to spin up desktop environments?

1 Like

no set up headless vms, but you need a GUI for most cases :frowning:

Well I believe the link above will help you out let me know if not and I willl do some more digging.

2 Likes

thanks I'll take a look at ti!

Save yourself the headache and just install proxmox 4.4. The web GUI is magnificent.

You can remote manage VMs using virsh (CLI) or virt-manager (GUI). You can remote desktop if you enable SPICE on the VMs and use virt-viewer or similar.

3 Likes

Will spice work remotely? Reason I ask is I had to use VNC when creating from remote session to get to install window.

unless it can be installed separately no thanks. I don't want to wipe my 16.04 to install another distro/appliance.

Yeah if you have the port open and its on the external address and not localhost thats default. generally you need to open port 5900.

you can use virt-viewer and connect spice://ip:5900

1 Like

following the guide but got a hitch.

when I get to qemu-img. I try to create a 20GB img but when I boot the vm, it reports the size being 200kb.

any idea why?

Screenshots if you can. Personally never ran into that issue

can't provid screens atm but I can tell you what I did

qemu-img create -f qcow2 path/vm.img 20G

virsh create vm.xml

then connect via vnc
when selecting disks it only shows one disk and its 200kb in size.

The qcow2 only allows for that 20GB to be used but starts out with only what it needs. Reread Section 5 and see if it makes sense.

yea I understand that it grows and shrinks, but its presenting it self to the os as 200kb, and wont let me install on it.

figured it out!

seems the guides template xml doesn't work with the guide, had to change disk type from "raw" to "qcow2"

on another note. that guide isn't very good.

doesn't explain the xml and my VMs destroy them selves/remove themselves from virsh when I shut them down (i.e completing the isntall)

Copy appreciate the feedback I had been meaning to start using command line on my fedora box and have virtmanager running on it now. That was a guide I had found and it seemed a good starting point.

yea its a good start, I think I'm going to write my own guide after I figure this out, becasue that was trashy.

1 Like

virt-manager is basically a gui interface to virsh. You can do everything from cli using virsh. I recommend using a LVM pool for your disks. Create your disks using lvcreate then have a skeleton xml definition which you edit then import into virsh.