How to PXE boot a virtual machine from another virtual machine which are in same virtual network?
Tons of thanks to gPXE, if the node boot up via a gPXE iso as it's cdrom (rather than a network boot), then it can successfully take interaction with MaaS Server and change it's state from Commissioning
to Ready
!
Related videos on Youtube
emportella
Updated on September 18, 2022Comments
-
emportella over 1 year
I have a app that uses MySQL, JPA with EclipseLink.
I'm trying to get from the DB the collection of User flagged as "ACTIVE" and that are not already in a List already loaded in the application.
That is my method:
public List<User> findAllButUsers(List<User> users) { List<User> list = null; Query query = em.createQuery("SELECT u FROM User u WHERE u NOT IN :users AND u.status = :status"); query.setParameter("status", "ACTIVE"); query.setParameter("users", users); list = query.getResultList(); return list; }
And the Log from server gives me that:
Fine: SELECT iduser, create_time, email, name, password, salt, status FROM user WHERE ((iduser NOT IN (?)) AND (status = ?)) bind => [com.wa.gp.jpa.entities.User[ iduser=2 ], ACTIVE]
From the bind => [com.wa.gp.jpa.entities.User[ iduser=2 ], ACTIVE] shows me that instead of binding the id it passes the value from User.toString method thus resulting in a Collection that includes the users passed. I thought it would work just sending the object to JPA and it would figure out the iduser by itself.
I don't know if it is a expected behavior, looks to me it is. How can I just make that query without having to change the valor from tostring in User? Do I have to instead of giving the List of Users just pass a List of the Ids? If that is the case I just became said.
Thanks
-
Yasser Zamani about 11 yearsbut when I boot up another VM in same network via a Live CD (DSL), it can get a new IP from MaaS Server; I verified this by seeing
/var/log/syslog
. -
smoser about 11 yearsYasser, right. Its only an issue with the tftp, and my experience was that it was only on the attempt to load the tftp config. If you're able, just make the tftp server listen on the virbr0 interface address.
-
Yasser Zamani about 11 yearsI do NOT have
/etc/maas/dhcpd.conf
on MaaS Server's file system! However, USING SAME CONFIGURATIONS, after some more research I could boot up the node from MaaS Server using gPxe (rom-o-matic.net/gpxe/gpxe-1.0.1/contrib/rom-o-matic). It successfully booted up but always connects to MaaS's apache server to download packages rather than archive.ubuntu.com!!! I'll continue after my new year holidays and let you know ;) thanks -
Yasser Zamani about 11 years@dhojgaard, the KVM and VMs are on a server machine which cannot have
X Windows
installed; Canvirt-manager
display a remore VM via opening itself viaXming Server
? -
dhojgaard about 11 years@YasserZamani With virt-manager you can connect to the server running the virtual machines. Try to install it on your laptop or a computer running ubuntu desktop and connect to the network with the server and then connect to that server via virt-manager
-
Yasser Zamani about 11 yearsHi again; I successfully booted up using
gPxe
(rom-o-matic.net/gpxe/gpxe-1.0.1/contrib/rom-o-matic). It started booting from MaaS Server's TFTP, downloaded and installed some staff and finally shutdowned itself. I happily gone to MaaS Server WEB UI but still they're in commissioning state :(( -
Yasser Zamani about 11 yearsOK, previuos comment was a temprory unknown problem; I started an amazing new year because finally I bootstrapped
juju
usinggPXE
utility as I described in my answer :) thank you @smoser for developing ubuntu ;)