Hello,
I'm trying to create a HVM machine with a Virtual Disk Image (created
using dd if=/dev/zero of=virtualdisk-root.img bs=1k seek=2048k
count=1) and attach it to a HVM domU using the following template:
# -*- mode: python; -*-
import os, re
arch_libdir = 'lib'
arch = os.uname()[4]
if os.uname()[0] == 'Linux' and re.search('64', arch):
arch_libdir = 'lib64'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 1024
name = "Ubuntu11"
vcpus=1
vif = [ 'type=ioemu, bridge=eth1' ]
disk = [ 'file:/home/xen/ubuntu-server.img,sda,w',
'file:/home/xen/ubuntu.iso,hdc:cdrom,w' ]
# I have to use sda because if I put hda the installer doesn't find the disk
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
boot="dc"
vnc=1
vnclisten="0.0.0.0"
vncpasswd='XXXX'
serial='pty'
localtime=1
usb=1
usbdevice='tablet'
keymap='es'
With this template I'm able to install the system to the disk, the
problem comes when I later on remove the CDROM (hdc) and try to boot
from sda. If I change the disk line to:
disk = [ 'file:/home/xen/ubuntu-server.img,sda,w' ]
The domU starts and closes, almost immediately. This is what xend says:
[2011-06-17 22:50:27 1925] DEBUG (XendDomainInfo:92)
XendDomainInfo.create(['vm', ['name', 'Ubuntu11'], ['memory', 1024],
['vcpus', 1], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'],
['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'],
['videoram', 4], ['device_model', '/usr/lib64/xen/bin/qemu-dm'],
['pae', 1], ['vcpus', 1], ['boot', 'c'], ['fda', ''], ['fdb', ''],
['timer_mode', 1], ['localtime', 0], ['serial', 'pty'], ['stdvga', 0],
['isa', 0], ['nographic', 0], ['soundhw', ''], ['vnc', 1],
['vncunused', 1], ['vnclisten', '0.0.0.0'], ['sdl', 0], ['xauthority',
'/root/.Xauthority'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi',
1], ['apic', 1], ['usb', 0], ['usbdevice', 'tablet'], ['keymap',
'es'], ['pci', []], ['hpet', 0], ['guest_os_type', 'default'], ['hap',
1], ['opengl', 1], ['cpuid', []], ['cpuid_check', []], ['viridian',
0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0],
['xen_platform_pci', 1], ['vncpasswd', 'XXXXXXXX']]], ['s3_integrity',
1], ['device', ['vbd', ['uname', 'file:/home/xen/ubuntu.img'], ['dev',
'sda'], ['mode', 'w']]], ['device', ['vif', ['bridge', 'eth1'],
['type', 'ioemu']]]])
[2011-06-17 22:50:27 1925] DEBUG (XendDomainInfo:2304)
XendDomainInfo.constructDomain
[2011-06-17 22:50:27 1925] DEBUG (balloon:166) Balloon: 49260500 KiB
free; need 4096; done.
[2011-06-17 22:50:27 1925] DEBUG (XendDomain:453) Adding Domain: 20
[2011-06-17 22:50:27 1925] DEBUG (XendDomainInfo:2505)
XendDomainInfo.initDomain: 20 256
[2011-06-17 22:50:27 1925] DEBUG (image:320) Stored a VNC password for
vfb access
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: boot, val: c
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: fda, val: None
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: fdb, val: None
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: soundhw, val: None
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: localtime, val: 0
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: serial, val: ['pty']
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: std-vga, val: 0
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: isa, val: 0
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: acpi, val: 1
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: usb, val: 0
[2011-06-17 22:50:27 1925] DEBUG (image:813) args: usbdevice, val: tablet
[2011-06-17 22:50:27 1925] INFO (image:749) Need to create platform
device.[domid:20]
[2011-06-17 22:50:27 1925] DEBUG (XendDomainInfo:2529)
_initDomain:shadow_memory=0x0, memory_static_max=0x40000000,
memory_static_min=0x0.
[2011-06-17 22:50:27 1925] DEBUG (balloon:166) Balloon: 49259088 KiB
free; need 1065984; done.
[2011-06-17 22:50:27 1925] INFO (image:173) buildDomain os=hvm dom=20 vcpus=1
[2011-06-17 22:50:27 1925] DEBUG (image:866) domid = 20
[2011-06-17 22:50:27 1925] DEBUG (image:867) image =
/usr/lib/xen/boot/hvmloader
[2011-06-17 22:50:27 1925] DEBUG (image:868) store_evtchn = 2
[2011-06-17 22:50:27 1925] DEBUG (image:869) memsize = 1024
[2011-06-17 22:50:27 1925] DEBUG (image:870) target = 1024
[2011-06-17 22:50:27 1925] DEBUG (image:871) vcpus = 1
[2011-06-17 22:50:27 1925] DEBUG (image:872) acpi = 1
[2011-06-17 22:50:27 1925] DEBUG (image:873) apic = 1
[2011-06-17 22:50:28 1925] INFO (XendDomainInfo:2168) createDevice:
vfb : {'vncunused': 1, 'other_config': {'vncunused': 1, 'vncpasswd':
'XXXXXXXX', 'vnclisten': '0.0.0.0', 'vnc': '1'}, 'vnc': '1', 'uuid':
'67fcbd39-211e-49d3-3cab-d2d708cb8241', 'vnclisten': '0.0.0.0',
'vncpasswd': 'XXXXXXXX'}
[2011-06-17 22:50:28 1925] DEBUG (DevController:95) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vfb/20/0'} to /local/domain/20/device/vfb/0.
[2011-06-17 22:50:28 1925] DEBUG (DevController:97) DevController:
writing {'vncunused': '1', 'domain': 'Ubuntu11', 'frontend':
'/local/domain/20/device/vfb/0', 'uuid':
'67fcbd39-211e-49d3-3cab-d2d708cb8241', 'frontend-id': '20',
'vnclisten': '0.0.0.0', 'vncpasswd': 'XXXXXXXX', 'state': '1',
'online': '1', 'vnc': '1'} to /local/domain/0/backend/vfb/20/0.
[2011-06-17 22:50:28 1925] INFO (XendDomainInfo:2168) createDevice:
vbd : {'uuid': '8bc3e9f1-98f5-23f2-e35e-45a9926f2620', 'bootable': 1,
'driver': 'paravirtualised', 'dev': 'sda', 'uname':
'file:/home/xen/ubuntu.img', 'mode': 'w'}
[2011-06-17 22:50:28 1925] DEBUG (DevController:95) DevController:
writing {'backend-id': '0', 'virtual-device': '2048', 'device-type':
'disk', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/20/2048'} to
/local/domain/20/device/vbd/2048.
[2011-06-17 22:50:28 1925] DEBUG (DevController:97) DevController:
writing {'domain': 'Ubuntu11', 'frontend':
'/local/domain/20/device/vbd/2048', 'uuid':
'8bc3e9f1-98f5-23f2-e35e-45a9926f2620', 'bootable': '1', 'dev': 'sda',
'state': '1', 'params': '/home/xen/ubuntu.img', 'mode': 'w', 'online':
'1', 'frontend-id': '20', 'type': 'file'} to
/local/domain/0/backend/vbd/20/2048.
[2011-06-17 22:50:28 1925] INFO (XendDomainInfo:2168) createDevice:
vif : {'bridge': 'eth1', 'mac': '00:16:3e:1f:f1:2e', 'type': 'ioemu',
'uuid': 'da093635-8d57-83fe-ac90-1b9457b9851e'}
[2011-06-17 22:50:28 1925] DEBUG (DevController:95) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vif/20/0'} to /local/domain/20/device/vif/0.
[2011-06-17 22:50:28 1925] DEBUG (DevController:97) DevController:
writing {'bridge': 'eth1', 'domain': 'Ubuntu11', 'handle': '0',
'uuid': 'da093635-8d57-83fe-ac90-1b9457b9851e', 'script':
'/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:1f:f1:2e',
'frontend-id': '20', 'state': '1', 'online': '1', 'frontend':
'/local/domain/20/device/vif/0', 'type': 'ioemu'} to
/local/domain/0/backend/vif/20/0.
[2011-06-17 22:50:28 1925] INFO (image:394) spawning device models:
/usr/lib64/xen/bin/qemu-dm ['/usr/lib64/xen/bin/qemu-dm', '-d', '20',
'-domain-name', 'Ubuntu11', '-videoram', '4', '-k', 'es', '-vnc',
'0.0.0.0:0,password', '-vncunused', '-vcpus', '1', '-boot', 'c',
'-serial', 'pty', '-acpi', '-usbdevice', 'tablet', '-net',
'nic,vlan=1,macaddr=00:16:3e:1f:f1:2e,model=rtl8139', '-net',
'tap,vlan=1,ifname=tap20.0,bridge=eth1', '-M', 'xenfv']
[2011-06-17 22:50:28 1925] INFO (image:443) device model pid: 8604
[2011-06-17 22:50:28 1925] INFO (image:531) waiting for sentinel_fifo
[2011-06-17 22:50:28 1925] DEBUG (XendDomainInfo:3060) Storing VM
details: {'on_xend_stop': 'ignore', 'shadow_memory': '9', 'uuid':
'5966a28d-b2e1-2581-f2f7-ca4a512334a7', 'on_reboot': 'restart',
'start_time': '1308343828.26', 'on_poweroff': 'destroy',
'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash':
'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1',
'bootloader': '', 'image': '(hvm (kernel ) (timer_mode 1) (videoram 4)
(vnc 1) (vpt_align 1) (nographic 0) (hpet 0) (rtc_timeoffset 0)
(guest_os_type default) (vnclisten 0.0.0.0) (loader
/usr/lib/xen/boot/hvmloader) (pci ()) (pci_msitranslate 1) (apic 1)
(sdl 0) (serial pty) (xen_platform_pci 1) (hap 1) (monitor 0) (opengl
1) (device_model /usr/lib64/xen/bin/qemu-dm) (boot c) (pci_power_mgmt
0) (vncpasswd XXXXXX) (keymap es) (usbdevice tablet) (pae 1) (stdvga
0) (usb 0) (xauthority /root/.Xauthority) (isa 0) (viridian 0) (acpi
1) (vncunused 1) (localtime 0) (notes (SUSPEND_CANCEL 1)))', 'name':
'Ubuntu11'}
[2011-06-17 22:50:28 1925] DEBUG (XendDomainInfo:1622) Storing domain
details: {'console/port': '3', 'name': 'Ubuntu11', 'console/limit':
'1048576', 'store/port': '2', 'vm':
'/vm/5966a28d-b2e1-2581-f2f7-ca4a512334a7', 'domid': '20',
'image/suspend-cancel': '1', 'cpu/0/availability': 'online',
'memory/target': '1048576',
'control/platform-feature-multiprocessor-suspend': '1',
'store/ring-ref': '1044476', 'console/type': 'ioemu'}
[2011-06-17 22:50:28 1925] DEBUG (DevController:95) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/console/20/0'} to
/local/domain/20/device/console/0.
[2011-06-17 22:50:28 1925] DEBUG (DevController:97) DevController:
writing {'domain': 'Ubuntu11', 'frontend':
'/local/domain/20/device/console/0', 'uuid':
'354c5dd6-e79f-d2f1-4a95-123ca39de153', 'frontend-id': '20', 'state':
'1', 'location': '3', 'online': '1', 'protocol': 'vt100'} to
/local/domain/0/backend/console/20/0.
[2011-06-17 22:50:28 1925] DEBUG (XendDomainInfo:1709)
XendDomainInfo.handleShutdownWatch
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vif.
[2011-06-17 22:50:28 1925] DEBUG (DevController:144) Waiting for 0.
[2011-06-17 22:50:28 1925] DEBUG (DevController:629)
hotplugStatusCallback /local/domain/0/backend/vif/20/0/hotplug-status.
[2011-06-17 22:50:28 1925] DEBUG (DevController:643) hotplugStatusCallback 1.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vkbd.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for
devices ioports.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices tap.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for
devices console.
[2011-06-17 22:50:28 1925] DEBUG (DevController:144) Waiting for 0.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vscsi.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vbd.
[2011-06-17 22:50:28 1925] DEBUG (DevController:144) Waiting for 2048.
[2011-06-17 22:50:28 1925] DEBUG (DevController:629)
hotplugStatusCallback
/local/domain/0/backend/vbd/20/2048/hotplug-status.
[2011-06-17 22:50:28 1925] DEBUG (DevController:629)
hotplugStatusCallback
/local/domain/0/backend/vbd/20/2048/hotplug-status.
[2011-06-17 22:50:28 1925] DEBUG (DevController:643) hotplugStatusCallback 1.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices irq.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vfb.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices pci.
[2011-06-17 22:50:28 1925] DEBUG (DevController:139) Waiting for devices vtpm.
[2011-06-17 22:50:28 1925] INFO (XendDomain:1182) Domain Ubuntu11 (20) unpaused.
[2011-06-17 22:50:29 1925] INFO (XendDomainInfo:1903) Domain has
shutdown: name=Ubuntu11 id=20 reason=poweroff.
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2732)
XendDomainInfo.destroy: domid=20
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2207) Destroying device model
[2011-06-17 22:50:29 1925] INFO (image:556) Ubuntu11 device model terminated
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2214) Releasing devices
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2227) Removing vif/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:1134)
XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2227) Removing console/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:1134)
XendDomainInfo.destroyDevice: deviceClass = console, device =
console/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2227) Removing vbd/2048
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:1134)
XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/2048
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2227) Removing vfb/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:1134)
XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2212) No device model
[2011-06-17 22:50:29 1925] DEBUG (XendDomainInfo:2214) Releasing devices
And qemu log:
domid: 20
qemu: the number of cpus is 1
config qemu network with xen bridge for tap20.0 eth1
Watching /local/domain/0/device-model/20/logdirty/next-active
Watching /local/domain/0/device-model/20/command
char device redirected to /dev/pts/3
qemu_map_cache_init nr_buckets = 10000 size 4194304
shared page at pfn feffd
buffered io page at pfn feffb
Guest uuid = 5966a28d-b2e1-2581-f2f7-ca4a512334a7
Time offset set 0
populating video RAM at ff000000
mapping video RAM from ff000000
Register xen platform.
Done register platform.
xs_read(/vm/5966a28d-b2e1-2581-f2f7-ca4a512334a7/log-throttling): read error
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
xs_read(/local/domain/0/device-model/20/xen_extended_power_mgmt): read error
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0
cirrus vga map change while on lfb mode
mapping vram to f0000000 - f0400000
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.
platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.
If I replace sda with hda the domU boots the kernel, but cannot find
root disk and drops to initramfs, if I take a look at the devices in
/dev, there doesn't seem to be any kind of Disk (no hda, sda, or
xvda). Can someone give a hand with this? I've been struggling with
this issue for some time, and I cannot seem to be able to figure out
how to solve it.
Thanks and regards, Roger.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|