Windows Server 2003 on Ubuntu 8.10 + LVM + KVM

Discussion in 'HOWTO-Related Questions' started by gezley, Jan 22, 2009.

  1. gezley

    gezley New Member

    Hi,
    I followed Falko's guide to setting up Ubuntu 8.10 with LVM and KVM, but as it's for Linux VMs I'm not sure how to go about creating a Windows 2003 VM.
    Is it possible to use LVM with Windows VMs as well as Linux VMs, or is LVM just for Linux VMs? I take it I need to use virt-install instead of vmbuilder if so?
    For Windows do I need to create an image first and then convert it to LVM with qemu-image?
    And finally, which tool do I use to manage the VM once created?
    Thank you.
     
  2. Miguel

    Miguel HowtoForge Supporter

    Well gzeley,

    Here is an example to install another OS than ubuntu with bridged networking:

    sudo virt-install --connect qemu:///system --hvm -n xpsp2 -r 512 -f windows.qcow2 -s 12 -c windowsxpsp2.iso --vnc --noautoconsole --os-type windows --os-variant winxp -network=bridge:br0

    --hvm: type of hypervisor (is used for KVM/Qemu)
    -n xpsp2 ==>virtual machine name
    -r 512 ==> amount of memory
    -f windows.qcow2 ==> virtual hard disk name and type
    -c name of the cdrom (image)
    -network=bridge ==> type of network, br0 ==> bridge name

    sudo virt-install --connect qemu:///system -n xpsp2 -r 512 -f /vm/vmwin/windows.qcow2 -s 12 -c /vm/iso/windowsxpsp2.iso --vnc --noautoconsole --os-type windows --os-variant winxp -network=bridge

    For example will install the vm in /vm/vmwin and will connect the (virtual) cdrom drive to the /vm/iso/windowsxpssp2.iso.

    Take into account that you need the vm manager or another type of console to continue the install of windows graphically.

    Local machine: virt-viewer -c qemu:///system xpsp2
    Remote machine: virt-viewer -c qemu+ssh://ip/system xpsp2

    In the graphical system you need to set the ip for the host. Afterwards edit / review the created /etc/libvirt/qemu/createdhost.xml to check if the network settings are correct for the network type (bridged).

    see https://help.ubuntu.com/community/KVM/ for additional information.

    Have fun setting it up.;)
     
    Last edited: Jan 23, 2009
  3. gezley

    gezley New Member

    That's very helpful.

    One thing that I can't get my head around is how a Windows VM disk image is written to disk. Falko says to use LVM for disk-intensive KVM Virtual Machines: does this apply to a Windows guest as well? If so, do I need to convert the image using the qemu converter?

    And can a Windows disk image be written to the disk as a raw block device? I presume this would be the fastest of all solutions.
     
  4. Miguel

    Miguel HowtoForge Supporter

    Last edited: Jan 23, 2009
  5. qiubosu

    qiubosu New Member

    install windows server 2003 onto the sun virtual box installed in ubuntu desktop

    hi there,

    does anyone know whether it is available to install windows server 2003 onto the sun virtual box installed in the ubuntu desktop? if yes, how? i tried this on sun virtual box installed in the ubuntu desktop, but the windows server 2003 can't be started when in the cd rom. does anyone know why?
     
  6. Nakarti

    Nakarti New Member

    Doesn't answer the question.

    The Windows install line is useful, but like all the ones I have been searching for, does not answer the question:
    How do you get KVM to *work* with Windows (XP or 2003) as a guest ON LVM DISK NOT IMAGE DISK.

    Xen is able to do this so easily, why can't KVM?
     

Share This Page