Comments (20)
I'm sharing this having gone through the same battle yesterday with the kubectl run command. If you're running this on Windows using Powershell you'll need to create a variable and assign the JSON (using the ConvertTo-Json routine) first. Then use that variable in your kubectl commands.
From the OP's code:
$ kubectl patch offlinevirtualmachine testvm --type merge -p '{"spec":{"running":true}}'
Becomes:
$myjson = '{"spec":{"running":true}}' | ConvertTo-Json
$ kubectl patch offlinevirtualmachine testvm --type merge -p $myjson
Hope that helps! :)
Approach originally found at: https://stackoverflow.com/a/53481499/40593
from demo.
Yes. Check this: https://www.virtualbox.org/ticket/4032
9 years ...
from demo.
thanks for the correction @stealthybox !
from demo.
virt-controller-5c74754ddd-tbhkf
is just a hot-standby in case that the primary controller has an issue.
Could you please provide the output of kubectl get ovm testvm
?
It might be that something is up with the offline VM definition
from demo.
kubectl get ovm testvm
C:\minikube>kubectl get ovm testvm
NAME AGE
testvm 1d
Nothing fancy here :/
from demo.
Argh - kubectl get ovm testvm -o yaml
I mean to say - to get all the details.
from demo.
You are testing on Windows!? Crazy :)
from demo.
Shit! I know why it's failing... or at least this my lucky guess:
virtual-box is unable of running KVM inside of it. It's not supported. Minikube in windows is using Virtual-box, so ... I will try this on my Linux box also to make sure if it's a bug or not, and then update the status here.
from demo.
Cool.
Are you sure it is not supported by today? KVM inside VB? ...
from demo.
Oh - But never the less - We noticed that currently all VMs are run in emualtion mode. So this should not be the issue.
from demo.
In Linux it works perfectly OK. So, the issue is triggered only in Windows environment.
from demo.
Can you provide the output of kubectl get ovm testvm -o yaml
?
from demo.
ping?
from demo.
Ah I forgot about this. Let me resurrect my Windows machine. I will report soon-ish. Thank for the reminder ;)
from demo.
apiVersion: kubevirt.io/v1alpha1
kind: OfflineVirtualMachine
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"kubevirt.io/v1alpha1","kind":"OfflineVirtualMachine","metadata":{"annotations":{},"name":"testvm","namespace":"default"},"spec":{"running":false,"selector":{"matchLabels":{"guest":"testvm"}},"template":{"metadata":{"labels":{"guest":"testvm","kubevirt.io/size":"small"}},"spec":{"domain":{"devices":{"disks":[{"disk":{"bus":"virtio"},"name":"registrydisk","volumeName":"registryvolume"},{"disk":{"bus":"virtio"},"name":"cloudinitdisk","volumeName":"cloudinitvolume"}]}},"volumes":[{"name":"registryvolume","registryDisk":{"image":"kubevirt/cirros-registry-disk-demo"}},{"cloudInitNoCloud":{"userDataBase64":"SGkuXG4="},"name":"cloudinitvolume"}]}}}}
clusterName: ""
creationTimestamp: 2018-03-11T01:18:34Z
generation: 0
name: testvm
namespace: default
resourceVersion: "3371"
selfLink: /apis/kubevirt.io/v1alpha1/namespaces/default/offlinevirtualmachines/testvm
uid: 1e7a9b22-24ca-11e8-be68-080027a81666
spec:
running: false
selector:
matchLabels:
guest: testvm
template:
metadata:
labels:
guest: testvm
kubevirt.io/size: small
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: registrydisk
volumeName: registryvolume
- disk:
bus: virtio
name: cloudinitdisk
volumeName: cloudinitvolume
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/cirros-registry-disk-demo
- cloudInitNoCloud:
userDataBase64: SGkuXG4=
name: cloudinitvolume
Here it is.
from demo.
Closing this issue as the entities were renamed.
from demo.
Please reopen or file new if you still see this. Please provide:
Exact kubectl/oc cmdline
Exact VM/VMI definitnion.
from demo.
Hey, I stumbled on this issue today. Seems a kubernetes issue:
kubernetes/kubernetes#63247
(also relevant: kubernetes/kubernetes#56980)
I workarounded this issue using a YAML patch. No luck with JSON patch
platform: kubevirt 0.8.0 on kubernetes 1.11
from demo.
@fromanirh there shouldn't be any issues parsing valid JSON, as it is a subset of YAML.
You likely had an error in your JSON which was not present in your YAML version of the patch.
The linked issues are mainly about UX of the jsonpatch feature. (it's confusing)
The parsing works correctly.
from demo.
That's crazy ...
@woodwardmatt do I understand that you ran minikube on Windows and KubeVirt inside of minikube?
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.