Revision 596b2459 lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
654 654
    if mem_path:
655 655
      kvm_cmd.extend(["-mem-path", mem_path, "-mem-prealloc"])
656 656

  
657
    monitor_dev = ("unix:%s,server,nowait" %
658
                   self._InstanceMonitor(instance.name))
659
    kvm_cmd.extend(["-monitor", monitor_dev])
660
    if hvp[constants.HV_SERIAL_CONSOLE]:
661
      serial_dev = ("unix:%s,server,nowait" %
662
                    self._InstanceSerial(instance.name))
663
      kvm_cmd.extend(["-serial", serial_dev])
664
    else:
665
      kvm_cmd.extend(["-serial", "none"])
666

  
657 667
    mouse_type = hvp[constants.HV_USB_MOUSE]
658 668
    vnc_bind_address = hvp[constants.HV_VNC_BIND_ADDRESS]
669
    spice_bind = hvp[constants.HV_KVM_SPICE_BIND]
670
    spice_ip_version = None
659 671

  
660 672
    if mouse_type:
661 673
      kvm_cmd.extend(["-usb"])
......
707 719
        vnc_arg = "unix:%s/%s.vnc" % (vnc_bind_address, instance.name)
708 720

  
709 721
      kvm_cmd.extend(["-vnc", vnc_arg])
710
    else:
711
      kvm_cmd.extend(["-nographic"])
712

  
713
    monitor_dev = ("unix:%s,server,nowait" %
714
                   self._InstanceMonitor(instance.name))
715
    kvm_cmd.extend(["-monitor", monitor_dev])
716
    if hvp[constants.HV_SERIAL_CONSOLE]:
717
      serial_dev = ("unix:%s,server,nowait" %
718
                    self._InstanceSerial(instance.name))
719
      kvm_cmd.extend(["-serial", serial_dev])
720
    else:
721
      kvm_cmd.extend(["-serial", "none"])
722

  
723
    spice_bind = hvp[constants.HV_KVM_SPICE_BIND]
724
    spice_ip_version = None
725
    if spice_bind:
722
    elif spice_bind:
726 723
      if netutils.IsValidInterface(spice_bind):
727 724
        # The user specified a network interface, we have to figure out the IP
728 725
        # address.
......
768 765
      logging.info("KVM: SPICE will listen on port %s", instance.network_port)
769 766
      kvm_cmd.extend(["-spice", spice_arg])
770 767

  
768
    else:
769
      kvm_cmd.extend(["-nographic"])
770

  
771 771
    if hvp[constants.HV_USE_LOCALTIME]:
772 772
      kvm_cmd.extend(["-localtime"])
773 773

  

Also available in: Unified diff