Skip to content

Commit

Permalink
Add guestfs command to virtctl
Browse files Browse the repository at this point in the history
Libguestfs offers a series of tools for debugging and customize disk images. The guestfs command:
  - starts a pod with libguestfs-tools
  - mounts the pvc under /disks (for filesystem based disks) or /dev/vda (for
    block based disks)
  - attach stdin/out of the container
  - once the user exits from the container, it removes the libguestfs pod

Signed-off-by: Alice Frosi <[email protected]>
  • Loading branch information
alicefr committed Jun 1, 2021
1 parent ce1e954 commit 23ef4c3
Show file tree
Hide file tree
Showing 17 changed files with 3,346 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/virtctl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ go_library(
deps = [
"//pkg/virtctl/console:go_default_library",
"//pkg/virtctl/expose:go_default_library",
"//pkg/virtctl/guestfs:go_default_library",
"//pkg/virtctl/imageupload:go_default_library",
"//pkg/virtctl/pause:go_default_library",
"//pkg/virtctl/templates:go_default_library",
Expand Down
22 changes: 22 additions & 0 deletions pkg/virtctl/guestfs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["guestfs.go"],
importpath = "kubevirt.io/kubevirt/pkg/virtctl/guestfs",
visibility = ["//visibility:public"],
deps = [
"//pkg/virtctl/templates:go_default_library",
"//pkg/virtctl/utils:go_default_library",
"//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
"//vendor/github.com/spf13/cobra:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
"//vendor/k8s.io/client-go/tools/remotecommand:go_default_library",
],
)
Loading

0 comments on commit 23ef4c3

Please sign in to comment.