Menu

#19 Wrong name identification when there is active USB connectio

open
nobody
script (16)
3
2009-09-22
2009-09-22
No

When you use:
vboxtool show
You get as the name of the machine also the name of a connected USB object.
This is caused by this line:
name=$($vbox_command showvminfo $uuid | grep "Name:" | awk 'BEGIN{FS="Name: "}{print $2}')

Because the keyword "Name:" is used also in the "USB Device Filters" section.

I think that adding a "-m 1" to the grep should be enough:

name=$($vbox_command showvminfo $uuid | grep "Name:" -m 1 | awk 'BEGIN{FS="Name: "}{print $2}')

Without this fix it is not also possible to save the state of a give machine because it doesn't match the name.

(Thanks to Fabrizio Reale for reporting)

Discussion

  • Herman van Rink

    Herman van Rink - 2009-12-15

    Had the same problem and came to the same conclusion before looking here.

    It might be best though to use the log-opt version as in "--max-count 1"

     
  • Anonymous

    Anonymous - 2012-06-19

    I have similar problem with the command vboxtool start or autostart if the virtual machine has an usb device.

    I have fix with "-m 1" and now it starts and stops ok, but I dont check anything more.

     

Log in to post a comment.