sysml / clickos

The Click modular router: fast modular packet processing and analysis
http://www.read.cs.ucla.edu/click/
Other
136 stars 35 forks source link

Failed to run a clickos on Xen. #4

Closed shashibici closed 9 years ago

shashibici commented 9 years ago

Hi,

I am trying to build and run ClickOS from the source code. I have successfully compiled and built the image of ClickOS, clickos_x86_64/clickos_x86_64.gz. However, when I was trying to run the ClickOS as a DomU VM, I got errors.

System environment:

1) Use OS X as a host. 2) Install VMware Fusion 3) Install Debian 7.8.0-64bits as a guest OS inside VMware. 4) Compile and build Xen-4.4.1 from source code inside Debian. 5) Use Debian as Dom0.

I use the following command to run ClickOS from Dom0: 1) cd /path/to/clickos/ 2) xl create minios/config.xen

The error messages:

libxl: error: libxl.c:4594:libxl_set_vcpuaffinity: setting vcpu affinity: Invalid argument libxl: warning: libxl.c:4608:libxl_set_vcpuaffinity_all: failed to set affinity for 0 libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [-1] exited with error status 1 libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0 libxl: error: libxl_create.c:1226:domcreate_attach_vtpms: unable to add nic devices libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [-1] exited with error status 1 libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0 Parsing config from minios/config.xen

Content of config.xen

kernel = './minios/build/clickos_x86_64' vcpus = '1' cpus = '2' memory = '12' vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0'] name = 'click0' on_crash = 'preserve'

Information that might be helpful:

The output of 'xl vcpu-list':

Name ID VCPU CPU State Time(s) CPU Affinity Domain-0 0 0 0 r-- 25.4 all Domain-0 0 1 1 -b- 14.4 all

The output of 'xl info':

host : debian-xen release : 3.2.0-4-amd64 version : #1 SMP Debian 3.2.65-1+deb7u2 machine : x86_64 nr_cpus : 2 max_cpu_id : 127 nr_nodes : 1 cores_per_socket : 1 threads_per_core : 1 cpu_mhz : 2194 hw_caps : 0fabfbff:2c100800:00000000:00007f00:f7fa3223:00000000:00000021:000027ab virt_caps : hvm total_memory : 2047 free_memory : 167 sharing_freed_memory : 0 sharing_used_memory : 0 outstanding_claims : 0 free_cpus : 0 xen_major : 4 xen_minor : 4 xen_extra : .1 xen_version : 4.4.1 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : xen_commandline : placeholder cc_compiler : gcc (Debian 4.7.2-5) 4.7.2 cc_compile_by : root cc_compile_domain : cc_compile_date : Fri Feb 27 14:32:20 EST 2015 xend_config_format : 4

The output of 'xl dmesg':

