From f3f586b6e48451de27d245c97a5e0f8a6798096b Mon Sep 17 00:00:00 2001 From: Thushan Fernando Date: Mon, 1 Apr 2024 16:16:20 +1100 Subject: [PATCH] Update docs and ordering for usage. --- default.config | 1 + proxmox-vm-to-ct.sh | 2 +- readme.md | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/default.config b/default.config index 5ec0ace..e2e36a7 100644 --- a/default.config +++ b/default.config @@ -11,3 +11,4 @@ CT_ONBOOT=0 CT_ARCH=amd64 CT_OSTYPE=debian # NOTE: Requires an empty new line at the end + diff --git a/proxmox-vm-to-ct.sh b/proxmox-vm-to-ct.sh index 5e99572..d62bad6 100755 --- a/proxmox-vm-to-ct.sh +++ b/proxmox-vm-to-ct.sh @@ -670,7 +670,7 @@ function main() { function usage() { banner 0 - echo "Usage: ${CYellow}$0${ENDMARKER} ${CBlue}--source${ENDMARKER} ${CBlue}--target${ENDMARKER} ${CBlue}--storage${ENDMARKER} [options]" + echo "Usage: ${CYellow}$0${ENDMARKER} ${CBlue}--storage${ENDMARKER} ${CBlue}--source${ENDMARKER} ${CBlue}--target${ENDMARKER} [options]" echo "Options:" echo " ${CCyan}--storage${ENDMARKER} " echo " Name of the Proxmox Storage container (Eg. local-zfs, local-lvm, etc)" diff --git a/readme.md b/readme.md index 4ab414e..4c0b20c 100644 --- a/readme.md +++ b/readme.md @@ -31,7 +31,7 @@ wget https://raw.githubusercontent.com/thushan/proxmox-vm-to-ct/main/proxmox-vm- chmod +x ./proxmox-vm-to-ct.sh ``` -Once downloaded, to create an container for the vm '`the-matrix`' named '`matrix-reloaded`' with the [default CT configuration](#default-configuration) on your pve storage `local-zfs`: +Once downloaded, to create an container for the vm with the hostname '`the-matrix`' named '`matrix-reloaded`' with the [default CT configuration](#default-configuration) on your pve storage `local-zfs`: ```shell ./proxmox-vm-to-ct.sh --source the-matrix \ @@ -49,6 +49,8 @@ If your VM has docker, podman or containerd installed, use the `--default-config --default-config-containerd ``` +You can use the fully qualified host name (Eg. `the-matrix` or `the-matrix.fritz.box`) or the IP (Eg. `192.168.0.101`) of the source VM you want to convert - we SSH in, to get the files. + See further [examples](#Examples) below. > \[!TIP] @@ -237,13 +239,17 @@ See what's included with [default containerd](#default-configuration---container ## Usage ``` -Usage: proxmox-vm-to-ct.sh --source --target --storage [options] +Usage: proxmox-vm-to-ct.sh --storage --source --target [options] Options: --storage Name of the Proxmox Storage container (Eg. local-zfs, local-lvm, etc) --source | Source VM to convert to CT (Eg. postgres-vm.fritz.box or 192.168.0.10, source-vm.tar.gz file locally) + --source-user + Source VM's SSH username to connect with. (Eg. root) + --source-port + Source VM's SSH port to connect to. (Eg. 22) --source-output , --output , -o Location of the source VM output (default: /tmp/proxmox-vm-to-ct/.tar.gz) --target