PowerShell Linux Server File Injection via Hypervisor
Previous Post indicates that we are able to do one way copy files from HOST level to VM itself in Windows.
We are able to do the same thing in Linux too. :)
I don’t have Ubuntu, so I didn’t got chance to test, but for Red Hat or CentOS:
- On Linux Guest VM:
| |
- On Hyper-V Host or PowerShell remote session:
| |
- On Linux Guest VM:
| |
- On Hyper-V Host or PowerShell Remote Session:
| |
We should be able to see that the
Guest Service Interfaceisenableand thestatusisOKto communicate with the HOST, if not, check the service calledhypervfcopydis running or not on Linux Guest VMFinally, we are able to use following command to do the file copy:
| |
But note here, Linux command is bit different from Windows, In windows we use file name as the Source and Destination in the same way. But this doesn’t work in Linux.
In Linux, we use file name as the source and we use the folder that should contains the file as the destination Path.
Enjoy your magic script without Network Connection!