Virt-manager filesystem passthrough not working - virtual-machine

I'm new to the ubuntu/linux environment so I don't have a lot of knowledge before hand.
I'm currently trying to set up a filesystem passthrough between my host (Ubuntu 22.04 LTS) and my vm (Ubuntu 16.04 LTS). I tried setting it up by following a youtube link but when i tried to add a file to it the other party can not open the file (i.e when i add a text document from my vm, the host cannot open the file). how the filesystem passthrough is currently showing
This is the filesystem code that I am running on my vm:
<filesystem type="mount" accessmode="mapped">
<source dir="/home/kkuma30/VIRTUAL_BOX"/>
<target dir="/hostshare"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x09" function="0x0"/>
</filesystem>
One thing to note is in my virtual machine manager, there is no way to choose how to the type or mode in the filesystem passthrough. filesystem passthrough setting
Is there anyway to fix this? I am trying to emulate Ubuntu 16.04 to run FVCOM

Related

How to change Docker's default Image storage location in WSL2?

How can I change the default location for storing Docker images in Windows? I currently have Docker installed on my C: drive, and the images are stored in the following location:
C:\Users\xxxxx\AppData\Local\Docker\wsl\data.
I want to change the default location to my D: drive. I am using WSL2 as the backend for Docker, and I have read that I can use the .wslconfig file to configure Docker. However, I am not sure how to set up the .wslconfig file to change the default image location. My WSL2 installation is located on my D: drive, which I installed from the Microsoft Store.
I'm using Docker version 20.10.21 and these are wsl specs
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22000.1335
I'm using Ubuntu distro in WSL, and Docker Desktop v.4.15.0
I tried making some changes in .wslconfig but there was no option for storage or something.
Caveats/Preface:
I've tried this and it works, but I cannot guarantee that long-term it will continue to work. There's the potential that something will break when Docker Desktop upgrades in the future.
In general I don't recommend registry hacks, but I'm not aware of another way to do this. Other than the previous caveat, this seems fairly safe.
No, there's no .wslconfig option for changing the location of a distribution.
With that in mind, here's what I did to move docker-desktop-data to the D: drive:
Create the directory. I'll use D:\wsl\docker-desktop-data as an example.
Stop Docker Desktop by right-clicking on the status bar icon and Quit Docker Desktop.
From PowerShell:
wsl --shutdown
Confirm the location (BasePath) and registry key (PSChildName) of the docker-desktop-data via:
Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss\ |
ForEach-Object {
(Get-ItemProperty $_.PSPATH)
} | Where-Object {
$_.DistributionName -eq "docker-desktop-data"
}
Move ext4.vhdx from the BasePath directory identified above to the D:\wsl\docker-desktop-data directory.
In regedit, navigate to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Find the subkey matching the PSChildName from above.
Modify the BasePath to point to \\?\D:\wsl\docker-desktop-data
Restart Docker Desktop
Test that your existing images are still available by running one of them.

How to set options in qemu

I am following the steps given here.
The page asks to set options in qemu for using usbredir.
When I install qemu on fedora there are bunch of qemu related commands like
qemu-alpha qemu-ppc qemu-system-mipsel
but not a command qemu itself.I do have the Virtual Machine Manager which shows up QEMU/KVM and some xml in the details of the same.
How to configure the options in qemu?
I have no previous knowledge of how to configure an option in qemu.

Req. Ovftool command to overwrite memory size and CPU count described in ova file during deployment of VM

I have a OVA file(MyOvafile.ova) which contain MemorySize=16GB and CPU count=4.
I have deployed the Ovftool on VMware ESXi server.
I am using the following command to deploy the VM:
/vmfs/volumes/DataStore1/vmware-ovftool/ovftool --memorySize:15360 --name=Test_VM -dm=thin -ds=DataStore1 /vmfs/volumes/DataStore1/OVA_V5.1_BSI-8/MyOvafile.ova
Now the problem i am facing:
As i am giving MemorySize of 15360MB but after deployment VM has the same values as defined in ova file (MyOvafile.ova i.e 16GB)
My Question:
How can i change the value of MemorySize and CPU count through ovftool command?
Apparently, this seems a bug in OVFTOOL (and documentation as well).
CPU and memory cannot be overridden by OVFTOOL's corresponding parameters.
However, there is hack by modifying it in VMX file of VM (and then using reconfigure command).
1) Get VMXfile Location (ending with .vmx) :
vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
72 Test_vm [datastore2] VM_name/VM_name.vmx rhel6_64Guest vmx-08
2) Modify vmx file (for example, using awk) for changing 'vCPUS=REQ_CPUs' entry.
3) Reconfigure .vmx file
vim-cmd vmsvc/reload <VM_ID>
Issue reported in VMware community: https://communities.vmware.com/message/2698710#2698710

reboot VM (run on vbox) into specific (compiled) kernel from shell

Im running ubuntu 14.04 with vbox . In this machine I compiled and run kernel 3.14 which I choose from the grub menu when ubuntu load on vbox.
The host also run on ubuntu 14.04.
I wanted to ask - is there a way to load the guest ubuntu into specific kernel with a command on shell?
I can start running a vm on vbox trough command line with this command :
VBoxManage startvm ubuservloc --type headless
but its not quite exactly what I need.
I don't know of any way to directly communicate from the host to the guest's GRUB, but there are several indirect ways you could go:
mount the /boot filesystem from the host and drop a file there that is read by the guest's grub.cfg.
VBoxManage controlvm keyboardputscancode to type a hotkey which is assigned to the correct kernel in GRUB (shortly after starting the VM)
Configure GRUB to listen to a (virtual) serial port and select the kernel by writing to that file
In case a second reboot is acceptable (first boot into default kernel and then reboot into desired kernel) there are also several ways (you can use the grub-set-default command from guest to choose your desired kernel and issue a reboot). Some I can think of here:
VBoxManage guestcontrol run to call a shell script from host in the guest (after guest additions have been loaded)
VBoxManage guestproperty to set a property from host and VBoxControl guestproperty to read it from an init script and decide from there
Just SSH into the guest and reboot from there :D
Obviously, if you always want to boot that kernel, why not make it default? And in case always you want to alternately boot two different kernels, you can also set the default for next boot to another one direclty from grub.cfg.

WebDAV folder quota using Apache server

I am trying to set up a WebDAV folder on my CentOS server. I have for the most part succeeded. My problem is that I am trying to set up a size limit (quota) on the folder. I found a blog that spelled out how to do that using the "DAVSATMaxAreaSize" command. However, when I restart Apache, I get the error: "Invalid command 'DAVSATMaxAreaSize', perhaps misspelled or defined by a module not included in the server configuration". Does this mean the module that supports this command is not installed? How can I fix this?
You need to recompile your apache.
Download patch from http://www.geocities.jp/t_sat7/webdav/webdav.html
Download rpm source for apache from centos repos. Patch it with patch u downloaded and recompile apache.
I had the problem on my Ubuntu 12.04 server but I didn't want to recompile my apache. I "solved" it as follows:
I created a file container using dd (for 100MB):
dd if=/dev/zero of=/var/webdav-file-container bs=1048576 count=100
And created a filesystem in that container:
mkfs.ext4 /var/webdav-file-container
Then I mounted this container as folder for my share:
mount /var/webdav-file-container /var/webdav-share
So, now the filesystem in the container has a fixed size and apache cannot write more than the 100MB.
The only thing is that the user does not know how much space is left on that share. The Windows client report the size of it's own system drive ...