Hi , FYI

Some of my environments (images) have long names and failing to start on 
libvirt/KVM computers.
Getting the following error from 'virsh start <domain_name>'

Unable to start domain: internal error Monitor path <domain_name>.monitor too 
big for destination

I've changed libvirt.pm::get_domain_name() to use 
"$computer_short_name:$image_id-v$image_revision" as VM name (copy attached).

--
Thank you,

Dmitri Chebotarov
VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers & Messaging
223 Aquia Building, Ffx, MSN: 1B5
Phone: (703) 993-6175 | Fax: (703) 993-3404

sub get_domain_name {
        my $self = shift;
        unless (ref($self) && $self->isa('VCL::Module')) {
                notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a 
function, it must be called as a class method");
                return;
        }
        
        return $self->{domain_name} if defined $self->{domain_name};
        
        my $node_name = $self->data->get_vmhost_short_name();
        my $request_state_name = $self->data->get_request_state_name();
        my $computer_short_name = $self->data->get_computer_short_name();
        
        # If request state is image the domain name will be that of the image 
used as the base image, not the image being created
        # Must find existing loaded domain on node in order to determine name
        if ($request_state_name eq 'image') {
                if (my $active_domain_name = $self->get_active_domain_name()) {
                        notify($ERRORS{'DEBUG'}, 0, "retrieved name of domain 
being captured: '$active_domain_name'");
                        $self->{domain_name} = $active_domain_name;
                        return $active_domain_name;
                }
                else {
                        notify($ERRORS{'WARNING'}, 0, "unable to determine name 
of domain to be captured");
                        return;
                }
        }
        
        # Request state is not image, construct the domain name
        # my $image_name = $self->data->get_image_name();
        my $image_id = $self->data->get_image_id();
        my $image_revision = $self->data->get_imagerevision_revision();
        
        $self->{domain_name} = 
"$computer_short_name:$image_id-v$image_revision";
        notify($ERRORS{'DEBUG'}, 0, "constructed domain name: 
'$self->{domain_name}'");
        return $self->{domain_name};
}

Reply via email to