Bug#1017884: reportbug: qemu-system-x86_64 freezes after i access samba server on a windows-xp host

2022-08-29 Thread Michael Tokarev

28.08.2022 16:33, أسامة مخزوم wrote:

You have:

-net nic,model=rtl8139 -net user
-net user,smb=...

The -net thing comes in pairs (one is guest side, another is host side).
You have 3 of them, and the last one is not paired with the guest side.

I suspect this is your problem - qemu does not know how to handle the
unpaired -net user.


you were right, i change it now and it works. seems AQEMU generates
buggy qemu's cmds, i have used it for the vm but i copy cmdline only

shall i report separate bug for aqemu ?


At the time aqemu has been written, the -net syntax was the only one
available. No doubt it is using that syntax.

Now, aqemu is not maintained for several years, even if it said there's
a new development started in 2016.  You're free to do so ofcource ;)

[]

Now, you use both -net user,smb=... which redirects ports used by
windows networking to custom samba instance with its own configuration,
with nothing shared from host samba. Yet you attach your smb.conf file.
Why?


I was just mistaken about samba and qemu , thought it used smbd for
its internals...


Yes qemu uses smbd. But it uses smbd with its own entirely private
configuration, not touching your main smbd/smb.conf in any way.

If you want to connect to the "main" smbd, do not override -smb, -
this way your main samba "instance" will be used.

/mjt



Bug#1017884: reportbug: qemu-system-x86_64 freezes after i access samba server on a windows-xp host

2022-08-28 Thread أسامة مخزوم
> You have:
>
> -net nic,model=rtl8139 -net user
> -net user,smb=...
>
> The -net thing comes in pairs (one is guest side, another is host side).
> You have 3 of them, and the last one is not paired with the guest side.
>
> I suspect this is your problem - qemu does not know how to handle the
> unpaired -net user.

you were right, i change it now and it works. seems AQEMU generates
buggy qemu's cmds, i have used it for the vm but i copy cmdline only

shall i report separate bug for aqemu ?


> The whole -net syntax is obsolete - partly because of this common
> misunderstanding and partly because whole architecture behind -net is
> wrongly designed. You should use -netdev..-device instead of -net..-net.
> (Unfortunately, many old guides in the internet still suggest to use
> -net, but this is something we can't change in a moment).


> Now, you use both -net user,smb=... which redirects ports used by
> windows networking to custom samba instance with its own configuration,
> with nothing shared from host samba. Yet you attach your smb.conf file.
> Why?

I was just mistaken about samba and qemu , thought it used smbd for
its internals...



Bug#1017884: reportbug: qemu-system-x86_64 freezes after i access samba server on a windows-xp host

2022-08-22 Thread Michael Tokarev

Control: tag -1 + moreinfo
Control: severity -1 normal

22.08.2022 02:30, Usama Makhzoum wrote:

Package: qemu-system-x86
Version: 1:7.0+dfsg-7+b1
Severity: important
X-Debbugs-Cc: osma...@gmail.com


I use qemu as the following:

/usr/bin/qemu-system-x86_64  -soundhw ac97 -machine accel=kvm -m 1033 -cdrom
windowsxp.iso -hda windowsxp.img -boot once=d,menu=off -net nic,model=rtl8139
-net user -net user,smb="/path/to/shared/folder/inside/my/home" -rtc
base=localtime -name "Windows XP x32"


You have:

 -net nic,model=rtl8139  -net user
 -net user,smb=...

The -net thing comes in pairs (one is guest side, another is host side).
You have 3 of them, and the last one is not paired with the guest side.

I suspect this is your problem - qemu does not know how to handle the
unpaired -net user.

The whole -net syntax is obsolete - partly because of this common
misunderstanding and partly because whole architecture behind -net is
wrongly designed. You should use -netdev..-device instead of -net..-net.
(Unfortunately, many old guides in the internet still suggest to use
-net, but this is something we can't change in a moment).

Now, you use both -net user,smb=... which redirects ports used by
windows networking to custom samba instance with its own configuration,
with nothing shared from host samba. Yet you attach your smb.conf file.
Why?

I suggest you to use -netdev..-device syntax (which has, among other
things, detection of disconnected halves like you have now) as a start.
Personally I see no reason to try to debug issues coming from -net..-net.

Thanks,

/mjt



Bug#1017884: reportbug: qemu-system-x86_64 freezes after i access samba server on a windows-xp host

2022-08-21 Thread Usama Makhzoum
Package: qemu-system-x86
Version: 1:7.0+dfsg-7+b1
Severity: important
X-Debbugs-Cc: osma...@gmail.com


I use qemu as the following:

/usr/bin/qemu-system-x86_64  -soundhw ac97 -machine accel=kvm -m 1033 -cdrom
windowsxp.iso -hda windowsxp.img -boot once=d,menu=off -net nic,model=rtl8139
-net user -net user,smb="/path/to/shared/folder/inside/my/home" -rtc
base=localtime -name "Windows XP x32"


it boots normally after installation, but when i access shared folder (just by
typing qemu user network ip "\\10.0.2.2\qemu") inside the run dialog everything
freezed , i can't even grab my pointer outside qemu window without
restarting window manager.


i also have this inside my smb.conf




==
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#behaviour of Samba but the option is considered important
#enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.

#=== Global Settings ===

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

 Networking 

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



 Debugging/Accounting 

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
   logging = file

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


### Authentication ###

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan < for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:*
%n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

## Domains ###

#
# The following settings only takes effect if 'server role = classic
# primary domain controller', 'server role = classic backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
#