Guest shutdown problems
by Christian Axelsson
Hello
I have a problem shutting down xen guests. Using xm shutdown guests get
shut down but gets stuck in state '---s-d' or sometimes '------'.
When trying to clone a domain when in this state (my original purpose of
the whole operation) I'll get the error:
[root@hydra virtinst--devel]# ./virt-clone -o minimal -n new_img -f
/var/lib/xen/images/new_img.img
ERROR: virDomainGetXMLDesc() failed failed Xen syscall
xenDaemonDomainDumpXMLByID failed to find this domain -490299505
The same errors occurs when for example trying to attach to the console
using virsh.
I have tried to use 'xm destroy' to kill the guest the hard way but it
has no effect - the state remains unchanged. I have also tried this on a
few different guest installations with the same result. A thing worth
noting is that the output from 'xm list --long' differs, I've attached
the out put pre boot, after boot and after shutdown. Note how all the
devices in the guests are missing after shutdown.
Both the hosts and the guests are fedora 8 installations.
Regards,
Christian Axelsson
smiler(a)lanil.mine.nu
[?1034h(domain
(domid 0)
(on_crash restart)
(uuid 00000000-0000-0000-0000-000000000000)
(bootloader_args )
(vcpus 2)
(name Domain-0)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 16777215)
(memory 1491)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(cpu_time 1644.84369405)
(online_vcpus 2)
(image (linux (kernel )))
(status 2)
(state r-----)
)
(domain
(domid 2)
(on_crash restart)
(uuid a7638797-e237-3891-5e64-390f828238ca)
(bootloader_args )
(vcpus 1)
(name minimal)
(on_poweroff destroy)
(on_reboot restart)
(bootloader /usr/bin/pygrub)
(maxmem 512)
(memory 512)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1206360333.14)
(cpu_time 9.753408915)
(online_vcpus 1)
(image
(linux
(kernel )
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 18446744071562067968)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564189696)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 2)
(state -b----)
(store_mfn 196619)
(console_mfn 196618)
(device
(vif
(bridge xenbr0)
(mac 00:16:3e:3f:93:b8)
(script vif-bridge)
(uuid 94afd732-920b-2e0b-b3d5-e79174754a80)
(backend 0)
)
)
(device
(vbd
(uname file:/var/lib/xen/images/minimal.img)
(uuid 8f4f4da3-5f8a-3fee-28e8-41dc49e876cd)
(mode w)
(dev xvda:disk)
(backend 0)
(bootable 1)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 0046f2d3-058b-d524-9273-f1dac2ca950b)
)
)
)
[?1034h(domain
(domid 0)
(on_crash restart)
(uuid 00000000-0000-0000-0000-000000000000)
(bootloader_args )
(vcpus 2)
(name Domain-0)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 16777215)
(memory 1491)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(cpu_time 1648.92600832)
(online_vcpus 2)
(image (linux (kernel )))
(status 2)
(state r-----)
)
(domain
(domid 2)
(on_crash restart)
(uuid a7638797-e237-3891-5e64-390f828238ca)
(bootloader_args )
(vcpus 1)
(name minimal)
(on_poweroff destroy)
(on_reboot restart)
(bootloader /usr/bin/pygrub)
(maxmem 512)
(memory 512)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1206360333.14)
(cpu_time 13.048743365)
(online_vcpus 1)
(image
(linux
(kernel )
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 18446744071562067968)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564189696)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 0)
(state ---s-d)
(store_mfn 196619)
(console_mfn 196618)
)
[?1034h(domain
(domid 0)
(on_crash restart)
(uuid 00000000-0000-0000-0000-000000000000)
(bootloader_args )
(vcpus 2)
(name Domain-0)
(on_poweroff destroy)
(on_reboot restart)
(bootloader )
(maxmem 16777215)
(memory 1491)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(cpu_time 1635.21430615)
(online_vcpus 2)
(image (linux (kernel )))
(status 2)
(state r-----)
)
(domain
(on_crash restart)
(uuid a7638797-e237-3891-5e64-390f828238ca)
(bootloader_args )
(vcpus 1)
(name minimal)
(on_poweroff destroy)
(on_reboot restart)
(bootloader /usr/bin/pygrub)
(maxmem 512)
(memory 512)
(shadow_memory 0)
(cpu_weight 256)
(cpu_cap 0)
(features )
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1206309092.82)
(cpu_time 0.0)
(image
(linux
(kernel )
(notes
(FEATURES
'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
)
(VIRT_BASE 18446744071562067968)
(GUEST_VERSION 2.6)
(PADDR_OFFSET 18446744071562067968)
(GUEST_OS linux)
(HYPERCALL_PAGE 18446744071564189696)
(LOADER generic)
(SUSPEND_CANCEL 1)
(ENTRY 18446744071564165120)
(XEN_VERSION xen-3.0)
)
)
)
(status 0)
(device
(vif
(bridge xenbr0)
(mac 00:16:3e:3f:93:b8)
(backend 0)
(uuid 94afd732-920b-2e0b-b3d5-e79174754a80)
(script vif-bridge)
)
)
(device
(vbd
(uuid 8f4f4da3-5f8a-3fee-28e8-41dc49e876cd)
(bootable 1)
(driver paravirtualised)
(dev xvda:disk)
(uname file:/var/lib/xen/images/minimal.img)
(mode w)
(backend 0)
)
)
(device
(console
(protocol vt100)
(location 2)
(uuid 0046f2d3-058b-d524-9273-f1dac2ca950b)
)
)
)
14 years, 5 months
Should kernel 2.6.27.5-41.fc9 boot as xen guest?
by M A Young
I was trying to get a NVIDIA video driver working with the Fedora 9 kernel
2.6.27.5-41.fc9 (on x86_64) and it refused because it decided it was a xen
kernel, so I thought I would check this claim out.
My attempts to boot a xen guest with that kernel failed, though it got
past the boot loader stage, and I know Fedora 9 has kernel-xen packages,
but I was wondering whether this kernel would be expected to work or not.
Michael Young
14 years, 8 months
Turning off virt-manager dhcp and dns
by Stephen Johnston
Hi
I have virt-manager with a static ip'ed windows server 2003 and a win xp
client so I can play with active directory etc for work. All under
Fedora 10 beta.
Can someone tell me if I can turn off the dhcp and dns in the
virt-manager framework (vibr0) as it is handing out an ip to my client
before the virtual windows server does. I believe this is confusing the
issue when I try to join the client to my virtual windows domain.
I only wish the virt-manager to nat vibr0 to my physical nic so i can
provide the other config items from within my virtual network.
Thank you.
Stephen
--
Stephen Johnston 8 Lime Grove
Tel. +44 (0)1506 437766 Craigshill
Mob. 07786 733 150 Livingston
West Lothian
EH54 5FB
14 years, 8 months
Create multiple loopback devices
by Guillaume
Hi
I would like to know if it is possible to create multiple loopback
ethernet device. And if yes, how to create new one.
The purpose of this is to attach to many vm this interface, and then,
share this private network between these vm.
Thanks.
--
Guillaume
14 years, 8 months
VFS: Cannot open root device
by Siddharth Wagh
how do i know what the root partition is?
i gave the option:
root="/dev/hda"
in the config file.
Thanks & Regards,
Siddharth Wagh
-----------------------------------------------------------------------------------------
To ensure perfect aim, shoot first and call whatever you hit the target...
-----------------------------------------------------------------------------------------
14 years, 9 months
Problem Having Fedora 10 Guest See USB Devices (AVC Denied Message, Too...)
by Robert L Cochran
I have a Fedora 10 x86_64 host running a Fedora 10 x86_64 guest under
KVM. I want to be able to plug a USB flash drive in and have the guest
able to read and write to that device. According to the libvirt.org XML
format suggestions, the way to that is with a <hostdev> container. Here
is how I added it to the xml for my guest machine. Note that this
doesn't mean I added it correctly, though:
<domain type='kvm'>
<name>fedora10x64</name>
<uuid>33e7e731-4e18-dd90-222e-b1df83a76cad</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset="localtime"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/fedora10x64.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x12f7'/>
<product id='0x1a00'/>
</source>
</hostdev>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<sound model='es1370'/>
</devices>
</domain>
When I launch Virtual Machine Manager, open the Fedora 10 guest, and
click the Run button, I get an immediate AVC denied message.
Dec 20 13:54:45 deafeng3 setroubleshoot: SELinux is preventing qemu
(qemu-kvm) "read" to ./devices (usbfs_t). For complete SELinux messages.
run sealert -l 33327e80-28c3-460a-a759-dfae737c863b
Here are the `sealert` details:
[root@deafeng3 qemu]# sealert -l 33327e80-28c3-460a-a759-dfae737c863b
Summary:
SELinux is preventing qemu (qemu-kvm) "read" to ./devices (usbfs_t).
Detailed Description:
SELinux denied qemu access to ./devices. If this is a virtualization
image, it
has to have a file context label of virt_image_t. The system is setup to
label
image files in directory./var/lib/libvirt/images correctly. We recommend
that
you copy your image file to /var/lib/libvirt/images. If you really want
to have
your qemu image files in the current directory, you can relabel
./devices to be
virt_image_t using chcon. You also need to execute semanage fcontext -a -t
virt_image_t './devices' to add this new path to the system defaults. If
you did
not intend to use ./devices as a qemu image it could indicate either a
bug or an
intrusion attempt.
Allowing Access:
You can alter the file context by executing chcon -t virt_image_t
'./devices'
You must also change the default file context files on the system in
order to
preserve them even on a full relabel. "semanage fcontext -a -t virt_image_t
'./devices'"
Fix Command:
chcon -t virt_image_t './devices'
Additional Information:
Source Context system_u:system_r:qemu_t:s0
Target Context system_u:object_r:usbfs_t:s0
Target Objects ./devices [ file ]
Source qemu-kvm
Source Path /usr/bin/qemu-kvm
Port <Unknown>
Host deafeng3.signtype.info
Source RPM Packages kvm-74-6.fc10
Target RPM Packages
Policy RPM selinux-policy-3.5.13-34.fc10
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name qemu_file_image
Host Name deafeng3.signtype.info
Platform Linux deafeng3.signtype.info
2.6.27.7-134.fc10.x86_64 #1 SMP Mon Dec 1
22:21:35
EST 2008 x86_64 x86_64
Alert Count 3
First Seen Fri Dec 19 11:01:52 2008
Last Seen Sat Dec 20 13:54:45 2008
Local ID 33327e80-28c3-460a-a759-dfae737c863b
Line Numbers
Raw Audit Messages
node=deafeng3.signtype.info type=AVC msg=audit(1229799285.706:69): avc:
denied { read } for pid=4276 comm="qemu-kvm" name="devices" dev=usbfs
ino=341 scontext=system_u:system_r:qemu_t:s0
tcontext=system_u:object_r:usbfs_t:s0 tclass=file
node=deafeng3.signtype.info type=SYSCALL msg=audit(1229799285.706:69):
arch=c000003e syscall=2 success=no exit=-13 a0=54c733 a1=0 a2=1b6
a3=7fe48d8d16f0 items=0 ppid=2903 pid=4276 auid=4294967295 uid=0 gid=0
euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295
comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:qemu_t:s0
key=(null)
Is there a way to fix this so I can have my Fedora 10 guest read and
write to USB devices?
Thanks
Bob Cochran
14 years, 9 months
[Fwd: Re: [Fedora-xen] Using Wireless Connection In KVM]
by Robert L Cochran
Daniel P. Berrange wrote:
> On Wed, Dec 17, 2008 at 05:39:03PM -0500, Robert L Cochran wrote:
>
>> How can I get my Fedora 10 guest to use a wireless connection? Do I need
>> to configure a wireless "bridge" adapter? That is, if the wired adapter
>> bridge is ifcfg-eth0 referencing "br0" perhaps I need a second named
>> ifcfg-wlan0 referencing "br1"?
>>
>> In short: does anyone have wireless working for Fedora 10, KVM guests?
>> If yes, can the configuration details be shared with me? I'm dying to
>> use wireless in my guest. Laptops were never meant for long trailing
>> wires if you ask me...
>>
>
> Wireless + bridging == fail.
>
> When creating the guest you should use libvirt's 'default' virtual
> network, which is NAT based and specifically designed to play nicely
> with NetworkManager
>
> http://wiki.libvirt.org/page/Networking
>
> So no matter what wifi network/adress your host has, the guest will still
> get outbound traffic through
>
> Daniel
>
Thanks for the advice. I want to be able to use wireless, but still get
a specific IP address on my home network in the 192.168.1.x range. The
virtual network doesn't use that address range by default. I guess I
could kludge this...I'll have to think carefully about the networking
that I'm doing.
Bob
14 years, 9 months
RE: Urgent Help Required: FC10 as DomU on FC8 as Dom0
by MOHAMMAD MATEEN ASLAM
I have FC8 running as dom0 and i want to install FC10 as domU. I have installed python-virtinst-0.300.2-5.fc8 from fedora standard repo on FC8. But still i am unable to boot FC10 kernel on FC8.
Following error comes when I try to boot F10 with Ramdisk created on FC8/ Dom0.
# xm create -c xxx.cfg
........
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Booting has failed.
....................................................................
Here is my xen configuration file.
-----------------------------------------
kernel = "/boot/vmlinuz-2.6.27.7-134.fc10.i686.PAE"
ramdisk = "/boot/initrd-2.6.27.7-134.fc10.i686.PAE-DomU.img"
memory = 128
name = "xxxx"
vif = [ 'ip=xx.xxx.xxxx.xxx' ]
disk = ['tap:aio:/var/vm13/root,sda1,w', 'tap:aio:/var/vm13/var,sda2,w', 'tap:aio:/var/vm13/swap,sda3,w']
root = "/dev/sda1 ro"
on_reboot = 'restart'
on_crash = 'restart'
------------------------------------------
How to boot FC-10 as domU on FC8? I will appreciate help from xen experts.
Regards. Mateen
_________________________________________________________________
Send e-mail anywhere. No map, no compass.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_anyw...
14 years, 9 months
Dom0 Xen kernel on Fedora 10
by M A Young
I have succeeded in getting a fedora based kernel to build with Dom0
patches added. The steps were roughly as follows;
1. Start from kernel-2.6.28-0.106.rc6.git4.fc11.src.rpm
2. Create a patch from http://xenbits.xen.org/paravirt_ops/patches.hg/
changeset 2238 by concatenating those patches listed in the series file
(excluding those commented out) together.
3. Edit kernel.spec to revert to plain rc6 (which the pvops patches seem
currently to be based on though some patches from rc8 seem to be included
in the x86/x86.patch file), add the combined patch, and increase the fuzz
factor to 2 so it applies.
4. Make several edits to the source files and configuration options to get
it to compile on F10. Some of these, such as the couple I have so far
reported on http://bugzilla.redhat.org/ (476456 and 476457), are due to
code problems that show up because the F10 compiler seems to be a bit
better at checking for errors.
If anyone wants to inspect it, the source rpm generated is at
http://compsoc.dur.ac.uk/~may/xen/kernel-2.6.28-0.106.rc6.fc10.src.rpm
It is completely untested beyond the fact that it compiles for me, so I
have no idea if a kernel built from it will actually boot.
Michael Young
14 years, 9 months