diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-16 12:37:40 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-16 12:37:40 +0000 |
commit | 5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e (patch) | |
tree | 66ff5e8e8813bef99c48b4d55731dd3ba1503c4b /draklive | |
parent | 9b9348f881c373dbcdacef2a3b189d0cac203880 (diff) | |
download | drakiso-5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e.tar drakiso-5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e.tar.gz drakiso-5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e.tar.bz2 drakiso-5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e.tar.xz drakiso-5b0e9bba5c3a2a9417f9c1a76e53a6400fdd799e.zip |
create vmdk virtual machine images
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1157,6 +1157,25 @@ sub create_image { } } +sub create_vm_image { + my ($live) = @_; + + if (!$live->{media}->get_media_setting('image')) { + warn "not implemented yet\n"; + return; + } + + my $master = get_disk_master_path($live); + if (!-f $master) { + warn "no master image, skipping\n"; + } + + my $vm_image = $master; + $vm_image =~ s/.img$/.vmdk/; + + run_("qemu-img", "convert", "-O", "vmdk", $master, $vm_image); +} + sub get_rescue_files { my ($live, $rescue_opts, $extra_files) = @_; my $media_boot = $live->get_media_prefix('boot'); @@ -1474,12 +1493,13 @@ my @actions = ( { name => 'loop', do => \&create_loopback_files }, { name => 'master', do => \&create_master }, { name => 'image', do => \&create_image }, + { name => 'vm-image', do => \&create_vm_image }, { name => 'replicator', do => \&create_replicator }, { name => 'format', do => \&format_device }, { name => 'record', do => \&record_master }, { name => 'record-onthefly', do => \&record_onthefly }, ); -my @all = qw(install boot loop master image replicator); +my @all = qw(install boot loop master image vm-image replicator); die "you must be root to run this program\n" if $>; |