X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=v3_config_guest.pl;h=5b50f4087e4e3f14514909463e1c69aa77547700;hp=35aadc7d36dcb6e7c9a9480c3cd4321e2a99d89e;hb=a2c42ecf5c65f014a1a22b6a3fc3548482c4ec22;hpb=f2474c56a820b000ed444cb31c487d67aaf212c5 diff --git a/v3_config_guest.pl b/v3_config_guest.pl index 35aadc7..5b50f40 100755 --- a/v3_config_guest.pl +++ b/v3_config_guest.pl @@ -278,7 +278,7 @@ print $target "\n"; close(PAL); -print Dumper(\%config); +#print Dumper(\%config); if (defined($config{qemu}) && $config{qemu} eq "y") { gen_qemu_startup(\%config, $pdir, $dir); @@ -847,7 +847,7 @@ sub do_storage { sub do_storage_backend { my ($cr, $pdir, $dir, $name, $frontend, $loc, $frontendblock) = @_; - my ($canramdisk, $canfiledisk, $cannetdisk, $cantmpdisk); + my ($canramdisk, $canfiledisk, $cannetdisk, $cantmpdisk, $canqcowdisk); my @devs=("cd","hd","nothing"); my @disks; my $type; @@ -857,15 +857,17 @@ sub do_storage_backend { $canramdisk = is_palacios_core_feature_enabled($pdir, "V3_CONFIG_RAMDISK"); $canfiledisk = is_palacios_core_feature_enabled($pdir, "V3_CONFIG_FILEDISK"); + $canqcowdisk = is_palacios_core_feature_enabled($pdir, "V3_CONFIG_QCOWDISK"); $cannetdisk = is_palacios_core_feature_enabled($pdir, "V3_CONFIG_NETDISK"); $cantmpdisk = is_palacios_core_feature_enabled($pdir, "V3_CONFIG_TMPDISK"); push @disks, "ramdisk" if $canramdisk; push @disks, "filedisk" if $canramdisk; + push @disks, "qcowdisk" if $canramdisk; push @disks, "netdisk" if $cannetdisk; push @disks, "tmpdisk" if $cantmpdisk; - if (!$canramdisk && !$canfiledisk && !$cannetdisk && !$cantmpdisk) { + if (!$canramdisk && !$canfiledisk && !$cannetdisk && !$cantmpdisk && !$canqcowdisk) { print "You have no storage implementations enabled in your Palacios build, so it is impossible\n"; print "to add anything to storage controller \"$frontend\" location \"$loc\"\n"; return -1; @@ -884,6 +886,7 @@ sub do_storage_backend { print "A storage device requires one of the following implementations\n"; print " * RAMDISK - the data is kept in memory (common) : ".($canramdisk ? "available" : "UNAVAILABLE")."\n"; print " * FILEDISK - the data is kept in a host file (common) : ".($canfiledisk ? "available" : "UNAVAILABLE")."\n"; + print " * QCOWDISK - the data is kept in a host file (qcow) : ".($canqcowdisk ? "available" : "UNAVAILABLE")."\n"; print " * NETDISK - the data is accessed via the network (uncommon) : ".($cannetdisk ? "available" : "UNAVAILABLE")."\n"; print " * TMPDISK - the data is kept in memory and discarded (common) : ".($cantmpdisk ? "available" : "UNAVAILABLE")."\n"; while (1) { @@ -893,7 +896,7 @@ sub do_storage_backend { last if $#test==0; } - if ($type eq "filedisk" || $type eq "ramdisk") { + if ($type eq "filedisk" || $type eq "ramdisk" || $type eq "qcowdisk") { print "$type requires a file (.iso for example). Do you have one? [y] : "; if (get_user("y") eq "y") { while (1) { @@ -930,9 +933,12 @@ sub do_storage_backend { add_device($cr,"RAMDISK","$frontend\_$loc", undef, " $frontend\_$loc\n".$attach); add_file($cr, "$frontend\_$loc", "$frontend\_$loc.dat"); - } else { + } elsif ($type eq "filedisk") { add_device($cr,"FILEDISK","$frontend\_$loc", $what eq "hd" ? "writable=\"1\"" : undef, " $frontend\_$loc.dat\n".$attach); + } else { + add_device($cr,"QCOWDISK","$frontend\_$loc", $what eq "hd" ? "writable=\"1\"" : undef, + " $frontend\_$loc.dat\n".$attach); } last; } else {