Opened 15 years ago
Last modified 15 years ago
#2962 closed defect
VBoxManage modifyvm -nic1 hostif without specifying the hostifdev1 corrupts Virtualbox.xml — at Initial Version
Reported by: | tale | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 2.1.0 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | Linux |
Description
Just start with a fresh install. Then copy these commands:
Create a new guest. $ VBoxManage createvm -name WinXP -register
Verify that the guest is created and is fine. $ VBoxManage showvminfo WinXP
Set the first nic to use bridged networking. Notice we don't specify the hostifdev. $ VBoxManage modifyvm WinXP -nic1 hostif
The showvminfo command now shows ambiguous errors. $ VBoxManage showvminfo WinXP
It took me a while to figure out what was going on. I also had a problem with corruption when I copied and pasted some commands for creating a headless setup from the Internet. It turns out that if you specify the guest name using "" quotation marks works, but if you have “” style quotation marks the showvminfo also chokes.
I think that the modifyvm command should be updated so that it won't allow the user to screw up the config file. Maybe it should make a backup of the file and then try parsing the new settings. If it fails to parse the file, then an error message will be displayed and the old file will be put back as the original. This would cover all possible types of errors the user could make.