Unable to create VM from command line from ssh session
Hello Everyone,
I am running a Ubuntu Server 20.04 and am connected remotely using ssh from a Ubuntu workstation 22.04
I need to install a VM on the Ubuntu Server and have already installed all required packages. When I run the command below, the installation just sits there and I get warnings about the display that is not set.
I have also connectde to the ssh session using the -X option and also uncommented the X11forwarding in the sshd config file and I still receive an error about the X system. see below
Can anyone point me in the right direction?
virt-install --name='CentOSVM2' --os-variant=centos7.0 --vcpu=1 --ram=1200 --disk path=/VirtualMachines/VM/CentOSVM.img,size=8 --cdrom=/VirtualMachines/ISO/CentOS-7-x86_64-Minimal-2009.iso --graphics=vnc
WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer.
WARNING No console to launch for the guest, defaulting to --wait -1
Starting install...
Allocating 'CentOSVM.img' | 8.0 GB 00:00:00
Domain installation still in progress.
Waiting for installation to complete.
Starting install...
Allocating 'CentOSVM5.img' | 8.0 GB 00:00:00
connect /tmp/.X11-unix/X0: Permission denied
Unable to init server: Could not connect: Connection refused
(virt-viewer:319952): Gtk-WARNING **: 20:05:17.248: cannot open display: localhost:10.0
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
|