On Mon, Aug 09, 2021 at 11:05:49PM +0530, Kaushal Shriyan wrote: > On Mon, Aug 9, 2021 at 7:42 PM Erik Skultety <eskultet@xxxxxxxxxx> wrote: > > > On Wed, Aug 04, 2021 at 08:54:13PM +0530, Kaushal Shriyan wrote: > > > Hi, > > > > > > #cat /etc/redhat-release > > > CentOS Linux release 7.8.2003 (Core) > > > #virt-install --version > > > 1.5.0 > > > #virt-install -n snipeitassetmanagementubuntu --ram 8096 --vcpus 2 > > > --virt-type kvm --os-type linux --os-variant ubuntu18.04 --graphics none > > > --location ' > > > http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' > > > --extra-args "console=tty0 console=ttyS0,115200n8" --disk > > > path=/linuxkvmguestosdisk/snipeitassetmanagementubuntu.img,size=30 > > > > > > I am unable to connect to the guest VM instance. Any clue and i look > > > forward to hearing from you. Thanks in advance. > > > > Can you elaborate on what connection type is not working for you - serial > > console or SSH? > > I will presume you're talking about the former in which case > > --extra-args "console=..." is not a permanent setting, it is only placed > > on the > > kernel cmdline the first time the machine boots, IOW when it's being > > installed. > > That's how '--extra-args' works. Afterwards, the args will be lost, so you > > need > > to use some kind of automation management SW like Ansible to tweak the grub > > config after the OS installation if you want to keep using serial console. > > > > If by any chance you were talking about the latter, then I guess you > > haven't > > installed the SSH server in the VM. > > > > Regards, > > Erik > > > > Hi Erik, > > $virsh console snipeitassetmanagemeubuntu > Connected to domain snipeitassetmanagementubuntu > Escape character is ^] > > The screen is frozen. To connect it to the VM guest instance, I need to > configure the static private IP for this VM instance and later I can SSH > login to the server using private IP. > > Please suggest. Thanks in advance. Hi Kaushal, if you read carefully what I replied above, I believe my answer addresses what you've been experiencing. I'd advise the following to address your needs: - use a preseed installation config where you install the SSH server in the VM in an automated fashion - use static IP allocation in libvirt's network XML for that specific machine => see https://libvirt.org/formatnetwork.html#elementsAddress - depending on the actual use case I'd also recommend considering usage of the libvirt-NSS plugin which conveniently alleviates the need to know the IP of the VM => see https://libvirt.org/nss.html Regards, Erik