dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.59k stars 458 forks source link

Is it possible to provide a custom ssh port on uri ? #735

Closed Antonynixson closed 4 years ago

Antonynixson commented 4 years ago

Hi There,

In my case iam using a KVM server with custom ssh port like ( 2200 is my ssh login port ) if i want to launch a VM on my KVM server means, I need to provide the port with URI rignt ? How can i add my port to the uri ?

#Basic example,
provider "libvirt" {
  uri = "qemu+ssh://root@192.168.230.11/system"
}

Thanks, Antonynixson

MalloZup commented 4 years ago

@Antonynixson I have searched upstram in libvirt doc but there is not much info.

can you try this?

where 8000 is your port number

  uri = "qemu+ssh://root@192.168.230.11:8000/system"

Perhaps it will work. I'm not sure, but it could. let me know

Antonynixson commented 4 years ago

Hello @MalloZup,

Thank you so much for the replay, its works perfect.

Thanks, Antonynixson I