Commit 37d59216 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

trying to reach KVM and LXC virtual managers

parent 2e9015be
......@@ -92,7 +92,25 @@ sub _init_config {
sub _create_vm {
my $self = shift;
return [ Ravada::VM::KVM->new( connector => ( $self->connector or $CONNECTOR )) ];
my @vms = ();
my $vm_kvm;
eval { $vm_kvm = Ravada::VM::KVM->new( connector => ( $self->connector or $CONNECTOR )) };
my $err_kvm = $@;
push @vms,($vm_kvm) if $vm_kvm;
my $vm_lxc;
eval { $vm_lxc = Ravada::VM::LXC->new( connector => ( $self->connector or $CONNECTOR )) };
push @vms,($vm_lxc) if $vm_lxc;
my $err_lxc = $@;
if (!@vms) {
die "No VMs found: $err_lxc\n$err_kvm\n";
}
return \@vms;
}
=head2 create_domain
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment