George Dunlap <dunlapg@xxxxxxxxx> writes: >> On Wed, Jun 4, 2014 at 3:12 AM, lee <lee@xxxxxxxxxxxxxxx> wrote: >>> George Dunlap <dunlapg@xxxxxxxxx> writes: >> >> I was merely trying to create a VM on a centos host, using xen. Hence >> my question what "the centos way" of doing this (without a GUI) is. >> >> By trial and error, I found that creating them with virsh-install works. >> Yet it seems to me as if virsh is an additional layer which makes >> dealing with VMs a lot easier at the cost of increased resource usage. >> My intention was to avoid this and to create VMs "the xen way" --- which >> apparently doesn`t work with centos. > > The Xen project itself doesn't have anything to build disk images; > just as KVM itself doesn't have anything to build disk images. It > leaves that to higher-level tools. Creating a VM and getting the network to work are the biggest problems I`m having with this. Even with virt-install, you cannot use a centos minimal CD ISO because it`ll say that something is missing. With the full installer DVD ISO you get to the point where the installer asks you where the installation media is --- and then you`re screwed because you *must* have network access from within the VM at that point. The installer lets you set up network access, but only once. If you don`t get it right the first time, you have to start over. Nobody tells you how to get the network access to work. Suppose the dom0 has an IP of 192.168.10.10 and you tell the installer to use 192.168.10.20. That seems to make sense, but there`s no way to get network access from within the VM with that. I still don`t understand why and why this is so awfully difficult. You have to use something like 192.168.20.20 for the VM and make sure routing on dom0 is set up accordingly. You have to use an http server or nfs on dom0 to make the installation media available available to the VM. If the http/nfs server is not on dmo0, you have to set up forwarding to make it reachable for the VM. You have to make sure to disable the rudimentary firewall dom0 has to be able to access it from within the VM. You have to figure out that the installer doesn`t want the installation media, which is the ISO file. No, you have to mount the ISO, copy everything in it to a directory and then export that directory via nfs so that finally, if you got network access to work, the installer can proceed. Then you need to figure out how to get the bridge set up when starting the system. I created an ifcfg file for it and am told that bringing up that interface is delayed because it doesn`t seem to exist. There doesn`t seem to be any documentation about the file apparently used by xend to configure the VM. Documentation tells you to use virsh edit <domU name>, and with that, I`m seeing my changes *not* being applied even after restarting the VM. I`d edit the file directly (somewhere under /etc/xend/domains or so), but without documentation about what`s in it, I rather avoid that. How do you set a memory range (min--max) for the VM with virsh? There doesn`t seem to be a way to do that, and even if there was, how do I make it so that changes through virsh edit are applied? > I know some people use virsh to install the guest, and then use the xl > command-line to manage it after that; but I haven't tested that. It seemed to me that xend and xl are incompatible. > It would be good to have recommendations on the wiki for a simple, > standardized way to create guests in CentOS. Yes, that`s exactly what I`m asking about all the time: The centos way of creating guests. As it is, you have to piece together hundreds of bits of documentation and by trial and error somehow figure out some way that gets you what you want. >>> If you describe which bit of documentation on the Xen website you >>> tried to follow, what you were trying to do, and what happened, then >>> we can figure out which of those it is and address the issue. >> >> Well, I didn`t really care about the documentation that didn`t work. >> Like I said, using xl didn`t work because it only says the kernel can`t >> be booted; xm seems to be deprecated (yet still used with centos), and >> virsh-install works. > > *I* care about the documentation that didn't work, so that other > people don't trip over the same thing. :-) If you've walked this > path and become frustrated, there are probably a dozen other people > who have also walked it and just not said anything. I`d gladly tell you which documentation it was if I could remember. Some of the documentation on the xen wiki seems to be outdated or a mess because it evolved over time and how things are supposed to be done has changed. Almost all documentation recommends you to create a file to keep the VM in. I was planning to do that until I found some other documentation telling me that it`s a bad idea because file access like that is relatively slow and you`re much better off using LVM volumes instead. Besides being faster, they have other advantages as well, so I`m doing it that way. Once I figured out how to have VMs started automatically, I need to find out how to give a VM access to a physical interface to do pppoe over it and how to give it access to two more virtual interfaces ... Is there a good documentation that explains this network stuff with VMs? I still don`t really have a clue how to do that. -- Knowledge is volatile and fluid. Software is power. _______________________________________________ CentOS-virt mailing list CentOS-virt@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos-virt