Comments (14)
/cc @davidvossel
from demo.
@anandkolli could you describe the problem you encountered?
from demo.
Below are the details:
Yaml file to launch a VM:
metadata:
name: testvm-ephemeral
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
spec:
domain:
devices:
disks:
- type: RegistryDisk:v1alpha
source:
name: vmdisks/gw:devel
target:
dev: vda
interfaces:
- source:
network: default
type: network
memory:
unit: MB
value: 64
os:
type:
os: hvm
type: qemu
Docker file used to generate the image:
FROM kubevirt/registry-disk-v1alpha
ADD entry-point.sh /
RUN apt-get update && apt-get install -y
bash curl bzip2 qemu-utils qemu-kvm qemu virt-manager virt-viewer &&
mkdir -p /disk &&
rm -rf /var/lib/apt/lists/*
ADD gw-vm.qcow2 /disk
CMD ["/entry-point.sh"]
Pod was successfully launched and was up and running as highlighted:
NAMESPACE NAME READY STATUS RESTARTS AGE
default iscsi-demo-target-tgtd-59665987f-vpf29 1/1 Running 0 5h
default virt-launcher-testvm-ephemeral-----zpjm2 1/1 Running 0 13s
kube-system etcd-virt-virtual-machine 1/1 Running 0 5h
kube-system kube-apiserver-virt-virtual-machine 1/1 Running 1 5h
kube-system kube-controller-manager-virt-virtual-machine 1/1 Running 0 5h
kube-system kube-dns-86cc76f8d-m9fzs 3/3 Running 18 5h
kube-system kube-proxy-6wdkx 1/1 Running 0 5h
kube-system kube-scheduler-virt-virtual-machine 1/1 Running 0 5h
kube-system libvirt-569mf 2/2 Running 0 5h
kube-system virt-controller-84666b7bc8-2vj9p 1/1 Running 0 5h
kube-system virt-controller-84666b7bc8-frll9 0/1 Running 0 5h
kube-system virt-handler-sdwdk 1/1 Running 0 5h
kube-system weave-net-4lqcm 2/2 Running 0 5h
But I don't see the corresponding VM getting spawned.
below are logs from the pod.
root@virt-virtual-machine:~/demo/gw# kubectl logs virt-launcher-testvm-ephemeral-----zpjm2
level=info timestamp=2018-02-20T14:04:29.379522Z pos=log.go:265 component=virt-launcher msg="Watchdog file created at /var/run/kubevirt/watchdog-files/default_testvm-ephemeral"
level=info timestamp=2018-02-20T14:04:29.379971Z pos=log.go:261 component=virt-launcher msg="Marked as ready"
level=info timestamp=2018-02-20T14:04:29.380440Z pos=log.go:265 component=virt-launcher msg="Monitoring loop: rate 1s start timeout 5m0s"
level=info timestamp=2018-02-20T14:04:30.411904Z pos=log.go:265 component=virt-launcher msg="Still missing PID for qemu, Process qemu not found in /proc"
Please let me know if you need any further information.
Thanks,
Anand
from demo.
Did the VM ever attempt to launch? What's the 'kubectl describe vm testvm-ephemeral' output?
from demo.
VM never launched.
below is the requested output:
root@virt-virtual-machine:~# kubectl describe pod virt-launcher-testvm-ephemeral-----mjc77
Name: virt-launcher-testvm-ephemeral-----mjc77
Namespace: default
Node: virt-virtual-machine/192.168.63.136
Start Time: Fri, 23 Feb 2018 11:39:03 +0530
Labels: kubevirt.io=virt-launcher
kubevirt.io/domain=testvm-ephemeral
kubevirt.io/vmUID=0c52d31e-1860-11e8-b584-000c2993d804
Annotations: <none>
Status: Running
IP: 10.32.0.7
Containers:
compute:
Container ID: docker://a7cda34cc3170f9b36c823820d02f2eab99f96ce84171dc1a0c949de26e8ad2a
Image: kubevirt/virt-launcher:v0.2.0
Image ID: docker-pullable://kubevirt/virt-launcher@sha256:4f205ab0093c850299697fa13f0d8979430eb6d2792c1e452af4db369c38674d
Port: <none>
Command:
/virt-launcher
--qemu-timeout
5m
--name
testvm-ephemeral
--namespace
default
--kubevirt-share-dir
/var/run/kubevirt
--readiness-file
/tmp/healthy
--grace-period-seconds
45
State: Running
Started: Fri, 23 Feb 2018 11:39:05 +0530
Ready: True
Restart Count: 0
Readiness: exec [cat /tmp/healthy] delay=2s timeout=5s period=2s #success=1 #failure=5
Environment: <none>
Mounts:
/var/run/kubevirt from virt-share-dir (rw)
/var/run/kubevirt-private/default/testvm-ephemeral from virt-private-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-r5bg7 (ro)
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
virt-share-dir:
Type: HostPath (bare host directory volume)
Path: /var/run/kubevirt
HostPathType:
virt-private-dir:
Type: HostPath (bare host directory volume)
Path: /var/run/kubevirt-private/default/testvm-ephemeral
HostPathType:
default-token-r5bg7:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-r5bg7
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.alpha.kubernetes.io/notReady:NoExecute for 300s
node.alpha.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
----- ------- ---- ----- ---------
Normal Scheduled 40s default-scheduler Successfully assigned virt-launcher-testvm-ephemeral-----mjc77 to virt-virtual-machine
Normal SuccessfulMountVolume 39s kubelet, virt-virtual-machine MountVolume.SetUp succeeded for volume "virt-share-dir"
Normal SuccessfulMountVolume 39s kubelet, virt-virtual-machine MountVolume.SetUp succeeded for volume "virt-private-dir"
Normal SuccessfulMountVolume 39s kubelet, virt-virtual-machine MountVolume.SetUp succeeded for volume "default-token-r5bg7"
Normal Pulled 38s kubelet, virt-virtual-machine Container image "kubevirt/virt-launcher:v0.2.0" already present on machine
Normal Created 38s kubelet, virt-virtual-machine Created container
Normal Started 38s kubelet, virt-virtual-machine Started container
=========
root@virt-virtual-machine:~/demo# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default iscsi-demo-target-tgtd-59665987f-q9rhg 1/1 Running 0 8m
default virt-launcher-testvm-ephemeral-----mjc77 1/1 Running 0 2m
kube-system etcd-virt-virtual-machine 1/1 Running 0 12m
kube-system kube-apiserver-virt-virtual-machine 1/1 Running 0 12m
kube-system kube-controller-manager-virt-virtual-machine 1/1 Running 0 12m
kube-system kube-dns-86cc76f8d-blmgv 3/3 Running 0 13m
kube-system kube-proxy-6h2zm 1/1 Running 0 13m
kube-system kube-scheduler-virt-virtual-machine 1/1 Running 0 12m
kube-system libvirt-lp6md 2/2 Running 0 8m
kube-system virt-controller-84666b7bc8-7ncp2 0/1 Running 0 8m
kube-system virt-controller-84666b7bc8-pnmgg 1/1 Running 0 8m
kube-system virt-handler-g8jbz 1/1 Running 0 8m
kube-system weave-net-kdqkj 2/2 Running 0 4m
from demo.
How long did you wait for the VM to come up?
And what Kubernetes distribution are you using?
Because I also see that the launcher fails to see the qemu process you might want to try https://github.com/kubevirt/kubevirt/releases/tag/v0.3.0-alpha.3 - which has changes in this area (as well as others).
from demo.
Once I launch the pod I keep waiting and never deleted the pod at all.
Kubernetese version:
root@virt-virtual-machine:~# kubelet --version
Kubernetes v1.8.0
Sure I will take a look and shall get back to you.
Thank you,
Anand
from demo.
Ok.
Actually - Are you using Openhift, Tectonic, vanilla upstream Kubernetes, …?
from demo.
I have installed kubernetes using kubeadm on a single virtual machine.
from demo.
Ok, that's what we use as well. please retry with v0.3.0-alpha.3 above.
from demo.
@anandkolli I need to see the 'kubectl describe vm testvm-ephemeral' output. That's going to give us insight into what happened to the vm. I can tell from the pod description that the pod was at least launched succesfully though
from demo.
with the below yaml file I was able to bring up the virtual machine.
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
name: vm-ephemeral
spec:
domain:
resources:
requests:
memory: 512M
devices:
disks:
- name: registrydisk
volumeName: registryvolume
disk:
bus: virtio
interfaces:
- source:
network: default
volumes:
- name: registryvolume
registryDisk:
image: sc-gw
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE
default virt-launcher-vm-ephemeral-h927d 2/2 Running 0 11m 192.168.210.77 virt-virtual-machine
kube-system calico-etcd-bd7rd 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system calico-kube-controllers-d669cc78f-8988s 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system calico-node-9sn8h 2/2 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system etcd-virt-virtual-machine 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system kube-apiserver-virt-virtual-machine 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system kube-controller-manager-virt-virtual-machine 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system kube-dns-6f4fd4bdf-bwz29 3/3 Running 4 1h 192.168.210.65 virt-virtual-machine
kube-system kube-proxy-dzqzt 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system kube-scheduler-virt-virtual-machine 1/1 Running 0 1h 192.168.63.136 virt-virtual-machine
kube-system virt-controller-5558489588-f589l 1/1 Running 0 14m 192.168.210.76 virt-virtual-machine
kube-system virt-controller-5558489588-q7j2q 0/1 Running 0 14m 192.168.210.75 virt-virtual-machine
kube-system virt-handler-4nm7h 1/1 Running 0 14m 192.168.210.74 virt-virtual-machine
ps -eaf | grep qemu
uuidd 67920 66936 51 21:37 ? 00:04:26 /usr/bin/qemu-system-x86_64 -name guest=default_vm-ephemeral,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-default_vm-ephemeral/master-key.aes -machine pc-q35-2.10,accel=tcg,usb=off,dump-guest-core=off -m 489 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 9b3070f9-81bb-4901-9f9d-7a6632e46e65 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-default_vm-ephemeral/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 -device nec-usb-xhci,id=usb,bus=pci.2,addr=0x0 -drive file=/var/run/libvirt/kubevirt-ephemeral-disk/registry-disk-data/default/vm-ephemeral/disk_registryvolume/disk-image.raw,format=raw,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.3,addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=d2:9a:85:ac:4f:61,bus=pci.1,addr=0x0 -chardev socket,id=charserial0,path=/var/run/kubevirt-private/default/vm-ephemeral/virt-serial0,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -vnc vnc=unix:/var/run/kubevirt-private/default/vm-ephemeral/virt-vnc -device VGA,id=video0,vgamem_mb=16,bus=pcie.0,addr=0x1 -device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 -msg timestamp=on
Also do you have sample yaml to pass multiple network interface to the virtual machine?
Thank you 👍
Anand
from demo.
Also do you have sample yaml to pass multiple network interface to the virtual machine?
multiple interfaces are not supported right now.
from demo.
Also do you have sample yaml to pass multiple network interface to the virtual machine?
multiple interfaces are not supported right now.
Yep - It will take some time until we get there.
from demo.
Related Issues (20)
- Add support for the demo flow on GKE/AKS? HOT 4
- Adjust VERSION to latest release ? HOT 2
- test HOT 1
- [doc] Broken link to documentation HOT 2
- User Guide Link Broken HOT 1
- Adding file of 'CONTRIBUTING.md' and LICENSE for the project HOT 9
- Failed to start VMI with error message "failed to find a sourceFile in containerDisk rootfs:" HOT 6
- Archive this repo HOT 4
- Review use of offensive language HOT 6
- Adjust main branch to use respectful language HOT 2
- Move CI from travis-ci to Prow HOT 4
- virt-handler: failed to find a sourceFile in containerDisk containerdisk: failed to determine default image path <nil>: lstat /proc/1/root/var/lib/docker/overlay2/7da6b84f9b7a53dc81eaa722a3383613d284bb48a00d32e0e4701e5c31201053/merged/disk: no such file or directory HOT 1
- Add example output of successful setup to README HOT 4
- A lot of issues with the minishift flow HOT 4
- minishift based demo with PVC does not work HOT 7
- Support testing on OpenShift Origin
- [doc] kubevirt.io minikube demo refers to incorrect link for nested virt HOT 1
- kubevirt.io demo doesn't indicate need to use system:admin for oc commands HOT 1
- kubevirt.io demos indicate to use old version v0.8.0 HOT 1
- Deploy a VirtualMachine fails with The "" is invalid: : spec.template.spec.volumes.containerDisk in body is a forbidden property HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demo.