You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/02/18 14:22:53 UTC

[1/2] git commit: refs/heads/master - systemvmtemplate: Fix definitions and partition map

systemvmtemplate: Fix definitions and partition map

- Fix definitions, create vhd (virtual disk) format (reusable for hyperv)
- Fix partition maps in preseed, create /boot, /home, /var, /usr, /opt etc.

Signed-off-by: Rohit Yadav <bh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ab63a433
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ab63a433
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ab63a433

Branch: refs/heads/master
Commit: ab63a433ecbf60e18ad6cbcb0353c61fa432bcdc
Parents: 2327831
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Feb 18 18:37:34 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Feb 18 18:52:02 2013 +0530

----------------------------------------------------------------------
 .../definitions/systemvmtemplate/definition.rb     |    2 +-
 .../definitions/systemvmtemplate/preseed.cfg       |   64 ++++++++++++---
 2 files changed, 54 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ab63a433/tools/appliance/definitions/systemvmtemplate/definition.rb
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb
index a839182..8fd8530 100644
--- a/tools/appliance/definitions/systemvmtemplate/definition.rb
+++ b/tools/appliance/definitions/systemvmtemplate/definition.rb
@@ -1,7 +1,7 @@
 Veewee::Definition.declare({
   :cpu_count => '1',
   :memory_size=> '256',
-  :disk_size => '2048', :disk_format => 'VMDK', :hostiocache => 'off',
+  :disk_size => '2048', :disk_format => 'VHD', :hostiocache => 'off',
   :os_type_id => 'Debian',
   :iso_file => "debian-wheezy-DI-b4-i386-netinst.iso",
   :iso_src => "http://cdimage.debian.org/cdimage/wheezy_di_beta4/i386/iso-cd/debian-wheezy-DI-b4-i386-netinst.iso",

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ab63a433/tools/appliance/definitions/systemvmtemplate/preseed.cfg
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 204d573..b4d2895 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -99,29 +99,28 @@ d-i clock-setup/ntp boolean true
 d-i partman-auto/disk string /dev/sda
 # In addition, you'll need to specify the method to use.
 # The presently available methods are: "regular", "lvm" and "crypto"
-d-i partman-auto/method string lvm
+d-i partman-auto/method string regular
 
 # If one of the disks that are going to be automatically partitioned
 # contains an old LVM configuration, the user will normally receive a
 # warning. This can be preseeded away...
-d-i partman-lvm/device_remove_lvm boolean true
+#d-i partman-lvm/device_remove_lvm boolean true
 # The same applies to pre-existing software RAID array:
-d-i partman-md/device_remove_md boolean true
+#d-i partman-md/device_remove_md boolean true
 
 # And the same goes for the confirmation to write the lvm partitions.
-d-i partman-lvm/confirm boolean true
-d-i partman-lvm/confirm_nooverwrite boolean true
+#d-i partman-lvm/confirm boolean true
+#d-i partman-lvm/confirm_nooverwrite boolean true
 
-
-d-i partman/choose_partition select finish
-d-i partman-auto-lvm/guided_size string max
+#d-i partman/choose_partition select finish
+#d-i partman-auto-lvm/guided_size string max
 
 # You can choose one of the three predefined partitioning recipes:
 # - atomic: all files in one partition
 # - home:   separate /home partition
 # - multi:  separate /home, /usr, /var, and /tmp partitions
-d-i partman-auto/choose_recipe select multi
-d-i partman/default_filesystem string ext3
+d-i partman-auto/choose_recipe select atomic
+#d-i partman/default_filesystem string ext3
 
 # Or provide a recipe of your own...
 # The recipe format is documented in the file devel/partman-auto-recipe.txt.
@@ -129,6 +128,48 @@ d-i partman/default_filesystem string ext3
 # just point at it.
 #d-i partman-auto/expert_recipe_file string /hd-media/recipe
 
+d-i partman-auto/expert_recipe string                         \
+      boot-root ::                                            \
+              40 50 100 ext4                                  \
+                      $primary{ } $bootable{ }                \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /boot }                     \
+              .                                               \
+              400 40 500 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ / }                         \
+              .                                               \
+              60 100 200 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /home }                     \
+              .                                               \
+              500 30 1000 ext4                                \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /usr }                      \
+              .                                               \
+              400 40 500 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /opt }                      \
+              .                                               \
+              500 60 1000 ext4                                \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /var }                      \
+              .                                               \
+              100 70 400 ext4                                 \
+                      method{ format } format{ }              \
+                      use_filesystem{ } filesystem{ ext4 }    \
+                      mountpoint{ /tmp }                      \
+              .                                               \
+              64 512 300% linux-swap                          \
+                      method{ swap } format{ }                \
+              .
+
 # If not, you can put an entire recipe into the preconfiguration file in one
 # (logical) line. This example creates a small /boot partition, suitable
 # swap, and uses the rest of the space for the root partition:
@@ -154,11 +195,12 @@ d-i partman/default_filesystem string ext3
 
 # This makes partman automatically partition without confirmation, provided
 # that you told it what to do using one of the methods above.
+#d-i partman-partitioning/confirm_write_new_label boolean true
 d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
 d-i partman/confirm boolean true
 d-i partman/confirm_nooverwrite boolean true
 
-
 ### Base system installation
 # Select the initramfs generator used to generate the initrd for 2.6 kernels.
 #d-i base-installer/kernel/linux/initramfs-generators string yaird