<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alessandro Arrichiello on Medium]]></title>
        <description><![CDATA[Stories by Alessandro Arrichiello on Medium]]></description>
        <link>https://medium.com/@alezzandro?source=rss-353708c750e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*D2wAfcXrz9SwPxfD5-X-nA.jpeg</url>
            <title>Stories by Alessandro Arrichiello on Medium</title>
            <link>https://medium.com/@alezzandro?source=rss-353708c750e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:59:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alezzandro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes and Virtualization: kubevirt will let you spawn virtual machine on your cluster!]]></title>
            <link>https://medium.com/@alezzandro/kubernetes-and-virtualization-kubevirt-will-let-you-spawn-virtual-machine-on-your-cluster-e809914cc783?source=rss-353708c750e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e809914cc783</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubevirt]]></category>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Alessandro Arrichiello]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 23:20:49 GMT</pubDate>
            <atom:updated>2018-02-15T23:29:41.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*RvHLcakYrFUhQROmmYdVAg.png" /><figcaption>KubeVirt logo</figcaption></figure><p>Imagine to have a kubernetes cluster made on top of physical hosts, now imagine that together with your great, ready to use, cloud-native applications running on containers you have also a brownfield world, made up of several virtual machines that you cannot easily port to a container.</p><p>Are you stuck using your virtualization layer, while working to interconnect your legacy world with this brand new one container based?</p><p>The answer is: NO! That’s the <a href="http://www.kubevirt.io/">kubevirt</a> job!</p><p>Just for quoting the project description:</p><blockquote>The high level goal of the project is to build a Kubernetes add-on to enable management of virtual machines (KVM), via libvirt.</blockquote><blockquote>The intent is that over the long term this would enable application container workloads, and virtual machines, to be managed from a single place via the Kubernetes native API and objects. This will</blockquote><ul><li>Provide a migration path to Kubernetes for existing applications deployed in virtual machines, allowing them to more seemlessly integrate with application container and take advantage of Kubernetes concepts</li><li>Provide a converged API and object model for tenant users needing to manage both application containers and full OS image virtual machines</li><li>Provide converged infrastructure for administrators wishing to support both application containers and full machine virtualization concurrently</li><li>Facilitate the creation of virtual compute nodes to use KVM to strongly isolate application container pods belonging to tenant users with differing trust levels</li></ul><p>In this article we’ll see how to easily create a Kubernetes cluster on top of vm and then run kubevirt on top of it for spawing new virtual machines (using nested virtualization). For this reason: ensure to enable nested virtualization before proceeding. For Fedora take a look here: <a href="https://fedoraproject.org/wiki/How_to_enable_nested_virtualization_in_KVM">https://fedoraproject.org/wiki/How_to_enable_nested_virtualization_in_KVM</a></p><p>Please note that kubevirt is really under high development, so expect changes, DON’T use it in production!</p><h3>Creating your virtual machines based Kubernetes cluster</h3><p>I’ve tried a lot of how-tos, projects, ansible playbooks, etc. available on the web. The best, easy and fast method to setup a working kubernetes cluster on your laptop is “<strong>kubespray</strong>”! <a href="https://github.com/kubernetes-incubator/kubespray">https://github.com/kubernetes-incubator/kubespray</a></p><p>Please note: I preferred setting up a multinode kubernetes cluster instead of a single one (ex: minikube) for testing vm portability across nodes!</p><p>I chosed kubespray also because it lets you create your kubernetes cluster through Vagrant tool, that actually simplify the process of creating virtual machines, sizing them and installing the base operating system.</p><p>So, let’s start creating our kube cluster:</p><h3>Get a copy of kubespray Github repository</h3><p>At the time of writing this article kubespray Github repository is missing support for vagrant-libvirt images, for that reason I made a fork and a pull request for fixing it.</p><p>In the mean time they’ll review and eventually approve it, you can use my forked repo (BTW in case you want to use different virtualization engine you can clone the original repo):</p><pre>[alex@laptop gitprojects]$ git clone <a href="https://github.com/alezzandro/kubespray">https:<em>//github.com/alezzandro/kubespray</em></a></pre><h3>Setup your vagrant environment</h3><p>Then we should edit the Vagrant file specification file for instructing it to use the centos-libvirt image and also change the default network if it overlap any your notebook active networks (in my case it overlaps with Docker network).</p><pre>[alex@laptop gitprojects]$ cd kubespray<br>[alex@laptop kubespray]$ vi Vagrantfile<br>...<br>$subnet = &quot;172.172.1&quot;<br>$os = &quot;centos-libvirt&quot;</pre><p>Then we’re ready to let Vagrant bring up our Virtual Machines based kubernetes cluster made of three vms.</p><pre>[alex@laptop kubespray]$ vagrant up</pre><p>After setting up the vms, Vagrant will start kubespray’s ansible provisioner that will setup all the kubernetes cluster configuration for us!</p><p>Once finished if you used vagrant-libvirt and centos image you have to disable the check for swap memory.</p><p>Kubelet won’t run unless you disable swap memory so for avoiding it we can disable this check into kubelet environment’s variables:</p><pre>[alex@laptop kubespray]$ ansible -s -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory -m shell -a &quot;sed -i &#39;s/--fail-swap-on=True/--fail-swap-on=False/g&#39; /etc/kubernetes/kubelet.env&quot; all</pre><h3>Get the kubernetes token to connect to the cluster from your laptop</h3><p>We need to connect to one of the masters to get the kubernetes token and copy it in our local kube config:</p><pre>[alex@laptop kubespray]$  vagrant ssh k8s-02<br>Last login: Mon Feb 12 15:36:39 2018 from 192.168.121.1<br>[vagrant@k8s-02 ~]$ sudo -i<br>[root@k8s-02 ~]<em># cat /etc/kubernetes/admin.conf</em><br>...</pre><p>Now copy the content in ~/.kube/config on your laptop!</p><p>It’s time to setup/download the kubectl client if you never did it. On Fedora/RHEL systems you should install “kubernetes-client” package.</p><h3>Check the kubernetes cluster is properly working</h3><p>If all it’s gone ok, you’ll something similar, reporting that now you have three kubernetes nodes ready to be used:</p><pre>[alex@laptop ~]$ kubectl get nodes<br>NAME STATUS ROLES AGE VERSION<br>k8s-01 Ready master,node 21m v1.9.0+coreos.0<br>k8s-02 Ready master,node 21m v1.9.0+coreos.0<br>k8s-03 Ready node 21m v1.9.0+coreos.0</pre><pre>[alex@laptop ~]$ kubectl get ns<br>NAME STATUS AGE<br>default Active 22m<br>kube-public Active 22m<br>kube-system Active 22m</pre><h3>Setup kubevirt</h3><p>I prepared some examples (apart from the ones available by kubevirt team) and for that reason I forked the original kubevirt-demo repository, so clone my repo first:</p><pre>[alex@laptop gitprojects]$ git clone <a href="https://github.com/alezzandro/demo">https:<em>//github.com/alezzandro/demo</em></a></pre><p>Then setup kubevirt in your kubernetes cluster with the following command:</p><pre>[alex@laptop demo]$ cd demo</pre><pre>[alex@laptop demo]$ kubectl create -f <a href="https://github.com/kubevirt/kubevirt/releases/download/v0.2.0/kubevirt.yaml">https://github.com/kubevirt/kubevirt/releases/download/v0.2.0/kubevirt.yaml</a> -f manifests/demo-pv.yaml<br>clusterrole &quot;kubevirt-infra&quot; created<br>serviceaccount &quot;kubevirt-infra&quot; created<br>serviceaccount &quot;kubevirt-admin&quot; created<br>clusterrolebinding &quot;kubevirt-infra&quot; created<br>clusterrolebinding &quot;kubevirt-infra-cluster-admin&quot; created<br>customresourcedefinition &quot;virtualmachines.kubevirt.io&quot; created<br>customresourcedefinition &quot;migrations.kubevirt.io&quot; created<br>customresourcedefinition &quot;virtualmachinereplicasets.kubevirt.io&quot; created<br>deployment &quot;virt-controller&quot; created<br>daemonset &quot;virt-handler&quot; created<br>daemonset &quot;libvirt&quot; created<br>service &quot;iscsi-demo-target&quot; created<br>deployment &quot;iscsi-demo-target-tgtd&quot; created<br>persistentvolumeclaim &quot;disk-alpine&quot; created<br>persistentvolume &quot;iscsi-disk-alpine&quot; created</pre><p>With the previous command we’ll create all the resources needed for creating the kubevirt endpoint inside our kubernetes cluster. The demo-pv.yaml include all the necessary for setting up an iSCSI container for dispatching pre-built disks and iso to our future virtual machines.</p><p>We can check the status of the iscsi pod with the following commands:</p><pre>[alex@laptop demo]$ kubectl get pv<br>NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE<br>iscsi-disk-alpine 1Gi RWO Retain Bound default/disk-alpine 25m</pre><pre>[alex@laptop demo]$ kubectl get pods<br>NAME READY STATUS RESTARTS AGE<br>iscsi-demo-target-tgtd-5674b4f6fd-hb2j5 1/1 Running 0 26m</pre><p>As you can see by the previous commands, a running iscsi pod with a persistent volume was just created.</p><p>After that, check that all is working properly (it’ll need some time for finishing it up!):</p><pre>[alex@laptop demo]$ kubectl get <em>--namespace kube-system pods | grep virt</em><br>libvirt-2cvqb 2/2 Running 0 9m<br>libvirt-rmxg5 2/2 Running 0 9m<br>libvirt-w8xgc 2/2 Running 0 9m<br>virt-controller-b7b8fd9b7-f8vkf 1/1 Running 0 9m<br>virt-controller-b7b8fd9b7-q67bk 0/1 Running 0 9m<br>virt-handler-htv8c 1/1 Running 4 9m<br>virt-handler-lq4nf 1/1 Running 5 9m<br>virt-handler-xqwzk 1/1 Running 0 9m</pre><p>Don’t worry about the not-ready <em>virt-controller</em> pod (in bold in the previous example), I’ve already filled an issue for kubevirt project reporting it.</p><p><a href="https://github.com/kubevirt/kubevirt/issues/727">https://github.com/kubevirt/kubevirt/issues/727</a></p><p>It seems that the container is deployed on role=master kubernetes nodes, in our case we have 2 master and for this reason it tries to deploy the virt-controller two times.</p><h3>Spawn a test virtual machine</h3><p>We’ll create a virtual machine using a simple yaml template:</p><pre>[alex@laptop demo]$ cat manifests/vm.yaml <br>apiVersion: kubevirt.io/v1alpha1<br>kind: VirtualMachine<br>metadata:<br> name: testvm<br>spec:<br> terminationGracePeriodSeconds: 0<br> domain:<br>  resources:<br>   requests:<br>    memory: 64M<br>  devices:<br>   disks:<br>   - name: mydisk<br>     volumeName: myvolume<br>     disk:<br>      dev: vda<br> volumes:<br>  - name: myvolume<br>    iscsi:<br>     iqn: iqn.2017-01.io.kubevirt:sn.42<br>     lun: 2<br>     targetPortal: iscsi-demo-target.default.svc.cluster.local</pre><pre>[alex@laptop demo]$ kubectl create -f manifests/vm.yaml<br>virtualmachine &quot;testvm&quot; created</pre><pre>[alex@laptop demo]$ kubectl get vm<br>NAME AGE<br>testvm 7s</pre><pre>[alex@laptop demo]$ kubectl describe vm testvm | tail -n8<br>Status:<br> Node Name: k8s-01<br> Phase: Running<br>Events:<br> Type Reason Age From Message<br> <em>---- ------ ---- ---- -------Normal Created 6m virt-handler, k8s-01 VM defined.</em><br> Normal Started 6m virt-handler, k8s-01 VM started.</pre><p>Yeah, this might sound cool, we’ve just started our first virtual machine on this kubernetes cluster: but how to interact with it?</p><p>First we have to download the virtctl binary (sorry mac users, try to search it in homebrew). This tool will get quick access to the serial and graphical ports of a VM:</p><pre>[alex@laptop demo]$ mkdir -p ~/bin<br>[alex@laptop demo]$ curl -L -o ~/bin/virtctl <a href="https://github.com/kubevirt/kubevirt/releases/download/$VERSION/virtctl-$VERSION-linux-amd64">https://github.com/kubevirt/kubevirt/releases/download/$VERSION/virtctl-$VERSION-linux-amd64</a><br>[alex@laptop demo]$ chmod a+x virtctl</pre><p>Then we’ll setup a proxy connection to the kubernetes cluster:</p><pre>[alex@laptop demo]$ kubectl proxy --disable-filter=true &amp;<br>Starting to serve on 127.0.0.1:8001<br>[alex@laptop demo]$ KUBEAPI=http://127.0.0.1:8001</pre><p>Finally we can connect to the just created VM:</p><pre>[alex@laptop demo]$ virtctl console -s $KUBEAPI testvm<br>Escape sequence is ^]<br>Welcome to Alpine Linux 3.5<br>Kernel 4.4.45-0-virtgrsec on an x86_64 (/dev/ttyS0)</pre><pre>localhost login: root<br>Welcome to Alpine!</pre><pre>The Alpine Wiki contains a large amount of how-to guides and general<br>information about administrating Alpine systems.<br>See &lt;http://wiki.alpinelinux.org&gt;.</pre><pre>You can setup the system with the command: setup-alpine</pre><pre>You may change this message by editing /etc/motd.</pre><pre>localhost:~<em># uname -a</em><br>Linux localhost 4.4.45-0-virtgrsec <em>#1-Alpine SMP Thu Jan 26 14:32:43 GMT 2017 x86_64 Linux</em><br>localhost:~<em># whoami</em><br>root</pre><p>As you saw in the previous example just after running the previous command we’ll jump into serial console of the vm.</p><p>Login as <em>root</em> will let us enter the Alpine Linux distribution that VM is running.</p><p>Ok, the vm is there, up &amp; running, but where? On which node? Let’s explore kubernetes pod events:</p><pre>[alex@laptop demo]$ kubectl get pods|grep virt<br>virt-launcher-testvm-----m5hqt 1/1 Running 0 24m</pre><pre>[alex@laptop demo]$ kubectl describe pod virt-launcher-testvm-----m5hqt | tail -n10<br>Type Reason Age From Message<br> ---- ------ ---- ---- -------<br>Normal Scheduled 25m default-scheduler Successfully assigned virt-launcher-testvm-----m5hqt to k8s-01<br>Normal SuccessfulMountVolume 25m kubelet, k8s-01 MountVolume.SetUp succeeded for volume &quot;virt-share-dir&quot;<br>Normal SuccessfulMountVolume 25m kubelet, k8s-01 MountVolume.SetUp succeeded for volume &quot;virt-private-dir&quot;<br>Normal SuccessfulMountVolume 25m kubelet, k8s-01 MountVolume.SetUp succeeded for volume &quot;default-token-zg28w&quot;<br>Normal Pulling 25m kubelet, k8s-01 pulling image &quot;kubevirt/virt-launcher:v0.2.0&quot;<br>Normal Pulled 25m kubelet, k8s-01 Successfully pulled image &quot;kubevirt/virt-launcher:v0.2.0&quot;<br>Normal Created 25m kubelet, k8s-01 Created containerNormal Started 25m kubelet, k8s-01 Started container</pre><p>Fine let’s connect to node <em>k8s-01</em>:</p><pre>[alex@laptop demo]$ cd ../kubespray/<br>[alex@laptop kubespray]$ vagrant ssh k8s-01<br>Last login: Mon Feb 12 13:12:18 2018 from 192.168.121.1</pre><pre>[vagrant@k8s-01 ~]$ sudo -i</pre><pre>[root@k8s-01 ~]<em># </em>ps ax | grep qemu<br>10714 ? Ssl 0:06<strong> /virt-handler</strong> -v 3 --libvirt-uri qemu:///system --hostname-override k8s-01<br>13706 pts/2 S+ 0:00 grep --color=auto qemu<br>17461 ? Ssl 0:01 <strong>/virt-launcher</strong> --qemu-timeout 5m --name testvm --namespace default --kubevirt-share-dir /var/run/kubevirt --readiness-file /tmp/healthy --grace-period-seconds 15<br>17533 ? Sl 1:41 <strong>/usr/bin/qemu-system-x86_64</strong> -name guest=default_testvm,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-default_testvm/master-key.aes -machine pc-i440fx-2.10,accel=tcg,usb=off,dump-guest-core=off -m 62 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid baa06c70-187f-4ea8-9343-1ff88fe04155 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-default_testvm/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=iscsi://10.233.37.0:3260/iqn.2017-01.io.kubevirt%3Asn.42/2,format=raw,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=25,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:3d:92:32,bus=pci.0,addr=0x3 -chardev socket,id=charserial0,path=/var/run/kubevirt-private/default/testvm/virt-serial0,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -vnc vnc=unix:/var/run/kubevirt-private/default/testvm/virt-vnc -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on</pre><p>And here we go! We have on this node a containerized qemu-system-x86_64 process running the just created Virtual Machine on.</p><h3>Explore the iSCSI container: a Cirros Virtual Machine</h3><p>But let’s also explore the running iscsi pod, to see what kind of other VM we can start (what disk we can use):</p><pre>[alex@laptop kubespray]$ kubectl get pods | grep scsi<br>iscsi-demo-target-tgtd-5674b4f6fd-hb2j5 1/1 Running 0 1h</pre><pre>[alex@laptop kubespray]$ kubectl exec iscsi-demo-target-tgtd-5674b4f6fd-hb2j5 -ti /bin/bash<br>[root@iscsi-demo-target-tgtd-5674b4f6fd-hb2j5 /]#  ls volume/<br>0-custom.img alpine.iso cirros.rawa</pre><p>So, ready to test the Cirros RAW image?</p><p>I’ve already prepared a template for using the third disk, you’ll find in the <em>manifests/cirrosvm.yaml</em>:</p><pre>[alex@laptop kubespray]$ cd ../demo/</pre><pre>[alex@laptop demo]$ cat manifests/cirrosvm.yaml <br>apiVersion: kubevirt.io/v1alpha1<br>kind: VirtualMachine<br>metadata:<br>  name: cirrosvm<br>spec:<br>  terminationGracePeriodSeconds: 0<br>  domain:<br>    resources:<br>      requests:<br>        memory: 64M<br>    devices:<br>      disks:<br>      - name: mydisk<br>         volumeName: myvolume<br>         disk:<br>           dev: vda<br>      - name: cloudinitdisk<br>         volumeName: cloudinitvolume<br>         disk:<br>           dev: vdb<br>  volumes:<br>    - name: myvolume<br>       iscsi:<br>         iqn: iqn.2017-01.io.kubevirt:sn.42<br>         lun: 3<br>         targetPortal: iscsi-demo-target.default.svc.cluster.local<br>    - name: cloudinitvolume<br>      cloudInitNoCloud:<br>        userDataBase64: I2Nsb3VkLWNvbmZpZwoK</pre><p>As you can see by the previous template I’ve just changed the lun id to “3” for choosing the cirros image and I’ve also added a cloud-init volume for speeding up the boot sequence: otherwise cirros VM would try waiting for cloud-init instructions by network (until reaching timeout).</p><p>You can easily decode the Base64 data, it’s nothing more than:</p><blockquote>#cloud-config</blockquote><p>Then create the cirros VM:</p><pre>[alex@laptop demo]$ kubectl create -f manifests/cirrosvm.yaml <br>virtualmachine &quot;cirrosvm&quot; created</pre><pre>[alex@laptop demo]$ kubectl get vms<br>NAME AGE<br>cirrosvm 31s<br>testvm 1h</pre><pre>[alex@laptop demo]$ kubectl describe vm cirrosvm | tail -n8<br>Status:<br> Node Name: k8s-02<br> Phase: Running<br>Events:<br> Type Reason Age From Message<br> <em>---- ------ ---- ---- -------Normal Created 1m virt-handler, k8s-02 VM defined.</em><br> Normal Started 1m virt-handler, k8s-02 VM started.</pre><p>Let’s connect to the running <em>cirrosvm</em> as done previously:</p><pre>[alex@laptop demo]$ virtctl console -s $KUBEAPI cirrosvm<br>Escape sequence is ^]<br>login as &#39;cirros&#39; user. default password: &#39;cubswin:)&#39;. use &#39;sudo&#39; for root.<br>cirros login: cirros<br>Password: <br>$ sudo -i<br># <br># uname -a<br>Linux cirros 3.2.0-80-virtual #116-Ubuntu SMP Mon Mar 23 17:28:52 UTC 2015 x86_64 GNU/Linux<br>#  mount<br>rootfs on / type rootfs (rw)<br>/dev on /dev type devtmpfs (rw,relatime,size=20764k,nr_inodes=5191,mode=755)<br>/dev/vda1 on / type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered)<br>/proc on /proc type proc (rw,relatime)<br>sysfs on /sys type sysfs (rw,relatime)<br>devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)<br>tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)<br>tmpfs on /run type tmpfs (rw,nosuid,relatime,size=200k,mode=755)</pre><p>Now lets try to store some data and see if it persists to VM crashes, we’ll create a file inside of our Cirros vm:</p><pre><em># echo &quot;This is only an example of data&quot; &gt; /root/mydata.txt</em><br><em># ls</em><br>mydata.txt</pre><p>We’re now ready to delete the Virtual Machine and recreate it:</p><pre>[alex@laptop demo]$ kubectl delete vm cirrosvm<br>virtualmachine &quot;cirrosvm&quot; deleted</pre><pre>[alex@laptop demo]$ kubectl create -f manifests/cirrosvm.yaml <br>virtualmachine &quot;cirrosvm&quot; created</pre><pre>[alex@laptop demo]$ kubectl describe vm cirrosvm | tail -n8<br>Status:<br> Node Name: k8s-01<br> Phase: Running<br>Events:<br> Type Reason Age From Message<br> <em>---- ------ ---- ---- -------Normal Created 9s virt-handler, k8s-01 VM defined.</em><br> Normal Started 8s virt-handler, k8s-01 VM started.</pre><p>And we got it! Cirrosvm is running on a different node, lets connect to it to see if data persisted the “crash”:</p><pre>[alex@laptop demo]$ virtctl console -s $KUBEAPI cirrosvm<br>Escape sequence is ^]<br>login as &#39;cirros&#39; user. default password: &#39;cubswin:)&#39;. use &#39;sudo&#39; for root.<br>cirros login: cirros<br>Password: <br>$ sudo -i<br><em># cat /root/mydata.txt </em><br>This is only an example of data<br><em>#</em></pre><p>Data is there, it persisted thanks to the iSCSI volume!</p><h3>Other tests and hacks</h3><p>I’ve also tested some other feature like the <em>Migration</em> object, you’ll find an example in file “manifests/migrate-testvm.yaml”.</p><p>It works correctly but unfortunately it hangs if the vm has a cloud-init volume attached on. I’ve also reported the bug <a href="https://github.com/kubevirt/kubevirt/issues/665">https://github.com/kubevirt/kubevirt/issues/665</a></p><p>That’s all for now!</p><p>Keep watching the project, it’s very active!</p><h3>About Alessandro</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*vF7cXJ1iEcRtBdga.jpg" /></figure><p>Alessandro Arrichiello is a Solution Architect for Red Hat Inc. He has a passion for GNU/Linux systems, which began at age 14 and continues today. He worked with tools for automating Enterprise IT. He’s now working on distributed cloud environment involving PaaS (OpenShift), IaaS (OpenStack) and Processes Management (CloudForms), Containers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e809914cc783" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>