1
0
mirror of https://github.com/fmillion/docs.git synced 2025-07-17 07:36:25 +00:00

Reorganize plex doc, add start of Hyper-V doc, update readme

This commit is contained in:
Flint Million
2019-01-24 16:46:41 -06:00
parent 4dfe336801
commit d3364b8f27
3 changed files with 68 additions and 39 deletions

23
HyperV-in-KVM.md Normal file
View File

@ -0,0 +1,23 @@
# Running Hyper-V inside of a KVM/QEMU virtual machine
This guide explains how to get Microsoft's Hyper-V hypervisor to successfully run inside a QEMU container running with KVM.
## Common problems
If you are using a virtualization framework that uses KVM (this includes Proxmox, oVirt, and plain qemu), and you have tried to run a Windows virtual machine with Hyper-V enabled, you will often find that your efforts are unsuccessful. Commonly experienced issues that this guide will help you resolve are:
* Hyper-V just doesn't work. Trying to boot a VM throws errors.
* Hyper-V seems to work, but networking stops working - your Hyper-V host VM cannot communicate over the network at all.
* After enabling Hyper-V, your VM enters a boot loop - it crashes immediately upon trying to boot and throws you into Automatic Repair.
The settings outlined in this guide will resolve these and possibly other issues that keep you from getting Hyper-V running inside KVM.
## HOWTO
### Requirements
In order to be able able to do this at all, your host system's CPU must support SLAT (second-level address translation), which Intel calls EPT (enhanced page tables). On Intel, any processor in the Westmere series (Xeon L|E|X56xx series) and later should have the necessary support for EPT, with the exception of some low-end consumer CPUs in the Celeron and Pentium lines. For AMD, Phenom II or later chips should be supported.
### Make sure nested KVM is enabled
In order to run *any* hypervisor operating system you must ensure that nested virtualization is enabled in your host operating system. This will be similar on any Linux OS, including Proxmox and oVirt.

View File

@ -15,7 +15,9 @@ There are several reasons:
## Getting Started ## Getting Started
If you already have a Plex instance running in Docker, you'll need to destroy it and create a new one. If you followed the instructions for setting up Plex on Docker, you performed a volume mount for multiple locations: If you already have a Plex instance running in Docker, you'll need to destroy it and create a new one. This is because we need to change some settings about the container's operation.
If you followed the instructions for setting up Plex on Docker, you performed a volume mount for multiple locations:
* **/transcode**: Transcoding temp folder * **/transcode**: Transcoding temp folder
* **/config**: Configuration * **/config**: Configuration
@ -23,44 +25,7 @@ If you already have a Plex instance running in Docker, you'll need to destroy it
When you re-create your Docker container, you'll need to use these same mounts. If you do this right, your new Plex container will automatically pick up on your old settings and Plex will ultimately come back up just as if you hadn't changed anything. When you re-create your Docker container, you'll need to use these same mounts. If you do this right, your new Plex container will automatically pick up on your old settings and Plex will ultimately come back up just as if you hadn't changed anything.
### If you forgot to create volume mounts for /transcode or /config: If you forgot to use bind mounts as required, see the section later in this document entitled "If you forgot to create volume mounts".
It's not impossible to recover from this, but it is a bit tricky.
**Method 1**
This method assumes you at least created a volume mount for your media. If this is the case, you have one easy way out of your container - through this mount. You can use **docker exec** to connect to your container and obtain a shell, and copy the files to your media folder temporarily:
host:# docker exec -it <name of your Plex container> /bin/sh
container:# mkdir /data/server-data
container:# cp -av /config /transcode /data/server-data
container:# exit
After you do this, **stop your Docker container right away.** This prevents anything else from happening before you migrate to a new container:
host:# docker stop <name of your Plex container>
**Method 2**
If you didn't use *any* mounts at all, you are in a bit of a tougher spot. But you still have an option:
1. Get a shell within the container.
host:# docker exec -it <name of your Plex container> /bin/sh
1. Make an archive of the contents of the `/config` and `/transcode` folders:
container:# tar cf /backup.tar /config /transcode
1. Exit the container
container:# exit
1. Copy the archive out of the container
host:# docker cp <name of your Plex container>:/backup.tar .
You now have a copy of your configuration. You can extract this tarfile somewhere on your system and next time bind-mount it into the correct locations.
## Creating a new Plex Docker container ## Creating a new Plex Docker container
@ -216,3 +181,43 @@ Now we're going to create and configure an `nginx` container which will run as o
1. Finally, try to access your Plex server at the address of your proxy, for example `https://my-proxy.local.lan:32469/web/index.html` If you see the Plex web interface, you're all set! 1. Finally, try to access your Plex server at the address of your proxy, for example `https://my-proxy.local.lan:32469/web/index.html` If you see the Plex web interface, you're all set!
### If you forgot to create volume mounts for /transcode or /config:
It's not impossible to recover from this, but it is a bit tricky.
**Method 1**
This method assumes you at least created a volume mount for your media. If this is the case, you have one easy way out of your container - through this mount. You can use **docker exec** to connect to your container and obtain a shell, and copy the files to your media folder temporarily:
host:# docker exec -it <name of your Plex container> /bin/sh
container:# mkdir /data/server-data
container:# cp -av /config /transcode /data/server-data
container:# exit
After you do this, **stop your Docker container right away.** This prevents anything else from happening before you migrate to a new container:
host:# docker stop <name of your Plex container>
**Method 2**
If you didn't use *any* mounts at all, you are in a bit of a tougher spot. But you still have an option:
1. Get a shell within the container.
host:# docker exec -it <name of your Plex container> /bin/sh
1. Make an archive of the contents of the `/config` and `/transcode` folders:
container:# tar cf /backup.tar /config /transcode
1. Exit the container
container:# exit
1. Copy the archive out of the container
host:# docker cp <name of your Plex container>:/backup.tar .
You now have a copy of your configuration. You can extract this tarfile somewhere on your system and next time bind-mount it into the correct locations.
Please note that all of your media files will still be stuck inside the container. Getting these out may be even more challenging especially if you have lots of them.

View File

@ -5,3 +5,4 @@ This is my repo of howto's and other useful information.
## Contents ## Contents
* [Plex Reverse Proxy for Docker](Plex-Reverse-Proxy-for-Docker.md) Setting up a reverse proxy to access Plex running in an isolated Docker container. * [Plex Reverse Proxy for Docker](Plex-Reverse-Proxy-for-Docker.md) Setting up a reverse proxy to access Plex running in an isolated Docker container.
* [Hyper-V host as VM in KVM/QEMU](HyperV-in-KVM.md) How to get a Windows Hyper-V host virtual machine to work as a guest OS on QEMU/KVM-based virtualization platforms