Qemu Windows Xp Fix Smb Not Working

Table of Contents

Preface

SMB 1.0 has to be enabled if you try to pass a local folder as an smb share to a WinXP Qemu VM. Qemu creates the temporary file /tmp/smb.conf that holds the configurations for samba. The values of this are hard coded and can only be modified after it's automatically created by Qemu.

Enabling NT1 support

Add the "min protocol = NT1" line to the global section of tmp/smb.conf. You can either edit that file after the VM boots up then restart, or you can use "/sed" to replace the "min protocol" line while the VM is in a pre-boot state.

Here's a template for a shell script that makes this change:

qemu-system-x86_64 [...] &

# Editing the configuration file while the VM is booting
sed -e 's/\[qemu\]/min protocol = NT1\n\[qemu\]/' -i /tmp/qemu-smb.*/smb.conf

Conclusion

Depending on how fast Windows boots up, you might have to restart if you don't see SMB working right away. You should be good to go.