[GH-ISSUE #579] Assign static IP's #343

Closed
opened 2026-02-27 15:58:19 +03:00 by kerem · 11 comments
Owner

Originally created by @nadermx on GitHub (Apr 20, 2023).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/579

Hi, great project. I was able to get everything set up, but now I have run into a problem I am not sure how to solve.

I have the following ip block assigned to me 38.106.79.129/25 and my host well say is on 38.106.79.130. Below are screen shots of my network and interface

image
image

But when every I try and assign this

image

I end up with a server 500 error
image

Even if I try with or without DHCP and/or fixed address.

I haven't been able where to find the error log specifically to see why its causing it? Any help would be useful as I want to be able to SSH into each VM I make with its own IP. Say .134 or .40

Originally created by @nadermx on GitHub (Apr 20, 2023). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/579 Hi, great project. I was able to get everything set up, but now I have run into a problem I am not sure how to solve. I have the following ip block assigned to me 38.106.79.129/25 and my host well say is on 38.106.79.130. Below are screen shots of my network and interface ![image](https://user-images.githubusercontent.com/7340380/233233794-2fcc86cf-0510-4531-8d7e-daffe29c1a1c.png) ![image](https://user-images.githubusercontent.com/7340380/233233850-9de76f59-aacb-470f-a09d-fdc82ff595a9.png) But when every I try and assign this ![image](https://user-images.githubusercontent.com/7340380/233234077-303626c8-33c5-425e-bd13-0f2d556e7661.png) I end up with a server 500 error ![image](https://user-images.githubusercontent.com/7340380/233234222-0c61e3aa-18a8-4b19-915f-2e4d823e040e.png) Even if I try with or without DHCP and/or fixed address. I haven't been able where to find the error log specifically to see why its causing it? Any help would be useful as I want to be able to SSH into each VM I make with its own IP. Say .134 or .40
kerem closed this issue 2026-02-27 15:58:19 +03:00
Author
Owner

@catborise commented on GitHub (Apr 20, 2023):

hi, it is working as expected, but you entered invalid ip address slice. you must enter 38.106.79.128/25 like that.
image

ps: if you want to see what is happening, you could enable debug mode. (edit settings.py -> make debug=True)

<!-- gh-comment-id:1515944332 --> @catborise commented on GitHub (Apr 20, 2023): hi, it is working as expected, but you entered invalid ip address slice. you must enter 38.106.79.128/25 like that. ![image](https://user-images.githubusercontent.com/1725643/233309377-24430d06-e213-4d71-abb8-1e468156804c.png) ps: if you want to see what is happening, you could enable debug mode. (edit settings.py -> make debug=True)
Author
Owner

@nadermx commented on GitHub (Apr 20, 2023):

Okay that worked and thank you for the clarification,few questions for clarification, will this automatically assign an IP from that cloud? And if so, what happens when it exhausts that by chance? And lastly, is there any way to exclude certain ip's from that block. IE, the one's I don't have, 128 or 129

<!-- gh-comment-id:1516830088 --> @nadermx commented on GitHub (Apr 20, 2023): Okay that worked and thank you for the clarification,few questions for clarification, will this automatically assign an IP from that cloud? And if so, what happens when it exhausts that by chance? And lastly, is there any way to exclude certain ip's from that block. IE, the one's I don't have, 128 or 129
Author
Owner

@nadermx commented on GitHub (Apr 20, 2023):

I think I figured out, instead of setting DHCP, I just tick the fixed addresses I guess, thank you

<!-- gh-comment-id:1516834834 --> @nadermx commented on GitHub (Apr 20, 2023): I think I figured out, instead of setting DHCP, I just tick the fixed addresses I guess, thank you
Author
Owner

@nadermx commented on GitHub (Apr 21, 2023):

If possible, one last thing. So am able to set up an ubuntu instance, with an assigned ip address
image
And here is the network of cloud
image
But for some reason, when I am in the VPS, and I check the IP address, it gives me the ip address of the host
image

and when I try and ping the IP address it gives me (242) it does not ping.

image
If I try and make in the network tab a assigned ip it asks for a mac address? I feel I am so close. If from the host I ping the .242 it responds, but not from an outside ip

<!-- gh-comment-id:1518116158 --> @nadermx commented on GitHub (Apr 21, 2023): If possible, one last thing. So am able to set up an ubuntu instance, with an assigned ip address ![image](https://user-images.githubusercontent.com/7340380/233695287-46437764-128b-4d1a-9422-b2656294869b.png) And here is the network of cloud ![image](https://user-images.githubusercontent.com/7340380/233695053-14efb587-917c-4d80-a04b-61f38779af93.png) But for some reason, when I am in the VPS, and I check the IP address, it gives me the ip address of the host ![image](https://user-images.githubusercontent.com/7340380/233695622-bd85eac2-8519-43d5-90ec-73353e5aee12.png) and when I try and ping the IP address it gives me (242) it does not ping. ![image](https://user-images.githubusercontent.com/7340380/233695686-d1755ca0-611b-43bf-a3e2-572573f79427.png) If I try and make in the network tab a assigned ip it asks for a mac address? I feel I am so close. If from the host I ping the .242 it responds, but not from an outside ip
Author
Owner

@catborise commented on GitHub (Apr 22, 2023):

nat mechanism works like that. i dont know your network design but may be you must not use NAT mechanism.
If we want use real ips for instance, we must not use NAT mechanism.
as i understand you need dhcp but with static manner. remove cloud network, because you selected NAT type before. Create new one and try bridged or routed network modes.

<!-- gh-comment-id:1518551733 --> @catborise commented on GitHub (Apr 22, 2023): nat mechanism works like that. i dont know your network design but may be you must not use NAT mechanism. If we want use real ips for instance, we must not use NAT mechanism. as i understand you need dhcp but with static manner. remove cloud network, because you selected NAT type before. Create new one and try bridged or routed network modes.
Author
Owner

@nadermx commented on GitHub (Apr 22, 2023):

When you say try bridged, you mean what specifically? I set up like so, which gave me a static ip in the VPS, but I still can not ping that IP nor can I access the internet with that IP, so I think I need the bridge?

image
image
image
As can be seen in the last image, it loggs in with an ip, and if i type ip address it gives me the same ip

<!-- gh-comment-id:1518716518 --> @nadermx commented on GitHub (Apr 22, 2023): When you say try bridged, you mean what specifically? I set up like so, which gave me a static ip in the VPS, but I still can not ping that IP nor can I access the internet with that IP, so I think I need the bridge? ![image](https://user-images.githubusercontent.com/7340380/233799280-c9160e4b-8b7d-470f-a457-4147c78d33e2.png) ![image](https://user-images.githubusercontent.com/7340380/233799300-ed30d85f-13fc-472b-a218-3276660f7560.png) ![image](https://user-images.githubusercontent.com/7340380/233799333-935f7d16-c5da-4bf4-bd7b-5d289f83aea8.png) As can be seen in the last image, it loggs in with an ip, and if i type `ip address` it gives me the same ip
Author
Owner

@nadermx commented on GitHub (Apr 22, 2023):

I guess to clarify, I got assigned the /25 block of ip's, and I want to be able to SSH into them from the internet. I believe there is a way to get it to work with webvirtcloud, or if not at least a way I Can run the commands on the host, to get it so webvirtcloud can still manage and auto assign the ips to the vm as it seems to be doing. I just seem to be missing in the config aspect

<!-- gh-comment-id:1518723900 --> @nadermx commented on GitHub (Apr 22, 2023): I guess to clarify, I got assigned the /25 block of ip's, and I want to be able to SSH into them from the internet. I believe there is a way to get it to work with webvirtcloud, or if not at least a way I Can run the commands on the host, to get it so webvirtcloud can still manage and auto assign the ips to the vm as it seems to be doing. I just seem to be missing in the config aspect
Author
Owner

@nadermx commented on GitHub (Apr 22, 2023):

I set it up this way
image
which acts weird in the sense the boxes show an IP, but have no internet acces. But if I ping something, it shows the IP of the domain..
image
But never actually pings. So it has 100% packet loss, but dig works and returns the dns info

<!-- gh-comment-id:1518813784 --> @nadermx commented on GitHub (Apr 22, 2023): I set it up this way ![image](https://user-images.githubusercontent.com/7340380/233806789-45304cf5-1b87-4bab-86c0-1b4d5ec9c87d.png) which acts weird in the sense the boxes show an IP, but have no internet acces. But if I ping something, it shows the IP of the domain.. ![image](https://user-images.githubusercontent.com/7340380/233806818-b12e185a-8c3a-4db5-885c-12dd9d9c22c2.png) But never actually pings. So it has 100% packet loss, but dig works and returns the dns info
Author
Owner

@nadermx commented on GitHub (Apr 22, 2023):

I have made a bit of progress I think, I see that when I check the
image
It shows the bridge is down, and when I try and turn it on or delete it I get this "this function is not supported by the connection driver: virInterfaceCreate"
image
So I think this must be causing the lack of internet on the vm

<!-- gh-comment-id:1518887856 --> @nadermx commented on GitHub (Apr 22, 2023): I have made a bit of progress I think, I see that when I check the ![image](https://user-images.githubusercontent.com/7340380/233810368-3ce43fe6-c114-406e-a673-facdd07e2adb.png) It shows the bridge is down, and when I try and turn it on or delete it I get this "this function is not supported by the connection driver: virInterfaceCreate" ![image](https://user-images.githubusercontent.com/7340380/233810395-0e8a51a5-8f78-483c-ac1d-f26dbf16864a.png) So I think this must be causing the lack of internet on the vm
Author
Owner

@catborise commented on GitHub (Apr 23, 2023):

these problems are not related with webvirtcloud. webvirtcloud is an only a ui for qemu/kvm + libvirt. Before webvirtcloud i recommend you to research network mechanism.
before virtual machine, test real ips on host. give one of the real ips to host interface, then check connectivity. if it reach internet, then create a bridge without nat mechanism("bridge" type). then set instance network to use that bridge. because lack of the dhcp mechanism. instance will not get a ip address. set instance's ip address manually. then check again, internet access. if it is reachable, then shutdown instance. create another network bridge with dhcp.

<!-- gh-comment-id:1519002198 --> @catborise commented on GitHub (Apr 23, 2023): these problems are not related with webvirtcloud. webvirtcloud is an only a ui for qemu/kvm + libvirt. Before webvirtcloud i recommend you to research network mechanism. before virtual machine, test real ips on host. give one of the real ips to host interface, then check connectivity. if it reach internet, then create a bridge without nat mechanism("bridge" type). then set instance network to use that bridge. because lack of the dhcp mechanism. instance will not get a ip address. set instance's ip address manually. then check again, internet access. if it is reachable, then shutdown instance. create another network bridge with dhcp.
Author
Owner

@nadermx commented on GitHub (Apr 23, 2023):

Thank you so much! I got it working with your help, as well as thes resources
https://fabianlee.org/2022/09/20/kvm-creating-a-bridged-network-with-netplan-on-ubuntu-22-04/
https://forum.proxmox.com/threads/how-to-configure-static-ip-in-proxmox-vm.56341/

<!-- gh-comment-id:1519149435 --> @nadermx commented on GitHub (Apr 23, 2023): Thank you so much! I got it working with your help, as well as thes resources https://fabianlee.org/2022/09/20/kvm-creating-a-bridged-network-with-netplan-on-ubuntu-22-04/ https://forum.proxmox.com/threads/how-to-configure-static-ip-in-proxmox-vm.56341/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#343
No description provided.