Fedora Linux Support Community & Resources Center
  #1  
Old 27th June 2007, 05:16 AM
urcabraz Offline
Registered User
 
Join Date: Jun 2007
Posts: 1
Using Ctrl+Alt+2 for QEMU Monitor on guest virtual machines

All,

I have successfully installed WinXP and Fedora 7 virtual machines within my Fedora 7 (x86_64) and am fairly happy so far. I am using:

* QEMU/KVM to run virtual instances (not Xen)
* using 'virsh' to launch virtual machines at host boot-up (from rc.local)
* using 'virt-manager'/'virsh' to bring up/stop virtual machines while
host runs
* maintaining virtual machine configurations in /etc/libvirt/qemu/*.xml
* maintaining virtual network configurations in /etc/libvirt/qemu/networks/*.xml
* using VNC to view and interact with virtual machines displays

WHAT I NEED/WANT: to be able to mount/unmount CD-ROMs, make other configuration changes while the virtual machines are running.

I've found that to do that, while one is using the VNC, one should press the Ctrl+Alt+2 keys to reach the QEMU per-virtual-machine monitor (references: file:///usr/share/doc/qemu-0.9.0/*.html on Fedora 7 install, http://www.kidsquid.com/cgi-bin/moin.cgi/QEMU_Monitor, thread culminating in http://lists.xensource.com/archives/.../msg00254.html).

When I try the Ctrl+Alt+2 thing in VNC, I get a screen with a display "serial0", with no "(qemu)" prompt as was implied in documentation. From what I gather from the aforementioned thread, the Ctrl+Alt+2 thing is disabled by default, won't get you to a QEMU Monitor. Once in the QEMU monitor I should be able to eject CD-ROMs, mount CD-ROMs from host system, etc.

From QEMU documentation I believe the "qemu-kvm" program should be running with the "-serial vc" and perhaps "-monitor vc" to let the VNC session control these. The "qemu-kvm" command line I see with "ps -aef" for the machine in question, as launched by 'virt-manager', appears like this:

Quote:
/usr/bin/qemu-kvm -M pc -m 224 -smp 1 -monitor pty -no-acpi \
-boot c -hda /dev/NoRaidVolGroupB/BogatzaFedora7m01_RootFs \
-net nic,macaddr=00:16:3e:56:4b:5a,vlan=0 -net tap,fd=11,script=,vlan=0 \
-vnc :0
... no appearance of a '-serial' anywhere.

I've seen references for those using Xen on how to use "monitor=yes" configuration, but I don't think that's an option for me, as I don't use Xen configuration. The libvirt (underlying virtualization library for 'virsh' and 'virt-manager') mentions a declaration "console" that might possibly enable the Ctrl+Alt+2 thing. I'm not a Linux/UNIX guru, so I'm not sure quite how to use this or whether it will help.

My current machine configuration, along with the 'console' element, appears like this in /etc/libvirt/qemu/BogatzaFedora7m01.xml:

Quote:
<domain type='kvm'>
<name>BogatzaFedora7m01</name>
<uuid>b1b4fa10-927b-fde1-c6de-eabfbbd8ecf0</uuid>
<memory>229376</memory>
<currentMemory>229376</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='block' device='disk'>
<source dev='/dev/NoRaidVolGroupB/BogatzaFedora7m01_RootFs'/>
<target dev='hda'/>
</disk>
<interface type='network'>
<mac address='00:16:3e:56:4b:5a'/>
<source network='bogatza'/>
<target dev='vnet0'/>
</interface>
<graphics type='vnc' port='-1'/>
<!-- <console tty='/dev/pts/0'/> --> # WHAT DOES ONE DO WITH THIS?
Quote:
</devices>
</domain>
Urca Braz
Reply With Quote
  #2  
Old 1st July 2007, 03:10 AM
cr4ck3r Offline
Registered User
 
Join Date: Oct 2005
Posts: 219
I had the same problem with that, but it seems that we cannot use the virtual console of the guest right now, see http://virt-manager.et.redhat.com/roadmap.html
PS: But I can manually add the CD ISO to guest (when it shut down), by editing the xml configuration file. For the reference about the format of the XML file. Go here http://libvirt.org/format.html
Here is sample configuration file without CD image as a CDROM:
Code:
<domain type='kvm'>
  <name>Windows2003SP2</name>
  <uuid>3df4b9c1-62c9-3644-9515-f4e4a1e68b00</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/home/tinh/virtual-machines/Windows2003SP2/Windows2003SP2'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:57:61:29'/>
      <source network='default'/>
    </interface>
    <graphics type='vnc' port='-1'/>
  </devices>
</domain>
And with the CD Image as CDROM, and boot up from the CDROM
Code:
<domain type='kvm'>
  <name>Windows2003SP2</name>
  <uuid>3df4b9c1-62c9-3644-9515-f4e4a1e68b00</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>  <!--Change this to dev='hd' if you don't want to boot from CD ROM -->
  </os>
  <features>
    <acpi/>
  </features>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='cdrom'>
      <source file='/media/SCSI0_VOL1/Linux_Distros/Windows Server 2003 SP2.iso'/>
      <target dev='hdc'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <source file='/home/tinh/virtual-machines/Windows2003SP2/Windows2003SP2'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:57:61:29'/>
      <source network='default'/>
    </interface>
    <graphics type='vnc' port='-1'/>
  </devices>
</domain>
I also noticed that, after you change the configuration file, you have to reboot, I don't know why virtual-machine-manager does not pick up the changes, even though I restart the virtual-machine-manager.
Hope this may help!
__________________
Linux User number : 451678
Desktop:
AMD X2 3800+, ASUS M2NPV-VM, GeForce 6150 128MB (onboard), 2GB RAM Corsairs 667, ASUS VW192T LCD 19" Widescreen.
Ubuntu 8.04 (Hardy Heron) x86
------------------------
Laptop:
HP Pavilion DV 5000
Fedora 10 (Cambridge) x86
Linux Machine Number: 359564
Reply With Quote
Reply

Tags
alt, ctrl, guest, machines, monitor, qemu, virtual

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtualization - am I creating a kvm guest or qemu bshack Using Fedora 7 23rd September 2009 01:56 AM
Virtual machines with QEMU & KQEMU - Windows XP guide shown, others possible Firewing1 Guides & Solutions (No Questions) 97 25th September 2008 12:58 PM
F8 qemu 0.9.0, XP x64 Guest OS, rtl8139 drivers? early-ehlinger Using Fedora 12 23rd May 2008 11:20 AM
Problem with QEMU and Virtual Machine Manager after updates, guest machine slow otnateos Using Fedora 6 12th April 2008 03:29 PM
QEMU guest networking setup greno Servers & Networking 3 29th May 2007 02:19 AM


Current GMT-time: 13:43 (Thursday, 30-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Congonhas Photos - Picassent - Cannanore Travel Photos on Instagram