Comments (11)
yes, your ananlysis is correct.
I am not sure about defining a static IP address.
but I see ppl facing troubles with bridge network so I opened this issue to record this #33 (may be to use NAT such as vagrant)
Ok so finally I have some time to start looking deeper into this project. Really interesting project that you've built here. I'm going to work on this a lot now.
I have 3 points to mention
-
So for now Essentially this project is a wrapper on top of virtualbox VBoxManage commands (unless another hypervisor is added), I don't think it is the problem of bridged network, it seems to be the problem of not being able to find the ip address of the created vm, it either spawns many goroutines, spike the goroutine count and results in memory leakage OR maybe its just not finding the ip
: to solve this maybe we should try assigning an ip address to the created vm since to ssh into the box we need to provide a static ip to the box, let me see if I can assign a static ip using VBoxManage -
If we can't provide static ip address then there should be a way to get the ip address of the vm after creating it like maybe VBoxManage import command or startvm command returns ip address which we can use to ssh directly
-
We should add another hypervisor to really make this project interesting like qemu since it has good support for commandline commands and is very light to be managed by vermin
from vermin.
BTW, I had this short conversation with chatgpt where it suggests to use dhcp client to try to discover the ip address, you can find it here
https://chat.openai.com/share/fe7b9f6c-9f91-42e4-bd32-4410596f9485
I'm going to add qemu as the next hypervisor after I figure out this network issue, I'm still keen on using bridged network because that way we can actually truly simulate a cluster since we will get vm<->vm communication and also LAN connection which is essential if I have lets say a database server and a application server in the same cluster. Using NAT with port forwarding would also allow us to do this I think, but i'll give this a try
So, I looked at the chatgpt code but sadly that does not work the dhcp client it uses doesn't have the functions it's using. but I have an interesting workaround
If I provide the same MAC address to the vm then it will get same ip address as the host so maybe we can do this and then ssh into the vm and then provide a static ip address there, this is just a thinking for now, i'm trying this, i'll share my findings
from vermin.
@mhewedy this function seems to be spawning 65535 goroutines
what exactly are you trying to do here?
ipAddr, err := ip.Find(vmName, false)
if err != nil {
return err
}
return cmd.Ssh(ipAddr, "-tt").Interact()
seems like this particular code is trying to ping every ip in that subnet and checking which ip address returns a pong (but if I am wrong then please correct me here)
can't we define a constant ip address before starting the vm and assign that ip to inbound connections to that VM?
from vermin.
yes, your ananlysis is correct.
I am not sure about defining a static IP address.
but I see ppl facing troubles with bridge network so I opened this issue to record this #33 (may be to use NAT such as vagrant)
from vermin.
@mhewedy Alright then I'm going to research about this a bit and then do this myself
from vermin.
@akhiljns
I like your analysis… and I am open to accept solutions to fix the ip addr issue
+1 for adding another hypervisor
from vermin.
BTW, I had this short conversation with chatgpt where it suggests to use dhcp client to try to discover the ip address, you can find it here
https://chat.openai.com/share/fe7b9f6c-9f91-42e4-bd32-4410596f9485
from vermin.
I didn't got this part
If I provide the same MAC address to the vm then it will get same ip address as the host so maybe we can do this and then ssh into the vm and then provide a static ip address there, this is just a thinking for now, i'm trying this, i'll share my findings
I did some quick research for a reliable way to discover IPs in the network, and I see ppl referring to nmap maybe? as ARP (the currently used technique in vermin) returns the cache of usage in case there was a connection between the current machine and the target IP
from vermin.
@mhewedy I actually solved this using GetVmProperty command,
https://forums.virtualbox.org/viewtopic.php?t=38879
I was surprised to know that virtualbox developers themselves didn't know about this, I have a friend in oracle who spoke to the team but they didn't know about this
turns out you can get the ip address of the started vm
raising a pr
PS: by the way
If I provide the same MAC address to the vm then it will get same ip address as the host so maybe we can do this and then ssh into the vm and then provide a static ip address there, this is just a thinking for now, i'm trying this, i'll share my findings
this thing works
from vermin.
- We should add another hypervisor to really make this project interesting like qemu since it has good support for commandline commands and is very light to be managed by vermin
I think libvert might be a better option. as it is higher level than qemu and it utilizes qemu and KVM already.
from vermin.
- We should add another hypervisor to really make this project interesting like qemu since it has good support for commandline commands and is very light to be managed by vermin
I think libvert might be a better option. as it is higher level than qemu and it utilizes qemu and KVM already.
oh yeah I've heard about libvert but never used it, let me look into it
from vermin.
Related Issues (20)
- decouple current implementation from virtualbox
- support only vagrant images
- change directory structure to support multiple hypervisors
- consider using different network adapter than bridged network
- vermin should report the absence of arp on the host machine
- consider vagrant images is the default
- Support vagrant TAR archives
- Host name enhancements
- Allow shrink disk space when provider is virtualbox
- How to upgrade version to match current one? HOT 4
- Cannot start VMs HOT 2
- panic: runtime error: index out of range [1] with length 1 HOT 1
- Not able to perform VBoxManage.exe import
- Uninstall and install from source HOT 1
- Permission denied while changing hostname HOT 6
- health based check instead of sleep 30 secs HOT 1
- Error while provisioning Vm getting EOF HOT 2
- Planing for release v0.130.0 HOT 2
- not able to run commands from shell script after provisioning vm HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vermin.