Installing OS from CLI

Stereoscope

Member
Jan 27, 2024
40
1
8
qm is the tool to manage QEMU/KVM virtual machines on Proxmox VE. You can create and destroy virtual machines, and control execution (start/stop/suspend/resume). Besides that, you can use qm to set parameters in the associated config file. It is also possible to create and delete virtual disks.
I understand we can do general management of our VMs from CLI, but Q is, can you somehow get the CLI or GUI output from the OS running on that VM?

Trying to install the OS onto these VMs from the screen connected to Proxmox server. No right? Seems we need access to the GUI management console for this?
 
Hi!

I'm not sure if I entirely understand what you want to do, but there are several options you can use to access the VM besides the WebGUI's console.

You can add a serial device and preferably set it as the main display, then you can connect to the VM with qm terminal <vmid> to open a serial terminal. You can also install operating systems through this, which support installs through a serial console.

Another option is to use one of the other protocols to use the human interface devices, e.g. SPICE [0].

[0] https://pve.proxmox.com/wiki/SPICE
 
  • Like
Reactions: Johannes S
https://pve.proxmox.com/wiki/Developer_Workstations_with_Proxmox_VE_and_X11

If you want proxmox to be an all-in-one GUI workstation with web browser, as well as hypervisor. Obv only recommended for homelab. Would recommend systemctl stop lightdm and possibly systemctl disable --now lightdm when you're done setting things up to turn local GUI access off and give max resources to virtual instances.

You're better off accessing PVE web dashboard from separate laptop/PC/Mac from a security / resource usage / vulnerability standpoint. PROTIP: If you install lightweight e.g. icewm instead of KDE or xfce4, Xorg desktop session will use less resources on the server. And keep open browser tabs to a minimum.

If you need to get commandline access to an LXC similar to ssh:

pct enter [vmidnumber]

If you need to get commandline access to a VM similar to ssh:

qm guest exec [vmidnumber] w32tm /resync

^ Only works if guest utilities are installed in the VM.
 
  • Like
Reactions: Johannes S