First time trying to install Whonix KVM

Hello all!

So I’m pretty new to Linux and I’m trying to install Whonix/KVM with a Linux Mint cinnamon host.

I’ve been following the instructions on the Whonix/KVM wiki. Things seemed to be going just fine until I got to the the part about “Decompress”.

I checked that the xz-utils was installed-

$ sudo apt install xz-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
xz-utils is already the newest version (5.6.1+really5.4.5-1build0.1).
The following packages were automatically installed and are no longer required:
  python3-proton-keyring-linux-secretservice
  python3-proton-vpn-killswitch-network-manager
  python3-proton-vpn-killswitch-network-manager-wireguard
  python3-proton-vpn-logger
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

Seems fine as far as I can tell :person_shrugging:. So I continued and tried the-

tar -xvf Whonix*.libvirt.xz command in terminal-

$ tar -xvf Whonix*.libvirt.xz
tar: Whonix*.libvirt.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

I’m a little confused as what to do here.

Any and all help/pointers/criticism ( :stuck_out_tongue_closed_eyes:) is much appreciated.

Best regards!

1 Like

The file is most likely not there.

Most likely you downloaded the files to your ~/Downloads folder but now trying to extra from ~/ (home) folder.

1 Like

Oh ok, that does sound like what I did. Should I just move the file to ‘home’ folder and try the ‘tar’ command again or delete and re-download?

Wait the downloads folder is part of the home folder…I’m confused.

1 Like

You just need to cd in to the correct folder.

 cd ~/Downloads

delete and re-download?

Not needed.

1 Like

Thanks.

I’m stuck again though lol.

I got to the ‘import whonix gateway and workstation images’ part and entered the

sudo virsh -c qemu:///system define Whonix-Gateway*.xml

command and it returned

sudo virsh -c qemu:///system define Whonix-Gateway*.xml
error: Failed to define domain from Whonix-Gateway.xml
error: (domain_definition):113: Extra content at the end of the document
</domain>mousepad Whonix-Gateway*.xml
---------^

I’m not sure what is going on here. I have had a look in Virtmanager under details-xml and cant see anything.

1 Like

Did you edit that file and add extra contents there (by accident)?

At the very end of the file you changed </domain> to </domain>mousepad Whonix-Gateway*.xml? That’s wrong.

File should look like this: https://raw.githubusercontent.com/Kicksecure/libvirt-dist/refs/heads/master/usr/share/libvirt-dist/xml/Whonix-Gateway.xml

You can compare it with File Comparison Tools.

1 Like

Ok, yea I edited the file when I should not have. It looks like I got the VM’s installed on VirtManager.

When I try to run the workstation it reads-

Error starting domain: Cannot access storage file '/var/lib/libvirt/images/Whonix-Workstation.qcow2' (as uid:64055, gid:993): No such file or directory

Details are-

Error starting domain: Cannot access storage file '/var/lib/libvirt/images/Whonix-Workstation.qcow2' (as uid:64055, gid:993): No such file or directory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1379, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: Cannot access storage file '/var/lib/libvirt/images/Whonix-Workstation.qcow2' (as uid:64055, gid:993): No such file or directory

I’ve tried moving the image files following the commands in the wiki but it doesn’t seem to work. The gateway seems fine, it will start up and run.

Wait it all seems good now!

Thanks for your help and patience

1 Like

There is already a note saying:

Run the decompression command below in the folder where you downloaded the image

Added to it (mostly going to be in ~/Downloadsor~/ (home) folder.

Cant be more clearer than this.

1 Like

Got it running as I said. But thanks for taking the time to help.

2 Likes