[Libguestfs] virt-copy-in - how do I get the selinux relabeling done for the file?
Richard W.M. Jones
rjones at redhat.com
Sun Dec 24 13:54:45 UTC 2017
On Sun, Dec 24, 2017 at 01:49:33PM +0000, Richard W.M. Jones wrote:
> On Sun, Dec 24, 2017 at 02:15:44PM +0200, Yaniv Kaul wrote:
> > I'm copying a file into a VM using virt-copy-in - which is great, but the
> > file is wrongly labeled.
> > How can I fix that?
>
> Hi Yaniv,
>
> The easiest thing is to run this after doing the virt-copy-in:
>
> virt-customize -a disk.img --selinux-relabel
Hmm, actually I forgot you can do this which does both ...
virt-customize -a disk.img --copy-in localpath:remotepath --selinux-relabel
You can use --copy-in multiple times if you need to.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list