Opened 6 years ago
Closed 4 years ago
#18523 closed defect (invalid)
"VBoxManage controlvm VM setlinkstate1 on/off" - not working properly like GUI mode
Reported by: | maucarioca | Owned by: | |
---|---|---|---|
Component: | network | Version: | VirtualBox 5.2.12 |
Keywords: | setlinkstate1, controlvm, bridged, ip, cable connected | Cc: | |
Guest type: | Linux | Host type: | Windows |
Description
My VM is started with a default NAT Networking with an IP like 10.2.XX.XX. Inside the Vagrant File I call the command "VBOXManage controlvm VM nic1 bridged eth0" to change my network type to bridge. After this I call in sequence the commands: "VBoxManage controlvm VM setlinkstate1 off" and "VBoxManage controlvm VM setlinkstate1 on" to change my network type. I saw in GUI that these commands properly uncheck the "Cable Connected" checkbox and check after but do not change the IP properly (refresh). When I do these same steps through GUI(open menu Devices > Network > Network Settings > Advanced, unckeck Cable Connected and click OK / open menu Devices > Network > Network Settings > Advanced, check Cable Connected and click OK) the VistualBox refreshs IP as expected.
Attachments (6)
Change History (14)
by , 6 years ago
Attachment: | Capturar1.JPG added |
---|
comment:1 by , 6 years ago
Where you read: and "VBoxManage controlvm VM setlinkstate1 on" to change my network type it´s: and "VBoxManage controlvm VM setlinkstate1 on" to refresh my network info
follow-up: 3 comment:2 by , 6 years ago
Have you tried adding a delay between these two commands, say 5 seconds? You probably can't click that fast, so the delay is natural in GUI case. Guest would usually ignore short transient connectivity loss and will not do DHCP refresh.
comment:3 by , 6 years ago
Replying to janitor:
Have you tried adding a delay between these two commands, say 5 seconds? You probably can't click that fast, so the delay is natural in GUI case. Guest would usually ignore short transient connectivity loss and will not do DHCP refresh.
Thanks for return. Answering the question: Yes. I tried again after your reply to check the information. I did manually calling command from a "cmd" respecting the properly delay (more than a minute between steps). Any ideas?
follow-up: 5 comment:4 by , 6 years ago
We need to see a complete VBox.log, from a complete VM run, when the problem occurs:
- Start the VM from cold-boot (not from a paused or saved state) / Create-Observe problem / Shutdown the VM (force close it if you have to).
- With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
- Save only the first "VBox.log" and attach it to your response.
Oh, BTW, please don't attempt to obfuscate anything, or I'm going to obfuscate my reply. Can't solve a problem with hidden or half-baked information. These are virtual MACs and UUIDs...
comment:5 by , 6 years ago
Replying to socratis:
We need to see a complete VBox.log, from a complete VM run, when the problem occurs:
- Start the VM from cold-boot (not from a paused or saved state) / Create-Observe problem / Shutdown the VM (force close it if you have to).
- With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
- Save only the first "VBox.log" and attach it to your response.
Oh, BTW, please don't attempt to obfuscate anything, or I'm going to obfuscate my reply. Can't solve a problem with hidden or half-baked information. These are virtual MACs and UUIDs...
Please see the log in attachments.
comment:7 by , 6 years ago
-
VirtualBox VM 5.2.12 r122591 win.amd64 (May 9 2018 10:42:46) release log
That's a rather old VirtualBox version that you have there. You need to update to the latest and greatest, either 5.2.26 or 6.0.4 as of this writing.
-
00:00:02.927690 NumCPUs <integer> = 0x0000000000000002 (2) 00:00:03.744696 CPUM: Physical host cores: 2
You have assigned all your CPUs to the VM. The host is going to run low on resources, since VirtualBox cares about physical processors (cores), not logical ones (threads).
-
00:00:02.927616 VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant="1"
Why is Vagrant mentioned here? Are you using Vagrant to deploy your VM? Vagrant is a program that relies on VirtualBox, but modifies its configuration files in unknown ways to us, and with unknown consequences, especially the networking part. They have their own Vagrant support channels.
comment:8 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You are trying to configure the VM to bridge to eth0
. There's no such interface on your Windows host. Unfortunately this is not reported to the controlvm
command, but it is noted in the log file:
Nonexistent host networking interface, name 'eth0'
Bridge Config