virsh list is empty but the pod is running in version 0.8.1
Closed this issue · 1 comments
yangjunsss commented
[root@i-aqhmad57 ~]# uname -a
Linux i-aqhmad57 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I installed hyper from source code via the guide https://docs.hypercontainer.io/get_started/install/build.html
[root@i-aqhmad57 ~]# hyperctl version
The hyperctl version is 0.8.1
qemu's configuration flags are ./configure --target-list=x86_64-softmmu --enable-virtfs --disable-gtk --enable-vhost-net --enable-vhost-scsi
Run a nginx:alpine container.
[root@i-aqhmad57 ~]# hyperctl run -d nginx:alpine
POD id is nginx-alpine-4280802229
Time to run a POD is 5563 ms
The logs:
I0611 22:39:28.648750 4851 vm_states.go:221] SB[vm-DyflrYKWxV] pod start successfully
I0611 22:39:28.649034 4851 provision.go:305] Pod[nginx-alpine-4280802229] sandbox init result: &api.ResultBase{Id:"vm-DyflrYKWxV", Success:true, ResultMessage:"wait init message successfully"}
I0611 22:39:28.829876 4851 container.go:502] Pod[nginx-alpine-4280802229] Con[(nginx-alpine-4280802229)] create container a12e40537cb7e52f0467dad95d33087719e57a449552801ed465b80affac133b (w/: [])
I0611 22:39:28.829990 4851 container.go:524] Pod[nginx-alpine-4280802229] Con[a12e40537cb7(nginx-alpine-4280802229)] describe container
I0611 22:39:28.872785 4851 provision.go:438] Pod[nginx-alpine-4280802229] adding resource to sandbox
I0611 22:39:28.874382 4851 context.go:447] SB[vm-DyflrYKWxV] return volume add success for dir/nas etchosts-volume
I0611 22:39:28.874393 4851 volume.go:115] Pod[nginx-alpine-4280802229] Vol[etchosts-volume] volume inserted
I0611 22:39:28.909414 4851 disk.go:176] SB[vm-DyflrYKWxV] disk /dev/mapper/docker-8:1-394156-e6b7662d829712e672320b92879a957eca8eae3b1d9207e64c8cd670e6b7acf6 for container a12e40537cb7e52f0467dad95d33087719e57a449552801ed465b80affac133b inserted
I0611 22:39:29.120367 4851 run.go:51] Starting pod "nginx-alpine-4280802229" in vm: "vm-DyflrYKWxV"
I0611 22:39:29.120383 4851 provision.go:474] Pod[nginx-alpine-4280802229] start all containers
I0611 22:39:29.120566 4851 container.go:249] Pod[nginx-alpine-4280802229] Con[a12e40537cb7(nginx-alpine-4280802229)] start container
Nothing in hyper.ERROR or WARNING, it seems healthy.
Check it.
[root@i-aqhmad57 ~]# hyperctl list
POD ID POD Name VM name Status
nginx-alpine-4280802229 nginx-alpine-4280802229 vm-DyflrYKWxV running
[root@i-aqhmad57 ~]# virsh list --all
Id Name State
----------------------------------------------------
But got empty via virsh list
, any comment??
[root@i-aqhmad57 ~]# ps aux|grep qemu
root 6446 1.7 4.5 1415012 177024 ? Sl 22:39 0:07 /usr/local/bin/qemu-system-x86_64 -machine pc-i440fx-2.0,accel=kvm,usb=off -global kvm-pit.lost_tick_policy=discard -cpu host -kernel /root/go/src/github.com/hyperhq/hyperstart/build/kernel -initrd /root/go/src/github.com/hyperhq/hyperstart/build/hyper-initrd.img -append console=ttyS0 panic=1 no_timer_check -realtime mlock=off -no-user-config -nodefaults -no-hpet -rtc base=utc,clock=vm,driftfix=slew -no-reboot -display none -boot strict=on -m 128 -smp 1 -qmp unix:/var/run/hyper/vm-DyflrYKWxV/qmp.sock,server,nowait -serial unix:/var/run/hyper/vm-DyflrYKWxV/console.sock,server,nowait -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -chardev socket,id=charch0,path=/var/run/hyper/vm-DyflrYKWxV/hyper.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charch0,id=channel0,name=sh.hyper.channel.0 -chardev socket,id=charch1,path=/var/run/hyper/vm-DyflrYKWxV/tty.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charch1,id=channel1,name=sh.hyper.channel.1 -fsdev local,id=virtio9p,path=/var/run/hyper/vm-DyflrYKWxV/share_dir,security_model=none -device virtio-9p-pci,fsdev=virtio9p,mount_tag=share_dir -daemonize -pidfile /var/run/hyper/vm-DyflrYKWxV/pidfile -D /var/log/hyper/qemu/vm-DyflrYKWx.log
And the nginx service is running successfully.
[root@i-aqhmad57 ~]# curl 192.168.123.3
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
bergwolf commented
Please check your /etc/hyper/config for the Hypervisor option. Likely you are using qemu rather than libvirt, in which case virsh is not involved.