Compare commits

..

7 Commits

@ -21,7 +21,6 @@
- cockpit-ws - cockpit-ws
- dnf-utils - dnf-utils
- gdisk - gdisk
- nfs-utils
- rsync - rsync
- tar - tar
- tuned - tuned

@ -21,7 +21,6 @@
- cockpit-ws - cockpit-ws
- dnf-utils - dnf-utils
- gdisk - gdisk
- nfs-utils
- rsync - rsync
- tar - tar
- tuned - tuned

@ -9,6 +9,5 @@
when: packer_provider == 'virtualbox-iso' when: packer_provider == 'virtualbox-iso'
- role: vmware_guest - role: vmware_guest
when: packer_provider == 'vmware-iso' when: packer_provider == 'vmware-iso'
- nfs_client
- vagrant_pubkey - vagrant_pubkey
- cleanup_vm - cleanup_vm

@ -7,7 +7,8 @@ SOURCE=''
NO_PAKER_INIT='' NO_PAKER_INIT=''
NO_PKG_INSTALL='' NO_PKG_INSTALL=''
PACKER='/usr/local/bin/packer' # Use $PATH to find packer
PACKER='packer'
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
Usage() Usage()
@ -59,18 +60,10 @@ CheckSource "$SOURCE" || { echo "Unknown source: $SOURCE"; exit 1; }
if [ -z "$NO_PKG_INSTALL" ]; then if [ -z "$NO_PKG_INSTALL" ]; then
if which dnf &>/dev/null; then if which dnf &>/dev/null; then
sudo dnf install edk2-ovmf libvirt libvirt-daemon-kvm ansible-core sudo dnf install edk2-ovmf libvirt libvirt-daemon-kvm ansible-core libnsl
fi fi
fi fi
[ -z "$NO_PAKER_INIT" ] && $PACKER init -upgrade . || exit 1 [ -z "$NO_PAKER_INIT" ] && $PACKER init -upgrade . || exit 1
PACKER_LOG=1 $PACKER build -only=$SOURCE . 2>$PACKER_LOG_FILE || exit 1 PACKER_LOG=1 $PACKER build -only=$SOURCE . 2>$PACKER_LOG_FILE || exit 1
if [ "$SOURCE" = "vmware-iso.msvsphere-9-ovf-x86_64" ]; then
OUT_DIR='./vmware-iso.msvsphere-9-ovf-x86_64_ovf'
rm -rf $OUT_DIR
mkdir $OUT_DIR
/usr/lib/vmware-ovftool/ovftool --machineOutput --X:logFile=./ovftool.log --X:logLevel=verbose --exportFlags=extraconfig --allowExtraConfig --X:vCloudEnableGuestCustomization ./output-msvsphere-9-ovf-x86_64/msvsphere-9.4.vmx $OUT_DIR || exit 1
fi

@ -55,6 +55,8 @@ usermode
-open-vm-tools -open-vm-tools
-plymouth -plymouth
-rhn* -rhn*
-nfs-utils
-rpcbind
sphere-release-identity-server sphere-release-identity-server
sphere-release-server sphere-release-server
sphere-release sphere-release

@ -1,9 +1,9 @@
# MSVSphere 9 OVF kickstart file # MSVSphere 9 OVF kickstart file
# TODO: change url to the kickstart one when we have it # TODO: change url to the kickstart one when we have it
url --url https://rsync.inferitos.ru/msvsphere/9/BaseOS/x86_64/kickstart/ url --url https://repo1.msvsphere-os.ru/msvsphere/9/BaseOS/x86_64/kickstart/
repo --name=BaseOS --baseurl=https://rsync.inferitos.ru/msvsphere/9/BaseOS/x86_64/kickstart/ repo --name=BaseOS --baseurl=https://repo1.msvsphere-os.ru/msvsphere/9/BaseOS/x86_64/os/
repo --name=AppStream --baseurl=https://rsync.inferitos.ru/msvsphere/9/AppStream/x86_64/kickstart/ repo --name=AppStream --baseurl=https://repo1.msvsphere-os.ru/msvsphere/9/AppStream/x86_64/os/
text text
skipx skipx

@ -3,7 +3,7 @@
*/ */
source "vmware-iso" "msvsphere-9-ovf-x86_64" { source "vmware-iso" "msvsphere-9-ovf-x86_64" {
vm_name = "msvsphere-9.4" vm_name = "MSVSphere-${var.os_version_9}-${formatdate("YYYYMMDD", timestamp())}.ovf.x86_64"
iso_url = var.iso_url_9_x86_64 iso_url = var.iso_url_9_x86_64
iso_checksum = var.iso_checksum_9_x86_64 iso_checksum = var.iso_checksum_9_x86_64
boot_command = var.ovf_boot_cmd_9_x86_64_bios boot_command = var.ovf_boot_cmd_9_x86_64_bios
@ -49,4 +49,11 @@ build {
"packer_provider=${source.type}" "packer_provider=${source.type}"
] ]
} }
post-processor "shell-local"{
inline = ["rm -rf vmware-iso.msvsphere-9-ovf-x86_64_ovf",
"mkdir vmware-iso.msvsphere-9-ovf-x86_64_ovf",
"/usr/lib/vmware-ovftool/ovftool --machineOutput --X:logFile=./ovftool.log --X:logLevel=verbose --exportFlags=extraconfig --allowExtraConfig --X:vCloudEnableGuestCustomization ./output-msvsphere-9-ovf-x86_64/MSVSphere-${var.os_version_9}-${formatdate("YYYYMMDD", timestamp())}.ovf.x86_64.vmx ./vmware-iso.msvsphere-9-ovf-x86_64_ovf"
]
}
} }

Loading…
Cancel
Save