jbartlett Posted June 19, 2014 Share Posted June 19, 2014 Converting my CentOS & WHS2011 images from IMG to QCOW didn't seem to work. I think you may have to change how you reference the image in the Xen CFG or the virsh domXML file. I don't think you just convert from RAW to QCOW2 without updating the cfg file. I did, like so: <disk type='file' device='disk'> <source file='/mnt/vm/CentOS/centos.qcow'/> <target dev='hda'/> </disk> Quote Link to comment
jonp Posted June 19, 2014 Author Share Posted June 19, 2014 Converting my CentOS & WHS2011 images from IMG to QCOW didn't seem to work. I think you may have to change how you reference the image in the Xen CFG or the virsh domXML file. I don't think you just convert from RAW to QCOW2 without updating the cfg file. I did, like so: <disk type='file' device='disk'> <source file='/mnt/vm/CentOS/centos.qcow'/> <target dev='hda'/> </disk> I meant I thought that you'd have to specify "type=qcow2" or something like that in the disk or source tags. Glad that it is working for you though! Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 I meant I thought that you'd have to specify "type=qcow2" or something like that in the disk or source tags. Glad that it is working for you though! Did some googling and you're right, the QCOW2 format has it's own type. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/WHS2011/WHS2011.qcow2'/> <target dev='vda' bus='virtio'/> </disk> Unfortunately, WHS2011 couldn't recover from the conversion. Couldn't see it's own OS to boot. Likely driver issues vs XEN. Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 Able to get Windows Repair/Setup to see the OS partition by downloading virtio-win-0.1-81.iso from http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/ and setting it up as a CD. During the installation/repair process, load the VIRTIO driver for the OS in question. Quote Link to comment
jonp Posted June 20, 2014 Author Share Posted June 20, 2014 I meant I thought that you'd have to specify "type=qcow2" or something like that in the disk or source tags. Glad that it is working for you though! Did some googling and you're right, the QCOW2 format has it's own type. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/WHS2011/WHS2011.qcow2'/> <target dev='vda' bus='virtio'/> </disk> Unfortunately, WHS2011 couldn't recover from the conversion. Couldn't see it's own OS to boot. Likely driver issues vs XEN. From the Xen Developers: > I am new to Xen and I am trying to run Intel DPDK inside a domU > with virtio on Xen 4.2. Is it possible to do this? There is no mainline support for virtio under Xen. You can find info on the wiki about a GSoC project from a few years back which prototyped this for some (but not all) configurations, but this was only a prototype and is not ongoing work. Why do you want virtio? The Xen PV drivers have been present in mainline kernels for many years and are enabled in most distros these days. Ian. http://www.gossamer-threads.com/lists/xen/users/316656 Quote Link to comment
jonp Posted June 20, 2014 Author Share Posted June 20, 2014 Able to get Windows Repair/Setup to see the OS partition by downloading virtio-win-0.1-81.iso from http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/ and setting it up as a CD. During the installation/repair process, load the VIRTIO driver for the OS in question. :o If you got it working, then Eric gets a beer on me next time I see him, but this looked like it could be a pain to implement from a development standpoint because it wouldn't be officially supported by the team. Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 I got WHS 2011 to see the hard drive loading the virtio drivers for a image repair but since I didn't have an installation image, I couldn't proceed. I did not try using the virtio drivers under Xen, I tried using an Image that came from Xen and thus had the Xen drivers installed. Kept generating a BSOD. WHS 2011 will not see the qcow2 hard drive using the virtio drivers. Windows 8.1 did see the virtio drivers allowing me to specify the qcow2 drive to install upon. It's installing as I type this. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/Win8/Win8.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <source file='/mnt/vm/setup/Win8.1_64bit.iso'/> <target dev='hda' bus='ide' /> <readonly/> </disk> <disk type='file' device='cdrom'> <source file='/mnt/vm/setup/virtio-win-0.1-81.iso'/> <target dev='hdc' bus='ide' /> <readonly/> </disk> Quote Link to comment
jonp Posted June 20, 2014 Author Share Posted June 20, 2014 I got WHS 2011 to see the hard drive loading the virtio drivers for a image repair but since I didn't have an installation image, I couldn't proceed. I did not try using the virtio drivers under Xen, I tried using an Image that came from Xen and thus had the Xen drivers installed. Kept generating a BSOD. WHS 2011 will not see the qcow2 hard drive using the virtio drivers. Windows 8.1 did see the virtio drivers allowing me to specify the qcow2 drive to install upon. It's installing as I type this. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/Win8/Win8.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <source file='/mnt/vm/setup/Win8.1_64bit.iso'/> <target dev='hda' bus='ide' /> <readonly/> </disk> <disk type='file' device='cdrom'> <source file='/mnt/vm/setup/virtio-win-0.1-81.iso'/> <target dev='hdc' bus='ide' /> <readonly/> </disk> Well done sir! That was going in one of my next guides for setting up a Windows VM with VirtIO! I love it when folks figure it out on their own!! So to clarify, you are booted into non-Xen mode then and doing this (so you are using virsh with KVM)? I would also actually suggest this as well: <memballoon model='virtio'/> Drivers for it are on the same ISO you have. Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 KVM: Changing CD image on the fly. Run the following command to get the name of the CD ROM ID, replace WHS2001 with your domain name. virsh qemu-monitor-command --domain WHS2011 --hmp --cmd "info block" Results: drive-virtio-disk0: /mnt/vm/WHS2011/WHS2011.qcow2 (qcow2) drive-ide0-0-0: /mnt/vm/setup/WHS2011.iso (raw, read-only) Removable device: not locked, tray closed "drive-ide0-0-0" is the CD ROM ID. Run the following to load a new ISO, replace domain name and image path to suit your needs virsh qemu-monitor-command --domain WHS2011 --hmp --cmd "change drive-ide0-0-0 /mnt/vm/setup/virtio-win-drivers-20120712-1.iso" Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 Well done sir! That was going in one of my next guides for setting up a Windows VM with VirtIO! I love it when folks figure it out on their own!! So to clarify, you are booted into non-Xen mode then and doing this (so you are using virsh with KVM)? Correct. I have booted into non-Xen mode and am using virsh. With Windows, you can't use <input type='mouse' bus='ps2'/> because the mouse and pointer aren't in sync when using VNC. Had to add a USB bus and then use a tablet input. Windows 8.1 installed like a dream though you need to disable the hybrid boot function under Control Panel > Power Settings in order to keep the boot from hanging every other boot which forces you to destroy the VM and start it again. During the install process, it'll prompt you to select a drive to install on but none will be listed. Click on the load driver button and navigate to the CD ROM device with the virtio drivers and select Win8/AMD64 (or whatever OS you're installing - note: None seems to work with WHS 2011) Here is my Win8.1 XML file: <domain type="kvm"> <name>Win8</name> <uuid>d9fce53d-a056-4096-a05a-a79c2f852df9</uuid> <!-- uuidgen --> <memory unit="GB">2</memory> <currentMemory unit="GB">2</currentMemory> <vcpu>2</vcpu> <os> <type arch="x86_64" machine="q35">hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev="cdrom" /> </os> <features> <acpi /> </features> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <disk type="file" device="disk"> <driver name="qemu" type="qcow2" /> <source file="/mnt/vm/Win8/Win8.qcow2" /> <target dev="vda" bus="virtio" /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/Win8.1_64bit.iso" /> <target dev="hda" bus="ide" /> <readonly /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/virtio-win-0.1-81.iso" /> <target dev="hdc" bus="ide" /> <readonly /> </disk> <graphics type="vnc" port="5902"> <listen type="address" address="0.0.0.0" /> </graphics> <interface type="bridge"> <source bridge="br0" /> <mac address='52:54:00:00:00:00'/> </interface> <emulator>/usr/bin/qemu-system-x86_64</emulator> <!-- <input type='mouse' bus='ps2' /> --> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> <input type='tablet' bus='usb'/> <memballoon model="virtio" /> </devices> </domain> Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 (Update: While the img drive is seen, WHS 2011 install doesn't seem to be takes forever expanding the files) Here's the configuration for installing WHS 2011 in a VM. <domain type="kvm"> <name>WHS2011</name> <uuid>e15a9bd1-e768-407d-b5ed-d13f95591cfc</uuid><!-- uuidgen --> <memory unit="GB">2</memory> <currentMemory unit="GB">2</currentMemory> <vcpu>2</vcpu> <os> <type arch="x86_64" machine="q35">hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev="cdrom" /> </os> <features> <acpi /> </features> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <disk type="file" device="disk"> <source file="/mnt/vm/WHS2011/WHS2011.img" /> <target dev="hda" /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/WHS2011.iso" /> <target dev="hdc" bus="ide" /> <readonly /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/virtio-win-0.1-81.iso" /> <target dev="hdd" bus="usb" /> <readonly /> </disk> <graphics type="vnc" port="5901"> <listen type="address" address="0.0.0.0" /> </graphics> <interface type="bridge"> <source bridge="br0" /> <mac address='52:54:00:00:00:01'/> </interface> <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> <input type='tablet' bus='usb'/> <memballoon model="virtio" /> </devices> </domain> Creating a 160GB RAW image file (WHS won't install on less than 160GB): qemu-img create -f raw WHS2011.img 160G KVM didn't like having three IDE devices so I change the bus type on the virtio driver CD to USB. The WHS 2011 saw the IMG drive without requiring drivers. (Note: I changed my bridge back to "br0") Quote Link to comment
GHunter Posted June 20, 2014 Share Posted June 20, 2014 I meant I thought that you'd have to specify "type=qcow2" or something like that in the disk or source tags. Glad that it is working for you though! Did some googling and you're right, the QCOW2 format has it's own type. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/WHS2011/WHS2011.qcow2'/> <target dev='vda' bus='virtio'/> </disk> Unfortunately, WHS2011 couldn't recover from the conversion. Couldn't see it's own OS to boot. Likely driver issues vs XEN. You can also use your converted qcow2 file in Xen and xl by changing this line in your cfg file: disk = ['file:/mnt/SSD/Xen/Windows7/Windows7.img,hda,w'] to this: disk = ['qcow2:/mnt/SSD/Xen/Windows7/Windows7.qcow2,hda,w'] There are a few other ways to do this but I know this works in the webgui too. Quote Link to comment
jonp Posted June 20, 2014 Author Share Posted June 20, 2014 I meant I thought that you'd have to specify "type=qcow2" or something like that in the disk or source tags. Glad that it is working for you though! Did some googling and you're right, the QCOW2 format has it's own type. <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm/WHS2011/WHS2011.qcow2'/> <target dev='vda' bus='virtio'/> </disk> Unfortunately, WHS2011 couldn't recover from the conversion. Couldn't see it's own OS to boot. Likely driver issues vs XEN. You can also use your converted qcow2 file in Xen and xl by changing this line in your cfg file: disk = ['file:/mnt/SSD/Xen/Windows7/Windows7.img,hda,w'] to this: disk = ['qcow2:/mnt/SSD/Xen/Windows7/Windows7.qcow2,hda,w'] There are a few other ways to do this but I know this works in the webgui too. Thanks for sharing this! Some folks that have been trying to access a QCOW2 image in Xen may find this to resolve their issues! Quote Link to comment
jbartlett Posted June 20, 2014 Share Posted June 20, 2014 Running Windows Home Server 2011 in a QCOW2 container Based in part on http://serverfault.com/questions/452854/getting-windows-virtio-mounted-installed-for-kvm/452857#452857 Create the IMG drive at least 160GB in size, WHS will not install on less: qemu-img create -f raw WHS2011.img 160G Update your XML file to include the IMG drive and the WHS2011/VirtIO driver CD's <disk type="file" device="disk"> <source file="/mnt/vm/WHS2011/WHS2011.img" /> <target dev="hda" /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/WHS2011.iso" /> <target dev="hdc" bus="usb" /> <readonly /> </disk> <disk type="file" device="cdrom"> <source file="/mnt/vm/setup/virtio-win-0.1-81.iso" /> <target dev="hdd" bus="usb" /> <readonly /> </disk> Install & patch WHS2011. Shut down the VM, create a temp virtio drive of any size and add it to the XML file: qemu-img create -f raw temp.qcow2 10G <disk type="file" device="disk"> <driver name="qemu" type="qcow2" /> <source file="/mnt/vm/WHS2011/temp.qcow2" /> <target dev="vda" bus="virtio" /> </disk> Start WHS 2011, view the Device Manager via "Diagnostics > Device Manager" in the Server Manager Right click on SCSI Controller, and choose Update Device Driver. Choose to Browse my computer for driver software. Navigate to the CD with the virtio drivers and select Win7/AMD64, click Next You will be prompted to install the "Red Hat VirtIO SCSI controller", do so. Confirm you can see the qcow2 drive by viewing "Storage > Disk Management" in the Server Manager. Optional if you want to initilize it. In the Device Manager, Right click on "PCI Device" under Other devices, and choose Update Device Driver. Choose to Browse my computer for driver software. Navigate to the CD with the virtio drivers and select Win7/AMD64, click Next It should detect and install the "VirtIO Baloon Driver". Shut down WHS 2011 and back up your IMG file. Backing up and coverting will go faster if the source & destination are on different drives. Convert the IMG file to qcow2 format: qemu-img convert -O qcow2 original-image.img image-converted.qcow2 Update your XML file to comment out the IMG drive reference and update the temp qcow2 drive reference to reflect your converted qcow2 drive <disk type="file" device="disk"> <driver name="qemu" type="qcow2" /> <source file="/mnt/vm/WHS2011/WHS2011.qcow2" /> <target dev="vda" bus="virtio" /> </disk> Start the WHS 2011 VM. If it boots, you are now running WHS 2011 under a qcow2 container. Quote Link to comment
bonzi Posted June 21, 2014 Share Posted June 21, 2014 Hi, I can start my VM with KVM but it does not show up on the network. Must have done something wrong but I don't know what it is. Here is my xml: <domain type='kvm'> <name>ubuntu</name> <uuid>554cbf6b-aa75-4044-b1b3-c1005bea6062</uuid> <memory unit='GB'>2</memory> <currentMemory unit='GB'>2</currentMemory> <vcpu>2</vcpu> <os> <type arch='x86_64' machine='q35'>hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev='cdrom'/> </os> <features> <acpi/> </features> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <!-- VIRTUAL DISK (IMG)--> <disk type='file' device='disk'> <source file='/mnt/cache/VM/ubuntu/ubuntu.img'/> <target dev='hda'/> </disk> <graphics type='vnc' port='5900'> <listen type='address' address='0.0.0.0'/> </graphics> <interface type='bridge'> <mac address='00:16:3e:aa:bb:cc'/> <source bridge='br0'/> </interface> <emulator>/usr/bin/qemu-system-x86_64</emulator> <input type='mouse' bus='ps2'/> </devices> </domain> virsh list Id Name State ---------------------------------------------------- 2 ubuntu running ifconfig br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.205 netmask 255.255.255.0 broadcast 192.168.1.255 ether 70:71:bc:3c:cf:47 txqueuelen 0 (Ethernet) RX packets 1739 bytes 158621 (154.9 KiB) RX errors 0 dropped 46 overruns 0 frame 0 TX packets 1309 bytes 413080 (403.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500 ether 70:71:bc:3c:cf:47 txqueuelen 1000 (Ethernet) RX packets 1829 bytes 197262 (192.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1594 bytes 437390 (427.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xf0500000-f0520000 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 86 bytes 7320 (7.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 86 bytes 7320 (7.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether fe:16:3e:aa:bb:cc txqueuelen 500 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 569 bytes 49189 (48.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 I feel I must have missed something very obvious but I don't know what it could be... Quote Link to comment
jonp Posted June 21, 2014 Author Share Posted June 21, 2014 Try changing machine="q35" to "pc". Just curious if this has an impact. Quote Link to comment
peter_sm Posted June 21, 2014 Share Posted June 21, 2014 Try to add the virtio driver for ethernet I always used that for all KVM machines. If you like you can delete <mac address='00:16:3e:aa:bb:cc'/> After you started the machine, you can do.. virsh dumpxml vmmachine > newfile.xml Then you have MC address and all other settings that it's add during define in the new file. //Peter Quote Link to comment
bonzi Posted June 21, 2014 Share Posted June 21, 2014 Try changing machine="q35" to "pc". Just curious if this has an impact. Thanks, but it didn't change the behavior. Try to add the virtio driver for ethernet I always used that for all KVM machines. If you like you can delete <mac address='00:16:3e:aa:bb:cc'/> After you started the machine, you can do.. virsh dumpxml vmmachine > newfile.xml Then you have MC address and all other settings that it's add during define in the new file. //Peter I tried this too but it didn't seem to have any effect. Here is the xml after running virsh dumpxml ubuntu <domain type='kvm' id='2'> <name>ubuntu</name> <uuid>554cbf6b-aa75-4044-b1b3-c1005bea6062</uuid> <memory unit='KiB'>1953792</memory> <currentMemory unit='KiB'>1953128</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev='cdrom'/> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/mnt/cache/VM/ubuntu/ubuntu.img'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='00:16:3e:aa:bb:cc'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5900' autoport='no' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none'/> </domain> Quote Link to comment
bonzi Posted June 21, 2014 Share Posted June 21, 2014 Is there any way in KVM to get into the console of a VM locally? Quote Link to comment
jonp Posted June 21, 2014 Author Share Posted June 21, 2014 VNC. That is the only way without modifying some tty settings in the guest first. You have to vnc into the host IP and at the port you specify in the vnc setting in the XML file. Sent from my Nexus 5 using Tapatalk Quote Link to comment
bonzi Posted June 21, 2014 Share Posted June 21, 2014 Yep, I know how to do that. Unfortunately it is not going to work if the VM is not getting an ip address on the network Quote Link to comment
bonzi Posted June 21, 2014 Share Posted June 21, 2014 Sorry to keep cluttering this thread, but the reason I do not use Xen is because I have problems loading the disks which are connected to my LSI card when I boot to Xen in Unraid. This sorta worked in beta5a although there were problems that I reported. Now it is completely broken in 6. Syslog is attached. If I boot UnRaid without Xen then there are no problems. syslog.txt Quote Link to comment
peter_sm Posted June 22, 2014 Share Posted June 22, 2014 VNC. That is the only way without modifying some tty settings in the guest first. You have to vnc into the host IP and at the port you specify in the vnc setting in the XML file. Sent from my Nexus 5 using Tapatalk Its' only need some modification on guest boot loader and adding support for ttys0 I have it working on Ubuntu using grub2 and Arch using lilo on my KVM machines For Ubunto you can do this sudo cp /etc/init/tty1.conf /etc/init/ttyS0.conf edit ttyS0.conf and change the line: exec /sbin/getty -8 115200 ttyS0 xterm sudo vi /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT=”console=ttyS0? sudo update-grub2 in the guest xml file <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/3'> <source path='/dev/pts/3'/> <target type='serial' port='0'/> </console> My Ubuntu config file <domain type='kvm'> <name>Ubuntu</name> <uuid>8b7fe50c-078c-4ef8-9637-c3ee90f6299d</uuid> <memory unit='KiB'>2194304</memory> <currentMemory unit='KiB'>2194304</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='host-passthrough'> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/mnt/vm_disk/KVM/Ubuntu/ubuntuserver.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/vm_disk/ISO/ubuntu-14.04-server-amd64.iso'/> <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> </disk> <controller type='ide' index='0'> </controller> <controller type='pci' index='0' model='pcie-root'> </controller> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/cache/'/> <target dir='cache'/> </filesystem> <interface type='bridge'> <mac address='52:54:00:7a:be:b3'/> <source bridge='br0'/> <model type='virtio'/> </interface> <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/3'> <source path='/dev/pts/3'/> <target type='serial' port='0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no' listen='192.168.0.190' keymap='sv'> <listen type='address' address='192.168.0.190'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> </memballoon> </devices> <seclabel type='none'/> </domain> //Peter Quote Link to comment
bonzi Posted June 22, 2014 Share Posted June 22, 2014 VNC. That is the only way without modifying some tty settings in the guest first. You have to vnc into the host IP and at the port you specify in the vnc setting in the XML file. Sent from my Nexus 5 using Tapatalk Its' only need some modification on guest boot loader and adding support for ttys0 I have it working on Ubuntu using grub2 and Arch using lilo on my KVM machines Thanks Peter, this is really helpful, someone should add this to a guide. Unfortunately I didn't see this though until I had sorted out the problem myself. I ended up booting the VM in Xen on a different computer and found that it was not getting an ip address. I gave it a static address, copied it back over, and now I can see it on the network after I bring it up with KVM. Quote Link to comment
monkeytsar Posted June 25, 2014 Share Posted June 25, 2014 I was looking to move my Win7, Win8 and Pfsense VM's over from XEN to KVM but i think i'm just going to recreate them from scratch as KVM machines. I've got pretty good at creating XEN .cfg files with PCI pass through but this will be my first KVM .xml. Can anyone post and example of a full KVM .xml with PCI pass through so that i can use it as a guide? I've had a look through the forums but i havnet been able to find an example with pass through. Thanks Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.