Ticket #2962 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

VBoxManage modifyvm -nic1 hostif without specifying the hostifdev1 corrupts Virtualbox.xml

Reported by: tale Owned by:
Priority: minor Component: other
Version: VirtualBox 2.1.0 Keywords:
Cc: Guest type: other
Host type: Linux

Description (last modified by frank) (diff)

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.

Change History

comment:1 Changed 9 years ago by frank

  • Description modified (diff)

comment:2 Changed 9 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Should be fixed long time ago. Not reproducible with recent version of VirtualBox.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use