COMP3000 Operating Systems W25: Downloading files from your Openstack VM

From Soma-notes

Note: this page's purpose is to host publicly available material linked from Brightspace. Please use Brightspace as the primary source of information to stay updated.

You will need to transfer files between the Openstack VM and your own PC from time to time, for example, when submitting your tutorial/assignment work. As your laptop/desktop does not have a fixed IP the VM can connect to, it is always better to initiate the connection from your PC to the VM, which has a floating IP address associated. Here, you have a few options depending on your situation (assuming you have the Carleton VPN connected). Choose one that works for you or feel free to use other alternatives.

Using scp (with Carleton VPN)

Secure file copy uses the same protocol as the secure shell (SSH), similar to the SSH command.

scp <VMUserName>@<VMIP>:/home/student/<CarletonUserName>-comp3000-assign1.tar.gz <YourLocalPath>

The part in blue is an example pathname of the file to submit on your VM (make sure it matches your situation) and don't forget the last part in red, which is the destination directory on your PC (e.g., if could simply be a dot "." representing your current directory, where you are typing this command).

Replace the <VMIP> with the floating IP address of your VM. This should work for both Windows and Linux-like systems.

Using scp (without Carleton VPN)

scp -o "ProxyJump <CarletonUserName>@access.scs.carleton.ca" <VMUserName>@<VMIP>:/home/student/<CarletonUserName>-comp3000-assign1.tar.gz <YourLocalPath>

Or

scp -J <CarletonUserName>@access.scs.carleton.ca <VMUserName>@<VMIP>:/home/student/<CarletonUserName>-comp3000-assign1.tar.gz <YourLocalPath>

You will first be promoted for your MC1 password set through the SCS account, then your VM's password for the student user. Replace <CarletonUserName> with your Carleton username.

Using rsync (with Carleton VPN)

You can also use the more secure and new command, rsync instead.

rsync -avhP <VMUserName>@<VMIP>:/home/student/<CarletonUserName>-comp3000-assign1.tar.gz <YourLocalPath>

Replace the <VMIP> with the floating IP address of your VM. Likewise, also pay attention to the two locations (in red and blue).

Using rsync (without Carleton VPN)

rsync -avhP -e "ssh -A -J <CarletonUserName>@access.scs.carleton.ca" <VMUserName>@<VMIP>:/home/student/<CarletonUserName>-comp3000-assign1.tar.gz <YourLocalPath>