Skip to contentSkip to conversation

VM Konfig mismatches when -readconfig option is used

Qemu-devel Bjoern Bornemann 1 participant 1 message Mar 18, 2015

lore
Share & tools
lore
#0 lore raw

Public bug reported:

Since qemu is able to write / read config files, i thought it might be cool to use this. BUT:

qemu allways adds an default network interface, when i use the -readconfig option.

Till now, i start my VM like this (all variables are defined and working well in this script)

/opt/bin/qemu-system-x86_64 \
	-m 512M \
	-vga vmware \
	-name ${VMname} \
	-display sdl,window_close=off,ctrl_grab=on \
	-machine q35,accel=kvm -enable-kvm \
	-drive file=./${SystemHDDname}.hdd,index=0,if=virtio,media=disk \
	-drive file="${ISOfile}",index=2,if=virtio,media=cdrom \
	-boot menu=on,once=d \
	-net nic,vlan=0,model=virtio,macaddr=52:54:00:6D:AA:0C,name=uplink \
	-net user,vlan=0,name=VLANextern,net=192.168.42.0/24 \
	-usbdevice tablet \
	-balloon virtio \
	-net nic,vlan=238,model=virtio,macaddr=52:54:00:6D:AA:0D \
	-net vde,vlan=238,name=VLANintern,sock=${VDEsocket} \
	-rtc base=utc,clock=host \
	-writeconfig ./${VMname}.qemu

the monitor tells me:
QEMU 2.2.90 monitor - type 'help' for more information
(qemu) info network
hub 238
\ hub238port1: VLANintern: index=0,type=vde,sock=/media/daten/vm/vde/test.virtuell.zh3,fd=9 \ hub238port0: virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0d
hub 0
\ hub0port1: VLANextern: index=0,type=user,net=192.168.42.0,restrict=off
\ hub0port0: virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0c

which is perfectly correct.

and now the result for qemu-system-x86_64 -readconfig ./${VMname}.qemu:

QEMU 2.2.90 monitor - type 'help' for more information
(qemu) info network
hub 238
\ hub238port1: VLANintern: index=0,type=vde,sock=/media/daten/vm/vde/test.virtuell.zh3,fd=9 \ hub238port0: virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0d
hub 0
\ hub0port3: user.1: index=0,type=user,net=10.0.2.0,restrict=off
\ hub0port2: e1000.0: index=0,type=nic,model=e1000,macaddr=52:54:00:12:34:56
\ hub0port1: VLANextern: index=0,type=user,net=192.168.42.0,restrict=off
\ hub0port0: virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0c

Is it a bug or just misconfigured?

Thanks in advance.

BorneBjoern

** Affects: qemu-kvm
Importance: Undecided
Status: New

** Attachment added: "vm config file"
https://bugs.launchpad.net/bugs/1433510/+attachment/4348870/+files/vRouter.qemu

** Project changed: qemu => qemu-kvm

Signature · 73 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1433510

Title:
  VM Konfig mismatches when -readconfig option is used

Status in qemu-kvm:
  New

Bug description:
  Since qemu is able to write / read config files, i thought it might be cool to use this. 
  BUT: 

  qemu allways adds an default network interface, when i use the
  -readconfig option.

  Till now, i start my VM like this (all variables are defined and
  working well in this script)

  /opt/bin/qemu-system-x86_64 \
  	-m 512M \
  	-vga vmware \
  	-name ${VMname} \
  	-display sdl,window_close=off,ctrl_grab=on \
  	-machine q35,accel=kvm -enable-kvm \
  	-drive file=./${SystemHDDname}.hdd,index=0,if=virtio,media=disk \
  	-drive file="${ISOfile}",index=2,if=virtio,media=cdrom \
  	-boot menu=on,once=d \
  	-net nic,vlan=0,model=virtio,macaddr=52:54:00:6D:AA:0C,name=uplink \
  	-net user,vlan=0,name=VLANextern,net=192.168.42.0/24 \
  	-usbdevice tablet \
  	-balloon virtio \
  	-net nic,vlan=238,model=virtio,macaddr=52:54:00:6D:AA:0D \
  	-net vde,vlan=238,name=VLANintern,sock=${VDEsocket} \
  	-rtc base=utc,clock=host \
  	-writeconfig ./${VMname}.qemu

  the monitor tells me:
  QEMU 2.2.90 monitor - type 'help' for more information
  (qemu) info network 
  hub 238
   \ hub238port1: VLANintern: index=0,type=vde,sock=/media/daten/vm/vde/test.virtuell.zh3,fd=9
   \ hub238port0: virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0d
  hub 0
   \ hub0port1: VLANextern: index=0,type=user,net=192.168.42.0,restrict=off
   \ hub0port0: virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0c

  which is perfectly correct.

  
  and now the result for qemu-system-x86_64 -readconfig ./${VMname}.qemu:

  QEMU 2.2.90 monitor - type 'help' for more information
  (qemu) info network 
  hub 238
   \ hub238port1: VLANintern: index=0,type=vde,sock=/media/daten/vm/vde/test.virtuell.zh3,fd=9
   \ hub238port0: virtio-net-pci.1: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0d
  hub 0
   \ hub0port3: user.1: index=0,type=user,net=10.0.2.0,restrict=off
   \ hub0port2: e1000.0: index=0,type=nic,model=e1000,macaddr=52:54:00:12:34:56
   \ hub0port1: VLANextern: index=0,type=user,net=192.168.42.0,restrict=off
   \ hub0port0: virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:6d:aa:0c

  
  Is it a bug or just misconfigured?

  Thanks in advance.

  BorneBjoern

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu-kvm/+bug/1433510/+subscriptions