Xen 4.4.1 (XEN) Xen version 4.4.1 (root@) (gcc (Debian 4.7.2-5) 4.7.2) debug=n Fri Feb 27 14:32:20 EST 2015 (XEN) Latest ChangeSet: (XEN) Bootloader: GRUB 1.99-27+deb7u2 (XEN) Command line: placeholder (XEN) Video information: (XEN) VGA is text mode 80x25, font 8x16 (XEN) Disc information: (XEN) Found 1 MBR signatures (XEN) Found 1 EDD information structures (XEN) Xen-e820 RAM map: (XEN) 0000000000000000 - 000000000009e800 (usable) (XEN) 000000000009e800 - 00000000000a0000 (reserved) (XEN) 00000000000dc000 - 0000000000100000 (reserved) (XEN) 0000000000100000 - 000000007fee0000 (usable) (XEN) 000000007fee0000 - 000000007feff000 (ACPI data) (XEN) 000000007feff000 - 000000007ff00000 (ACPI NVS) (XEN) 000000007ff00000 - 0000000080000000 (usable) (XEN) 00000000f0000000 - 00000000f8000000 (reserved) (XEN) 00000000fec00000 - 00000000fec10000 (reserved) (XEN) 00000000fee00000 - 00000000fee01000 (reserved) (XEN) 00000000fffe0000 - 0000000100000000 (reserved) (XEN) System RAM: 2047MB (2096632kB) (XEN) ACPI: RSDP 000F6AC0, 0024 (r2 PTLTD ) (XEN) ACPI: XSDT 7FEEC65B, 005C (r1 INTEL 440BX 6040000 VMW 1324272) (XEN) ACPI: FACP 7FEFEE73, 00F4 (r4 INTEL 440BX 6040000 PTL F4240) (XEN) ACPI: DSDT 7FEEDE9D, 10FD6 (r1 PTLTD Custom 6040000 MSFT 3000001) (XEN) ACPI: FACS 7FEFFFC0, 0040 (XEN) ACPI: BOOT 7FEEDE75, 0028 (r1 PTLTD $SBFTBL$ 6040000 LTP 1) (XEN) ACPI: APIC 7FEED733, 0742 (r1 PTLTD APIC 6040000 LTP 0) (XEN) ACPI: MCFG 7FEED6F7, 003C (r1 PTLTD $PCITBL$ 6040000 LTP 1) (XEN) ACPI: SRAT 7FEEC757, 08A8 (r2 VMWARE MEMPLUG 6040000 VMW 1) (XEN) ACPI: HPET 7FEEC71F, 0038 (r1 VMWARE VMW HPET 6040000 VMW 1) (XEN) ACPI: WAET 7FEEC6F7, 0028 (r1 VMWARE VMW WAET 6040000 VMW 1) (XEN) Domain heap initialised (XEN) Processor #0 6:6 APIC version 21 (XEN) Processor #2 6:6 APIC version 21 (XEN) IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23 (XEN) Enabling APIC mode: Phys. Using 1 I/O APICs (XEN) Not enabling x2APIC: depends on iommu_supports_eim. (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) Detected 2194.056 MHz processor. (XEN) Initing memory sharing. (XEN) xstate_init: using cntxt_size: 0x340 and states: 0x7 (XEN) I/O virtualisation disabled (XEN) ENABLING IO-APIC IRQs (XEN) -> Using new ACK method (XEN) Platform timer is 14.318MHz HPET (XEN) Allocated console ring of 16 KiB. (XEN) VMX: Supported advanced features: (XEN) - APIC TPR shadow (XEN) - Extended Page Tables (EPT) (XEN) - Virtual-Processor Identifiers (VPID) (XEN) - Virtual NMI (XEN) - MSR direct-access bitmap (XEN) - Unrestricted Guest (XEN) HVM: ASIDs enabled. (XEN) HVM: VMX enabled (XEN) HVM: Hardware Assisted Paging (HAP) detected (XEN) HVM: HAP page sizes: 4kB, 2MB (XEN) Brought up 2 CPUs (XEN) * LOADING DOMAIN 0 * (XEN) Xen kernel: 64-bit, lsb, compat32 (XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x193e000 (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 0000000074000000->0000000078000000 (460919 pages to be allocated) (XEN) Init. ramdisk: 000000007da7f000->000000007f9ffe00 (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: ffffffff81000000->ffffffff8193e000 (XEN) Init. ramdisk: ffffffff8193e000->ffffffff838bee00 (XEN) Phys-Mach map: ffffffff838bf000->ffffffff83c72fc0 (XEN) Start info: ffffffff83c73000->ffffffff83c734b4 (XEN) Page tables: ffffffff83c74000->ffffffff83c97000 (XEN) Boot stack: ffffffff83c97000->ffffffff83c98000 (XEN) TOTAL: ffffffff80000000->ffffffff84000000 (XEN) ENTRY ADDRESS: ffffffff816aa200 (XEN) Dom0 has maximum 2 VCPUs (XEN) Scrubbing Free RAM: .done. (XEN) Initial low memory virq threshold set at 0x4000 pages. (XEN) Std. Loglevel: Errors and warnings (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) Xen is relinquishing VGA console. (XEN) *\ Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 284kB init memory.

Best wishes, Hongda

fmanco commented 9 years ago

Hi

You have to problems:

Best regards Filipe

shashibici commented 9 years ago

Thank you so much for your comment, Filipe. I have made ClickOS run on Xen virtual machine.

Hongda

fmanco commented 9 years ago

Great.

BR Filipe