Skip to content

Commit

Permalink
Merge pull request #23 from priyama2/partCombo2
Browse files Browse the repository at this point in the history
Install Boot disk Partition Type
  • Loading branch information
PraveenPenguin authored Oct 1, 2024
2 parents 8103df2 + a64d93e commit adaade2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
20 changes: 14 additions & 6 deletions installvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,20 @@ def createKickstart(self):
lstr = "telnet\njava\n%end"
urlstring = "--url=nfs://"+vmParser.confparser('repo', 'RepoIP') + ':/var/www/html' + self.repoDir

if vmParser.args.fs_type == 'btrfs':
addksstring = "autopart --type=lvm --fstype=btrfs"
elif vmParser.args.fs_type == 'ext4':
addksstring = "autopart --type=lvm --fstype=ext4"
else:
addksstring = "autopart --type=lvm --fstype=xfs"
exit_nosupport=0
if vmParser.args.partition_type not in ['lvm', 'plain']:
logging.info("Aborting Installation : as partition type %s is not supported or not valid" % vmParser.args.partition_type)
exit_nosupport=1

if vmParser.args.fs_type not in ['xfs','ext4', 'btrfs']:
logging.info("Aborting Installation : as filesystem type %s is not supported or not valid" % vmParser.args.fs_type)
exit_nosupport=1

if exit_nosupport:
exit(1)

addksstring = "autopart --type=%s --fstype=%s" % (vmParser.args.partition_type,vmParser.args.fs_type)


ksparm = sftp.open('/var/www/html'+self.ksinst, 'w')
sshd_file = ''
Expand Down
1 change: 1 addition & 0 deletions lib/configparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def parse_args(self, argv=None):
parser.add_argument(
'--install-protocol' , help='Mode of Install Protocol ex: http, ftp, nfs',default='http')
parser.add_argument('--fs-type' ,help='RootFS type ex: xfs, ext4, btrfs',default='xfs')
parser.add_argument('--partition-type' ,help='Boot disk partition type with or without lvm ex: plain or lvm',default='lvm')
parser.add_argument(
'--set-boot-order', help='yes/True to set the boot disk order', required=False)
parser.add_argument(
Expand Down

0 comments on commit adaade2

Please sign in to comment.