Revision 4246a133 image_creator/os_type/windows.py

b/image_creator/os_type/windows.py
37 37
Windows OSs."""
38 38

  
39 39
from image_creator.os_type import OSBase, sysprep, add_sysprep_param
40
from image_creator.util import FatalError, check_guestfs_version
40
from image_creator.util import FatalError, check_guestfs_version, \
41
    get_kvm_binary
41 42
from image_creator.winexe import WinEXE, WinexeTimeout
42 43

  
43 44
import hivex
......
762 763
        # Use ganeti's VNC port range for a random vnc port
763 764
        self.display = random.randint(11000, 14999) - 5900
764 765

  
766
        kvm = get_kvm_binary()
767

  
768
        if kvm is None:
769
            FatalError("Can't find the kvm binary")
770

  
765 771
        args = [
766
            'kvm', '-smp', '1', '-m', '1024', '-drive',
772
            kvm, '-smp', '1', '-m', '1024', '-drive',
767 773
            'file=%s,format=raw,cache=unsafe,if=virtio' % self.disk,
768 774
            '-netdev', 'type=user,hostfwd=tcp::445-:445,id=netdev0',
769 775
            '-device', 'virtio-net-pci,mac=%s,netdev=netdev0' % random_mac(),

Also available in: Unified diff