Menu

#1 VM with slash in name can crash the GUI

open
nobody
5
2010-03-03
2010-03-03
No

Reproduced this with both VMware Server 2 as well as ESX3.5 U5
If you create a VM and then set the displayname in the .vmx file to something that contains a forward slash. Like "Jeos/Apache" and then register the VM, it will crash the GUI just after logging in.
This does NOT happen when you edit the name in the VIC or in the web management GUI as then the slash is replaced by %2F in the .vmx

The problem is in the subroutine inventory in the file inv.pl due to how the treeview makes use of the forward slash itself.
I tried the following as a fix, but it just moved the problem.
foreach (@$vresult) {
my $vobj_content = $_;
my $vmob = $vobj_content->obj;
my $vobj = Vim::get_view(mo_ref=>$vmob);
$inv{$hobj->name}{$vobj->name} = $vobj;
my $vmname = $vobj->name;
$vmname =~ s!/!%2f!g;
print "vm $dcname/".$hobj->name."/".$vobj->name." vmname=".$vmname."\n";

$ilb->add($dcname."/".$hobj->name."/".$vmname, -text => $vobj->name);
$ilb->hide(entry => $dcname."/".$hobj->name."/".$vmname);
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB