subuk / vmango

Your own personal IaaS cloud
https://vmango.org
MIT License
329 stars 55 forks source link

Some problems and suggestions #41

Closed lord-kyron closed 5 years ago

lord-kyron commented 5 years ago

Hi again, Problems:

  1. Console I have several VMs running and I cannot open console to them. Here is what I am getting: image
  2. IP of running machines not showing in the Machines section under the IP column. Example: image

Suggestions:

  1. Memory everywhere to be displayed in GB, not in MB as for bigger hosts, those are a lot of numbers. Examples: image
  2. Volumes size to be displayed in GB everywhere. Example: image
  3. In Networks section, instead of just viewing the networks, to be able to edit the network settings of the host - like DHCP range, reserved addresses, rules, etc. supported by libvirt network
  4. Possibility to connect to another host from the same interface, to be able to see multiple hosts and machines. LIbvirtd and qemu are supporting such connection over http, ssh and other. You can expose some of those options to make this possible.
  5. Users management - possibility to add more users and define some roles for them like staff user, admin, superuser, normal user, guest, etc.
  6. Create VM from ISO file - like virt-install.
  7. Possibility to mark a VM as template and use it only for cloning and deploying new VMs. Should not be able to be started until marked as template - only cloning option available.
  8. Swap the positions of Size and Free columns for the Volumes in the Host page. To me it seems more logical to be ordered Free / Total Size than Total Size / Free. Example: image
  9. Autostart on boot - mark the VM to be atustarted on host boot.
  10. Ability to mark the disk of the VM to be deleted when the VM is deleted.
  11. Images management from the web interface - upload and download images like ISO and IMG from and to the WEB interface and choose on which volume they should go.
  12. Ability to extend (change) VM size - CPUs, RAM, Disk size, etc.

Please, share your thoughts! Thank you!

subuk commented 5 years ago

Hello! Thank you for sharing this list of problems, I will look closer later

lord-kyron commented 5 years ago

@subuk - yes, you can review all suggestions also, but can you tell me what to check regarding this console problem now?

subuk commented 5 years ago

If this vms were created and installed manually, you need to enable serial console, something like this: https://help.ubuntu.com/community/KVM/Access

lord-kyron commented 5 years ago

@subuk - I already have: `

</console>`

in the VM XML and also virsh ttyconsole <> returns: /dev/pts/2 but still the same in vmango.

subuk commented 5 years ago

Have you configured os inside vm?

subuk commented 5 years ago

And please send logs from vmango process output and browser console

subuk commented 5 years ago

Also try to attach to serial console using screen: screen /dev/pts/2 9600, if it works but web interface doesn't, problem somewhere in websocket. Maybe you using nginx (or any other http proxy) in front of vmango?

lord-kyron commented 5 years ago

Ah yes I am using nginx. What I newd to enable? Websockets ot which port?

subuk commented 5 years ago

It's on url /machines/{id}/console-ws/

lord-kyron commented 5 years ago

Hmm I am not sure how to cofigure that in nginx. Do you have example or give me some?

lord-kyron commented 5 years ago

And i assume {id} is dynamic per vm?

subuk commented 5 years ago

I think you can append the following lines to / location:

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

And this map to http block:

map $http_upgrade $connection_upgrade{
    default upgrade;
    `` close;
}
subuk commented 5 years ago

{id} is current machine name, yes, dynamic per vm

subuk commented 5 years ago

https://www.nginx.com/blog/websocket-nginx/

lord-kyron commented 5 years ago

I've enabled the websockets but still the browser console tells me: failed: Error during WebSocket handshake: Unexpected response code: 403

subuk commented 5 years ago

Check nginx error logs

lord-kyron commented 5 years ago

@subuk - I've fixed it, but now it says only Connected! Type any key to start and when I am typing different keys nothing happens.

subuk commented 5 years ago

Does it work with screen?

lord-kyron commented 5 years ago

screen /dev/pts/2 9600 opens a black screen and I cannot do anything it. It is not accepting commands or showing anything.

subuk commented 5 years ago

That means you should configure os inside vm

subuk commented 5 years ago

Cloud images are already configured

lord-kyron commented 5 years ago

I was able to fix it. For the record - in the guest itself I had to run the following: sudo systemctl enable serial-getty@ttyS0.service sudo systemctl start serial-getty@ttyS0.service

Then after that all was working fine. @subuk - thank you very much for the help! Please, take a look at my suggestions!

subuk commented 5 years ago

glad to hear!

captainwasabi commented 5 years ago

just to add a comment, when I installed from an iso using virt-install I had to specify

--extra-args console=ttyS0

subuk commented 5 years ago

About ip addresses see https://github.com/subuk/vmango/issues/25

In short, there is a button called "Enable guest agent" when vm is powered down. For all new vms guest agent will be enabled by default. After enablement, install qemu-guest-agent package inside vm and start the service.

subuk commented 5 years ago

And about suggestions:

  1. https://github.com/subuk/vmango/issues/43
  2. Same https://github.com/subuk/vmango/issues/43
  3. https://github.com/subuk/vmango/issues/46
  4. ?
  5. ?
  6. https://github.com/subuk/vmango/issues/38
  7. ?
  8. https://github.com/subuk/vmango/issues/45
  9. https://github.com/subuk/vmango/issues/32
  10. https://github.com/subuk/vmango/issues/33
  11. https://github.com/subuk/vmango/issues/44
  12. https://github.com/subuk/vmango/issues/42

Points 4, 5 and 7 are quite complex things, I want to postpone them for now.

lord-kyron commented 5 years ago

Great, thank you!