User:Madz/Draft/How To Make A File Uploads VM: Difference between revisions

From Computernewb Wiki
Jump to navigation Jump to search
No edit summary
(This is put on hold until I compile a the agent client)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
File Uploads is a part of [[CollabVM Agent]] Extension (Please note that [[CollabVM Agent]] is unstable and may end up dying a few times when running) setting this up will allow people to upload files to your virtual machine when taking a turn. This guide will also setup hcapcha so we don't have bots automatically uploading files.
File Uploads is a part of [[CollabVM Agent]] Extension (Please note that [[CollabVM Agent]] is unstable and may end up dying a few times when running) setting this up will allow people to upload files to your virtual machine when taking a turn. This guide will also setup hcapcha so we don't have bots automatically uploading files.


== Prerequisites ==
The [[CollabVM Agent]] client is used on the guest machine to allow the files to be uploaded. Please note the client dose not work with every operating system and is more likely to work on Windows XP SP2/SP3 to Windows 11 also x86 is more stable than x64 for


=== Qemu ===
Windows Betas 7 to 8.1 are known to currently work with Longhorn only be able to run on a few builds.
You will need to install Qemu using whatever package manager your distro uses
For this tutorial I will be using a modified version of Windows XP SP3 called Darklord Edition but It should also work with normal SP3.

=== CollabVM already setup ===
if you need help with this follow [[UserVM Handbook|this guide]]

=== Windows ISO ===
The versions that have been reported working are

* Windows XP SP2/SP3
* Windows Server 2003 R2
* Windows XP x64
* Windows Longhorn (Certain Builds)
* Windows Vista x86/x64
* Windows Server 2008
* Windows 7 Beta
* Windows 7 x86/x64
* Windows Server 2008 R2
* Windows 8 x86/x64
* Windows Server 2012
* Windows 8.1 (Blue)
* Windows 8.1 x86/x64
* Windows Server 2012 R2
* Windows 10 x86/x64
* Windows Server 2022
* Windows 11 x86/x64
* Windows Server 2025

For this tutorial I will be using a modified version of Windows XP called [https://archive.org/details/windows-xp-sp-3-darklord-v-2.0-x-86 Darklord Edition] but It should also work with normal SP3.

== Setting Up ==
Make the image<pre>
qemu-img create -f qcow2 vm.qcow2 60G
</pre>If your doing Windows XP you can follow [[How to install Windows XP in QEMU|this guide]]<pre>
qemu-system-i386 -m 512M -hda vm.qcow2 -device VGA,vgamem_mb=64 -cpu host -accel kvm -M pc -netdev user,id=lan -device rtl8139,netdev=lan -usb -device usb-tablet -rtc base=localtime -monitor stdio -vnc :1 -cdrom image.iso -boot d
</pre>Replace image.iso with your image file name. This command will start qemu and run a vnc server on port 5901.

== Adding serial to the VM ==
Ok, you should have Windows installed now with all the programs you want. Now we will add the virtual serial port to the VM.

To add serial you will need the drivers for the virtio connector you can download these from [https://computernewb.com/isos/driver/virtio-win-0.1.240.iso Computernewb].

=== Add this argument to your VM command ===
<pre>
-device virtio-serial -chardev socket,path=/tmp/uploads.sock,nowait,id=sock,server -device virtserialport,chardev=sock,name=org.fedoraproject.port.0
</pre>then start the VM.

== Installing the Agent ==
Next you will need to go to Device Manager (you can access this by right clicking on my computer). Now right click on PCI Simple Communication Controller. Make sure your virtio driver cd is inserted and press update drive when the window pops up if it ask for windows update to search for a driver press "No, not this time" choose to search for the driver in the cd drive then press next. Windows will now search for the driver for my case I will be picking the XP driver but you should pick whatever operating system your chose.

=== Downloading the agent ===
Now you will need a usable browser to download the agent for me I will be using an older version of firefox (52.0esr). You will need to get the agent, you can do this either by compiling it yourself from [https://git.computernewb.com/Elijah/CollabVM-Agent-Windows here]

Latest revision as of 21:33, 13 August 2024


File Uploads is a part of CollabVM Agent Extension (Please note that CollabVM Agent is unstable and may end up dying a few times when running) setting this up will allow people to upload files to your virtual machine when taking a turn. This guide will also setup hcapcha so we don't have bots automatically uploading files.

Prerequisites

Qemu

You will need to install Qemu using whatever package manager your distro uses

CollabVM already setup

if you need help with this follow this guide

Windows ISO

The versions that have been reported working are

  • Windows XP SP2/SP3
  • Windows Server 2003 R2
  • Windows XP x64
  • Windows Longhorn (Certain Builds)
  • Windows Vista x86/x64
  • Windows Server 2008
  • Windows 7 Beta
  • Windows 7 x86/x64
  • Windows Server 2008 R2
  • Windows 8 x86/x64
  • Windows Server 2012
  • Windows 8.1 (Blue)
  • Windows 8.1 x86/x64
  • Windows Server 2012 R2
  • Windows 10 x86/x64
  • Windows Server 2022
  • Windows 11 x86/x64
  • Windows Server 2025

For this tutorial I will be using a modified version of Windows XP called Darklord Edition but It should also work with normal SP3.

Setting Up

Make the image

qemu-img create -f qcow2 vm.qcow2 60G

If your doing Windows XP you can follow this guide

qemu-system-i386 -m 512M -hda vm.qcow2 -device VGA,vgamem_mb=64 -cpu host -accel kvm -M pc -netdev user,id=lan -device rtl8139,netdev=lan -usb -device usb-tablet -rtc base=localtime -monitor stdio -vnc :1 -cdrom image.iso -boot d

Replace image.iso with your image file name. This command will start qemu and run a vnc server on port 5901.

Adding serial to the VM

Ok, you should have Windows installed now with all the programs you want. Now we will add the virtual serial port to the VM.

To add serial you will need the drivers for the virtio connector you can download these from Computernewb.

Add this argument to your VM command

-device virtio-serial -chardev socket,path=/tmp/uploads.sock,nowait,id=sock,server -device virtserialport,chardev=sock,name=org.fedoraproject.port.0

then start the VM.

Installing the Agent

Next you will need to go to Device Manager (you can access this by right clicking on my computer). Now right click on PCI Simple Communication Controller. Make sure your virtio driver cd is inserted and press update drive when the window pops up if it ask for windows update to search for a driver press "No, not this time" choose to search for the driver in the cd drive then press next. Windows will now search for the driver for my case I will be picking the XP driver but you should pick whatever operating system your chose.

Downloading the agent

Now you will need a usable browser to download the agent for me I will be using an older version of firefox (52.0esr). You will need to get the agent, you can do this either by compiling it yourself from here