Skip to content

Commit

Permalink
Merge d7e160a into 652ad68
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Nowak committed Nov 13, 2017
2 parents 652ad68 + d7e160a commit 3216617
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion backend/svirt.pm
Expand Up @@ -37,7 +37,7 @@ sub do_start_vm {
my ($self) = @_;

my $vars = \%bmwqemu::vars;
$vars->{NUMDISKS} ||= 1;
$vars->{NUMDISKS} ||= defined($vars->{RAIDLEVEL}) ? 4 : 1;

# truncate the serial file
open(my $sf, '>', $self->{serialfile});
Expand Down
30 changes: 6 additions & 24 deletions consoles/sshVirtsh.pm
Expand Up @@ -384,33 +384,15 @@ sub add_disk {
my $bus_type;
my $dev_id = $args->{dev_id};
if ($self->vmm_family eq 'xen') {
if ($self->vmm_type eq 'hvm') {
if ($args->{cdrom}) {
$dev_type = "hd$dev_id";
$bus_type = 'ide';
}
else {
$dev_type = "hd$dev_id";
$bus_type = 'xen';
}
}
elsif ($self->vmm_type eq 'linux') {
if ($args->{cdrom}) {
$dev_type = "xvd$dev_id";
}
else {
$dev_type = "xvd$dev_id";
}
$bus_type = 'xen';
if ($args->{cdrom}) {
$dev_type = "sd$dev_id";
$bus_type = 'scsi';
}
$dev_type = "xvd$dev_id";
$bus_type = 'xen';
}
elsif ($self->vmm_family eq 'vmware') {
if ($args->{cdrom}) {
$dev_type = "hd$dev_id";
}
else {
$dev_type = "hd$dev_id";
}
$dev_type = "hd$dev_id";
$bus_type = 'ide';
}
elsif ($self->vmm_family eq 'kvm') {
Expand Down

0 comments on commit 3216617

Please sign in to comment.