Hi,

i want to change my IP-Adress (IP + Subnet + Gateway/DNS) in a Virtual-Box (VBox - System = Windows 10 and 7) to a static-IP.
Til today I use "netsh", but sometimes it doesn´t work and I don´t know why. Thats why I am looking for an other method to change the IP.
In VBox are 3 different LAN-Adapters (LAN-HOST + LAN-NAT + LAN-BRIDGED). I only want to change the IP at "LAN-BRIDGED"!

I'm quite green and not sure if this is even possible. Someone told me it works with wmi maybe, but I don´t know how to do it in vb.net!

This was my old code :

Shell("netsh interface ip set address LAN-BRIDGED static 192.168.178.27 255.255.255.0 192.168.178.1", AppWinStyle.Hide, True)

Can you help me please, to do it without netsh?

Recommended Answers

I could be wrong but such a change is more likely to be done with VBOXMANAGE or some use of the VirtualBox SDK. Let me be clear I have not looked deeply into this area but you can find the SDK and documentation with a search like:

Jump to Post

All 3 Replies

I could be wrong but such a change is more likely to be done with VBOXMANAGE or some use of the VirtualBox SDK. Let me be clear I have not looked deeply into this area but you can find the SDK and documentation with a search like:
https://www.google.com/search?&q=Change+IP+in+VirtualBox+API+VB.NET

That gives a lead in managing VirtualBox and pointed me to the SDK.

Given the rather specific guidance I found about the SDK my advice is to find a VirtualBox forum, preferably one with developers.

Thanks, but i am looking for something waht I can use in VBox and normal Windows 7/10.
Maybe WMI but I don´t know how to select the adapter (LAN-BRIDGED or LAN-NAT), where I want to change the IP...

commented: That's not normal. W7/10 has no knowledge about Vbox so you are back to the SDK for Vbox. +15

It isn´t necessary to know it is vbox or something else. So you don´t have to use a sdk for vbox.

because you can have at a pc 2 and much more LAN-Ports, so it is the same like in a vbox...

commented: Good luck. Removing possible solution paths isn't how to solve problems. +15
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.