Commit 5a52beb6 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

If we clone, get the VM from the base

parent 66a503ae
......@@ -721,6 +721,8 @@ sub _upgrade_tables {
$self->_upgrade_table('domains','description','text DEFAULT NULL');
$self->_upgrade_table('domains','run_timeout','int DEFAULT NULL');
$self->_upgrade_table('domains','is_volatile','int NOT NULL DEFAULT 0');
$self->_upgrade_table('domains_network','allowed','int not null default 1');
}
......@@ -942,7 +944,10 @@ sub create_domain {
$vm = $self->search_vm($vm_name);
confess "ERROR: vm $vm_name not found" if !$vm;
}
$vm = $self->vm->[0] if !$vm;
if ($args{id_base}) {
my $base = Ravada::Domain->open($args{id_base});
$vm = Ravada::VM->open($base->_vm->id);
}
confess "No vm found" if !$vm;
......
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